WordPress.org

Make WordPress Core

Changeset 13835


Ignore:
Timestamp:
03/26/2010 09:50:54 PM (11 years ago)
Author:
nacin
Message:

Use correct var in MS dashboard_quota(). props ocean90, see #12710. also fixes sprintf string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ms.php

    r13827 r13835  
    449449    else
    450450        $percentused = ( $used / $quota ) * 100;
    451     $percentused = number_format($percentused);
    452     $used = round($used,2);
    453     $used_color = ($used < 70) ? (($used >= 40) ? 'waiting' : 'approved') : 'spam';
     451    $used_color = ( $percentused < 70 ) ? ( ( $percentused >= 40 ) ? 'waiting' : 'approved') : 'spam';
     452    $used = round( $used, 2 );
     453    $percentused = number_format( $percentused );
     454
    454455    ?>
    455456    <p class="sub musub"><?php _e('Storage Space'); ?></p>
     
    459460            <td class="first b b-posts"><?php printf( __( '<a href="upload.php" title="Manage Uploads" class="musublink">%sMB</a>' ), $quota ); ?></td>
    460461            <td class="t posts"><?php _e('Space Allowed'); ?></td>
    461             <td class="b b-comments"><?php printf( __( '<a href="upload.php" title="Manage Uploads" class="musublink">%1sMB (%2s%%)</a>' ), $used, $percentused ); ?></td>
     462            <td class="b b-comments"><?php printf( __( '<a href="upload.php" title="Manage Uploads" class="musublink">%1sMB (%2$s%%)</a>' ), $used, $percentused ); ?></td>
    462463            <td class="last t comments <?php echo $used_color;?>"><?php _e('Space Used');?></td>
    463464        </tr>
Note: See TracChangeset for help on using the changeset viewer.