WordPress.org

Make WordPress Core

Changeset 12801


Ignore:
Timestamp:
01/22/2010 10:27:26 PM (10 years ago)
Author:
ryan
Message:

Fix warnings. see #11644

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r12800 r12801  
    379379        <form action="ms-sites.php" method="get" id="ms-search">
    380380            <input type="hidden" name="action" value="blogs" />
    381             <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes( esc_attr( $s ) ); ?>" size="17" />
     381            <input type="text" name="s" value="<?php echo($s); ?>" size="17" />
    382382            <input type="submit" class="button" name="blog_name" value="<?php esc_attr_e('Search blogs by name') ?>" />
    383383            <input type="submit" class="button" name="blog_id" value="<?php esc_attr_e('by blog ID') ?>" />
  • trunk/wp-admin/ms-users.php

    r12781 r12801  
    1515    wp_die( __('You do not have permission to access this page.') );
    1616
    17 if ( $_GET['updated'] == 'true' ) {
     17if ( isset($_GET['updated']) && $_GET['updated'] == 'true' ) {
    1818    ?>
    1919    <div id="message" class="updated fade"><p>
     
    4646    $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1;
    4747    $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15;
    48     $s = wp_specialchars( trim( $_GET[ 's' ] ) );
     48    $s = isset($_GET[ 's' ]) ? esc_attr( trim( $_GET[ 's' ] ) ) : '';
    4949
    5050    $query = "SELECT * FROM {$wpdb->users}";
     
    5555    }
    5656
    57     if ( !isset($_GET['sortby']) )
    58         $_GET['sortby'] = 'id';
    59 
    60     if ( $_GET['sortby'] == 'email' )
     57    $order_by = isset( $_GET['sortby'] ) ? $_GET['sortby'] : 'id';
     58
     59    if ( $order_by == 'email' ) {
    6160        $query .= ' ORDER BY user_email ';
    62     elseif ( $_GET['sortby'] == 'id' )
     61    } elseif ( $order_by == 'login' ) {
     62        $query .= ' ORDER BY user_login ';
     63    } elseif ( $order_by == 'name' ) {
     64        $query .= ' ORDER BY display_name ';
     65    } elseif ( $order_by == 'registered' ) {
     66        $query .= ' ORDER BY user_registered ';
     67    } else {
     68        $order_by = 'id';
    6369        $query .= ' ORDER BY ID ';
    64     elseif ( $_GET['sortby'] == 'login' )
    65         $query .= ' ORDER BY user_login ';
    66     elseif ( $_GET['sortby'] == 'name' )
    67         $query .= ' ORDER BY display_name ';
    68     elseif ( $_GET['sortby'] == 'registered' )
    69         $query .= ' ORDER BY user_registered ';
    70 
    71     $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC';
     70    }
     71
     72    $order = isset($_GET['order']) ? $_GET['order'] : 'ASC';
     73    $order = ( 'DESC' == $order ) ? 'DESC' : 'ASC';
     74    $query .= $order;
    7275
    7376    if ( !empty( $s ) )
     
    147150                        echo '<th scope="col" class="check-column"><input type="checkbox" /></th>';
    148151                    } else { ?>
    149                         <th scope="col"><a href="ms-users.php?sortby=<?php echo $column_id ?>&amp;<?php if ( $_GET['sortby'] == $column_id ) { if ( $_GET['order'] == 'DESC' ) { echo "order=ASC&amp;" ; } else { echo "order=DESC&amp;"; } } ?>apage=<?php echo $apage ?>"><?php echo $column_display_name; ?></a></th>
     152                        <th scope="col"><a href="ms-users.php?sortby=<?php echo $column_id ?>&amp;<?php if ( $order_by == $column_id ) { if ( $order == 'DESC' ) { echo "order=ASC&amp;" ; } else { echo "order=DESC&amp;"; } } ?>apage=<?php echo $apage ?>"><?php echo $column_display_name; ?></a></th>
    150153                    <?php } ?>
    151154                <?php } ?>
     
    155158            <?php if ($user_list) {
    156159                $bgcolor = '';
     160                $class = '';
    157161                foreach ( (array) $user_list as $user) {
    158162                    $class = ('alternate' == $class) ? '' : 'alternate';
Note: See TracChangeset for help on using the changeset viewer.