Changeset 12804
- Timestamp:
- 01/22/2010 10:34:54 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/ms.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/ms.php
r12782 r12804 133 133 $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->usermeta WHERE user_id = %d", $id) ); 134 134 135 clean_user_cache($id); 135 clean_user_cache($id); 136 136 137 137 // allow for commit transaction … … 386 386 // Display File upload quota on dashboard 387 387 function dashboard_quota() { 388 if ( get_site_option( 'upload_space_check_disabled' ) ) {388 if ( get_site_option( 'upload_space_check_disabled' ) ) 389 389 return true; 390 } 390 391 391 $quota = get_space_allowed(); 392 392 $used = get_dirsize( BLOGUPLOADDIR )/1024/1024; 393 393 394 if ($used > $quota) $percentused = '100'; 395 else $percentused = ( $used / $quota ) * 100; 394 if ( $used > $quota ) 395 $percentused = '100'; 396 else 397 $percentused = ( $used / $quota ) * 100; 396 398 $percentused = number_format($percentused); 397 399 $used = round($used,2); 398 400 $used_color = ($used < 70) ? (($used >= 40) ? 'waiting' : 'approved') : 'spam'; 399 401 ?> 400 <p class="sub musub"><?php _e( "Storage Space <a href='upload.php' title='Manage Uploads...'>»</a>"); ?></p>402 <p class="sub musub"><?php _e('Storage Space'); ?></p> 401 403 <div class="table"> 402 404 <table> 403 405 <tr class="first"> 404 <td class="first b b-posts"><?php printf( __( '<a href="upload.php" title="Manage Uploads ..." class="musublink">%sMB</a>' ), $quota ); ?></td>406 <td class="first b b-posts"><?php printf( __( '<a href="upload.php" title="Manage Uploads" class="musublink">%sMB</a>' ), $quota ); ?></td> 405 407 <td class="t posts"><?php _e('Space Allowed'); ?></td> 406 <td class="b b-comments"><?php printf( __( '<a href="upload.php" title="Manage Uploads ..." class="musublink">%1sMB (%2s%%)</a>' ), $used, $percentused ); ?>408 <td class="b b-comments"><?php printf( __( '<a href="upload.php" title="Manage Uploads" class="musublink">%1sMB (%2s%%)</a>' ), $used, $percentused ); ?> 407 409 <td class="last t comments <?php echo $used_color;?>"><?php _e('Space Used');?></td> 408 410 </tr> … … 699 701 if ( !is_null( $item ) ) { 700 702 $title = $item->get_title(); 701 if ( md5( $title ) == get_user_option( 'admin_feed_dismiss', $current_user->id ) ) 703 if ( md5( $title ) == get_user_option( 'admin_feed_dismiss', $current_user->id ) ) 702 704 return; 703 705 $msg = "<h3>" . esc_html( $title ) . "</h3>\n"; 704 706 $content = $item->get_description(); 705 if ( is_null( $content ) ) 707 if ( is_null( $content ) ) 706 708 $content = __( 'something' ); 707 709
Note: See TracChangeset
for help on using the changeset viewer.