Changeset 1289

Show
Ignore:
Timestamp:
05/15/08 16:35:59 (5 months ago)
Author:
donncha
Message:

Whitespace cleanup.
Clean up parameter filtering

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/wpmu-admin.php

    r1270 r1289  
    2828<div class="wrap"> 
    2929        <h2><?php _e('WordPress MU : Admin') ?></h2> 
    30          
     30 
    3131        <div id="rightnow"> 
    3232        <h3 class="reallynow"> 
    3333                <span><?php _e('Right Now'); ?></span> 
    34                  
     34 
    3535                <a href="wpmu-blogs.php#form-add-blog" class="rbutton"><strong><?php _e('Create a New Blog'); ?></strong></a> 
    3636                <a href="wpmu-users.php#form-add-user" class="rbutton"><?php _e('Create a New User'); ?></a> 
    3737                <br class="clear" /> 
    3838        </h3> 
    39          
    40         <p class="youhave"><?php echo $sentence; ?></p>         
     39 
     40        <p class="youhave"><?php echo $sentence; ?></p> 
    4141        <?php do_action('wpmuadminresult', ''); ?> 
    42          
     42 
    4343        <form name="searchform" action="wpmu-users.php" method="get"> 
    4444                <p> 
     
    4848                </p>  
    4949        </form> 
    50                  
     50 
    5151        <form name="searchform" action="wpmu-blogs.php" method="get"> 
    5252                <p> 
     
    5656                </p> 
    5757        </form> 
    58          
     58 
    5959        <?php do_action( 'mu_rightnow_end' ); ?> 
    6060        <?php do_action( 'mu_activity_box_end' ); ?> 
  • trunk/wp-admin/wpmu-blogs.php

    r1264 r1289  
    7474                ?> 
    7575                <div class="wrap"> 
    76                 <h2><?php _e('Edit Blog'); ?> - <a href='http://<?php echo $details['domain'].$details['path']; ?>'><?php echo $details['domain'].$details['path']; ?></a></h2>                 
     76                <h2><?php _e('Edit Blog'); ?> - <a href='http://<?php echo $details['domain'].$details['path']; ?>'><?php echo $details['domain'].$details['path']; ?></a></h2> 
    7777                <form method="post" action="wpmu-edit.php?action=updateblog">  
    7878                        <?php wp_nonce_field('editblog'); ?> 
     
    137137                                                        </tr>  
    138138                                                </table> 
    139                                                  
     139 
    140140                                                <h3><?php printf( __('Blog options (wp_%s_options)'), $id ); ?></h3> 
    141141                                                <table class="form-table"> 
     
    190190                                                $theme_key = wp_specialchars( $theme['Stylesheet'] ); 
    191191                                                if( isset($allowed_themes[$theme_key] ) == false ) { 
    192                                                         $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : '';                                                    
    193                                                         $out .= '<tr class="form-field form-required">  
     192                                                        $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked="checked"' : ''; 
     193                                                        $out .= '<tr class="form-field form-required"> 
    194194                                                                        <th title="'.htmlspecialchars( $theme["Description"] ).'" scope="row">'.$key.'</th>  
    195195                                                                        <td><input name="theme['.$theme_key.']" type="checkbox" value="on" '.$checked.'/></td>  
     
    197197                                                } 
    198198                                        } 
    199                                          
    200                                                          
     199 
     200 
    201201                                        if( $out != '' ) { 
    202202                                                echo "<h3>" . __('Blog Themes') . "</h3>"; 
    203                                                 echo '<table class="form-table">';                                              
     203                                                echo '<table class="form-table">'; 
    204204                                                        echo '<tr class=""><th>' . __('Theme') . '</th><th>' . __('Enable') . '</th></tr>'; 
    205205                                                        echo $out; 
    206206                                                echo "</table>"; 
    207207                                        } 
    208                                          
     208 
    209209                                        // Blog users 
    210210                                        $blogusers = get_users_of_blog( $id ); 
     
    245245                                                echo "</table>"; 
    246246                                        } 
    247                                          
     247 
    248248                                        // New blog user 
    249249                                        echo "<h3>" . __('Add a new user') . "</h3>"; ?> 
     
    270270                                                </tr> 
    271271                                        </table> 
    272                                          
     272 
    273273                                        <h3><?php _e('Misc Blog Actions') ?></h3> 
    274274                                        <table class="form-table"> 
    275275                                                <?php do_action( 'wpmueditblogaction', $id ); ?> 
    276276                                        </table> 
    277                                          
     277 
    278278                                        <p class="submit"> 
    279                                                 <input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p>                                 
     279                                                <input type="submit" name="Submit" value="<?php _e('Update Options &raquo;') ?>" /></p> 
    280280                                </td> 
    281281                        </tr> 
     
    285285                <?php 
    286286        break; 
    287          
     287 
    288288        // List blogs 
    289289        default: 
    290290                $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1; 
    291291                $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15; 
    292                  
     292                $s = wp_specialchars( trim( $_GET[ 's' ] ) ); 
     293 
    293294                $query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "; 
    294                  
     295 
    295296                if( isset($_GET['blog_name']) ) { 
    296                         $s = trim($_GET['s']); 
    297297                        $query = "SELECT blog_id, {$wpdb->blogs}.domain, {$wpdb->blogs}.path, registered, last_updated 
    298298                                FROM {$wpdb->blogs}, {$wpdb->site} 
     
    310310                                WHERE site_id = '{$wpdb->siteid}' 
    311311                                AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id 
    312                                 AND {$wpdb->registration_log}.IP LIKE ('%".$_GET['s']."%')"; 
     312                                AND {$wpdb->registration_log}.IP LIKE ('%{$s}%')"; 
    313313                } 
    314                  
     314 
    315315                if( isset( $_GET['sortby'] ) == false ) { 
    316316                        $_GET['sortby'] = 'id'; 
    317317                } 
    318                  
     318 
    319319                if( $_GET['sortby'] == 'registered' ) { 
    320320                        $query .= ' ORDER BY registered '; 
     
    328328 
    329329                $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; 
    330                  
     330 
    331331                if( !empty($_GET['s']) ) { 
    332                         $blog_list = $wpdb->get_results( $query, ARRAY_A );     
    333                         $total = count($blog_list);     
     332                        $blog_list = $wpdb->get_results( $query, ARRAY_A ); 
     333                        $total = count($blog_list); 
    334334                } else { 
    335                         $total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ");     
     335                        $total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' "); 
    336336                } 
    337                  
     337 
    338338                $query .= " LIMIT " . intval( ( $apage - 1 ) * $num) . ", " . intval( $num ); 
    339                          
    340                 $blog_list = $wpdb->get_results( $query, ARRAY_A );     
     339 
     340                $blog_list = $wpdb->get_results( $query, ARRAY_A ); 
    341341 
    342342                // Pagination 
    343                 $url2 = "&order=" . $_GET['order'] . "&amp;sortby=" . $_GET['sortby'] . "&amp;s=" . $_GET['s'] . "&ip_address=" . $_GET['ip_address']; 
     343                $url2 = "&order=" . $_GET['order'] . "&amp;sortby=" . $_GET['sortby'] . "&amp;s="; 
     344                if( $_GET[ 'blog_ip' ] ) { 
     345                        $url2 .= "&ip_address=" . urlencode( $s ); 
     346                } else { 
     347                        $url2 .= $s . "&ip_address=" . urlencode( $s ); 
     348                } 
    344349                $blog_navigation = paginate_links( array( 
    345350                        'base' => add_query_arg( 'apage', '%#%' ).$url2, 
     
    352357                <div class="wrap" style="position:relative;"> 
    353358                <h2><?php _e('Blogs') ?></h2> 
    354                  
     359 
    355360                <form id="searchform" action="wpmu-blogs.php" method="get" style="position:absolute;right:0;top:0;"> 
    356                         <input type="hidden" name="action" value="blogs" />                     
    357                         <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> 
     361                        <input type="hidden" name="action" value="blogs" /> 
     362                        <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes($s); ?>" size="17" /> 
    358363                        <input type="submit" class="button" name="blog_name" value="<?php _e('Search blogs by name') ?>" /> 
    359                         <input type="submit" class="button" name="blog_id" value="<?php _e('by blog ID') ?>" />                 
    360                         <input type="submit" class="button" name="blog_ip" value="<?php _e('by IP address') ?>" />              
     364                        <input type="submit" class="button" name="blog_id" value="<?php _e('by blog ID') ?>" /> 
     365                        <input type="submit" class="button" name="blog_ip" value="<?php _e('by IP address') ?>" /> 
    361366                </form> 
    362          
     367 
    363368                <form id="form-blog-list" action="wpmu-edit.php?action=allblogs" method="post"> 
    364                  
     369 
    365370                <div class="tablenav"> 
    366                         <?php if ( $blog_navigation ) echo "<div class='tablenav-pages'>$blog_navigation</div>"; ?>     
     371                        <?php if ( $blog_navigation ) echo "<div class='tablenav-pages'>$blog_navigation</div>"; ?> 
    367372 
    368373                        <div class="alignleft"> 
     
    376381 
    377382                <br class="clear" /> 
    378                  
     383 
    379384                <?php if( isset($_GET['s']) && !empty($_GET['s']) ) : ?> 
    380                         <p><a href="wpmu-users.php?action=users&s=<?php echo stripslashes(wp_specialchars($_GET['s'], 1)) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes(wp_specialchars($_GET['s'], 1)); ?></strong></a></p> 
    381                 <?php endif; ?>                 
     385                        <p><a href="wpmu-users.php?action=users&s=<?php echo urlencode( stripslashes( $s ) ) ?>"><?php _e('Search Users:') ?> <strong><?php echo stripslashes( $s ); ?></strong></a></p> 
     386                <?php endif; ?> 
    382387 
    383388                <?php 
     
    402407                $posts_columns['control_delete']    = ''; 
    403408 
    404                 $sortby_url = "s=" . $_GET['s'] . "&amp;ip_address=" . $_GET['ip_address']; 
     409                $sortby_url = "s="; 
     410                if( $_GET[ 'blog_ip' ] ) { 
     411                        $sortby_url .= "&ip_address=" . urlencode( $s ); 
     412                } else { 
     413                        $sortby_url .= urlencode( $s ) . "&ip_address=" . urlencode( $s ); 
     414                } 
    405415                ?> 
    406                  
     416 
    407417                <table width="100%" cellpadding="3" cellspacing="3" class="widefat"> 
    408418                        <thead> 
     
    415425                                        } 
    416426                                        $column_link .= "apage={$apage}'>{$column_display_name}</a>"; 
    417                                          
     427 
    418428                                        $col_url = ($column_id == 'users' || $column_id == 'plugins') ? $column_display_name : $column_link; 
    419429                                        ?> 
     
    430440                                        $class = ('alternate' == $class) ? '' : 'alternate'; 
    431441                                        reset( $status_list ); 
    432                                          
     442 
    433443                                        $bgcolour = ""; 
    434444                                        foreach ( $status_list as $status => $col ) { 
     
    438448                                        } 
    439449                                        echo "<tr $bgcolour class='$class'>"; 
    440                                          
     450 
    441451                                        $blogname = ( constant( "VHOST" ) == 'yes' ) ? str_replace('.'.$current_site->domain, '', $blog['domain']) : $blog['path'];  
    442452                                        foreach( $posts_columns as $column_name=>$column_display_name ) { 
     
    571581                        </tbody> 
    572582                </table> 
    573                 </form>                 
     583                </form> 
    574584                </div> 
    575                  
     585 
    576586                <div class="wrap"> 
    577587                        <h2><?php _e('Add Blog') ?></h2> 
     
    579589                                <?php wp_nonce_field('add-blog') ?> 
    580590                                <table class="form-table"> 
    581                                         <tr class="form-field form-required">   
     591                                        <tr class="form-field form-required"> 
    582592                                                <th style="text-align:center;" scope='row'><?php _e('Blog Address') ?></th> 
    583593                                                <td> 
     
    593603                                                <td><input name="blog[title]" type="text" size="20" title="<?php _e('Title') ?>"/></td> 
    594604                                        </tr> 
    595                                         <tr class="form-field form-required">   
     605                                        <tr class="form-field form-required"> 
    596606                                                <th style="text-align:center;" scope='row'><?php _e('Admin Email') ?></th> 
    597607                                                <td><input name="blog[email]" type="text" size="20" title="<?php _e('Email') ?>"/></td> 
  • trunk/wp-admin/wpmu-edit.php

    r1285 r1289  
    2525 
    2626                update_site_option( "WPLANG", $_POST['WPLANG'] ); 
    27                  
     27 
    2828                if( is_email( $_POST['admin_email'] ) ) 
    2929                        update_site_option( "admin_email", $_POST['admin_email'] ); 
    3030 
    31                 $illegal_names = split( ' ', $_POST['illegal_names'] );                 
     31                $illegal_names = split( ' ', $_POST['illegal_names'] ); 
    3232                foreach( (array) $illegal_names as $name ) { 
    3333                        $name = trim( $name ); 
     
    3636                } 
    3737                update_site_option( "illegal_names", $names ); 
    38                  
     38 
    3939                update_site_option( "registration", $_POST['registration'] ); 
    4040                update_site_option( "registrationnotification", $_POST['registrationnotification'] ); 
     
    5050                        update_site_option( "limited_email_domains", '' ); 
    5151                } 
    52                  
     52 
    5353                if( $_POST['banned_email_domains'] != '' ) { 
    5454                        $banned_email_domains = split( "\n", stripslashes( $_POST[ 'banned_email_domains' ] ) ); 
     
    6060                        update_site_option( "banned_email_domains", '' ); 
    6161                } 
    62                  
     62 
    6363                update_site_option( "menu_items", $_POST['menu_items'] ); 
    6464                update_site_option( "blog_upload_space", $_POST['blog_upload_space'] ); 
     
    6868                update_site_option( "welcome_email", $_POST['welcome_email'] ); 
    6969                update_site_option( "fileupload_maxk", $_POST['fileupload_maxk'] ); 
    70                  
     70 
    7171                $site_admins = explode( ' ', str_replace( ",", " ", $_POST['site_admins'] ) ); 
    7272                if ( is_array( $site_admins ) ) { 
     
    8989                exit(); 
    9090        break; 
    91          
     91 
    9292        // Blogs 
    9393        case "addblog": 
     
    9898                $email = wp_specialchars( $blog['email'] ); 
    9999                $title = stripslashes( wp_specialchars( $blog['title'] ) ); 
    100                  
     100 
    101101                if ( empty($domain) || empty($email)) 
    102102                        wp_die( __('Missing blog address or email address.') ); 
    103103                if( !is_email( $email ) )  
    104104                        wp_die( __('Invalid email address') );  
    105                  
     105 
    106106                if( constant('VHOST') == 'yes' ) { 
    107107                        $newdomain = $domain.".".$current_site->domain; 
     
    137137                } 
    138138        break; 
    139          
     139 
    140140        case "updateblog": 
    141141                check_admin_referer('editblog'); 
     
    149149                        $_POST['option']['allowedthemes'] = ''; 
    150150                } 
    151                  
     151 
    152152                if( is_array( $_POST['option'] ) ) { 
    153153                        $c = 1; 
     
    165165                if( get_blog_option( $id, 'siteurl' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ) 
    166166                        update_blog_option( $id, 'siteurl', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ); 
    167                  
     167 
    168168                if( get_blog_option( $id, 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ) 
    169169                        update_blog_option( $id, 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] ); 
    170                  
     170 
    171171                // update blogs table 
    172172                $result = $wpdb->query("UPDATE {$wpdb->blogs} SET 
     
    180180                                spam         = '".$_POST['blog']['spam']."'  
    181181                        WHERE  blog_id = '$id'"); 
    182                          
     182 
    183183                update_blog_status( $id, 'spam', $_POST['blog']['spam'] ); 
    184                  
     184 
    185185                // user roles 
    186186                if( is_array( $_POST['role'] ) == true ) { 
     
    243243                wpmu_admin_do_redirect( "wpmu-blogs.php?action=editblog&updated=true&id=".$id ); 
    244244        break; 
    245          
     245 
    246246        case "deleteblog": 
    247247                check_admin_referer('deleteblog'); 
    248248                if( $id != '0' && $id != '1' ) 
    249249                        wpmu_delete_blog( $id, true ); 
    250                          
     250 
    251251                wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'delete'), $_POST[ 'ref' ] ) ); 
    252252                exit(); 
    253253        break; 
    254          
     254 
    255255        case "allblogs": 
    256256                check_admin_referer('allblogs'); 
     
    275275                exit(); 
    276276        break; 
    277          
     277 
    278278        case "archiveblog": 
    279279                check_admin_referer('archiveblog'); 
     
    283283                exit(); 
    284284        break; 
    285          
     285 
    286286        case "unarchiveblog": 
    287287                check_admin_referer('unarchiveblog'); 
     
    291291                exit(); 
    292292        break; 
    293          
     293 
    294294        case "activateblog": 
    295295                check_admin_referer('activateblog'); 
     
    299299                exit(); 
    300300        break; 
    301          
     301 
    302302        case "deactivateblog": 
    303303                check_admin_referer('deactivateblog'); 
     
    307307                exit(); 
    308308        break; 
    309          
     309 
    310310        case "unspamblog": 
    311311                check_admin_referer('unspamblog'); 
     
    315315                exit(); 
    316316        break; 
    317          
     317 
    318318        case "spamblog": 
    319319                check_admin_referer('spamblog'); 
     
    323323                exit(); 
    324324        break; 
    325          
     325 
    326326        case "mature": 
    327327                update_blog_status( $id, 'mature', '1' ); 
     
    330330                exit(); 
    331331        break; 
    332          
     332 
    333333        case "unmature": 
    334334                update_blog_status( $id, 'mature', '0' ); 
    335335                do_action( 'unmature_blog', $id ); 
    336                  
     336 
    337337                wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'umature'), $_POST['ref'] ) ); 
    338338                exit(); 
    339339        break; 
    340          
     340 
    341341        // Themes 
    342342    case "updatethemes": 
     
    353353                exit(); 
    354354        break; 
    355          
     355 
    356356        // Common 
    357357        case "confirm": 
     
    380380                                        <input type='hidden' name='ref' value='<?php if( isset( $_GET['ref'] ) ) {echo wp_specialchars( $_GET['ref'] ); } else { echo $_SERVER['HTTP_REFERER']; } ?>' /> 
    381381                                        <?php wp_nonce_field( $_GET['action2'] ) ?> 
    382                                         <p>                                             
     382                                        <p>              
    383383                                                <?php echo wp_specialchars( $_GET['msg'] ) ?><br /> 
    384                                                 <input class="button" type='submit' value='<?php _e("Confirm"); ?>' /></p>                                      
     384                                                <input class="button" type='submit' value='<?php _e("Confirm"); ?>' /></p>       
    385385                                </form> 
    386386                        </body> 
     
    388388                <?php 
    389389        break; 
    390          
     390 
    391391        // Users 
    392392        case "deleteuser": 
     
    398398                exit(); 
    399399        break; 
    400          
     400 
    401401        case "allusers": 
    402402                check_admin_referer('allusers'); 
     
    425425                                } 
    426426                        } 
    427                 }               
     427                } 
    428428                wp_redirect( add_query_arg( array('updated' => 'true', 'action' => $userfunction), $_SERVER['HTTP_REFERER'] ) ); 
    429429                exit(); 
    430430        break; 
    431                  
     431 
    432432        case "adduser": 
    433433                check_admin_referer('add-user'); 
     
    455455                exit(); 
    456456        break; 
    457          
     457 
    458458        default: 
    459459                wpmu_admin_do_redirect( "wpmu-admin.php" ); 
    460         break;  
     460        break; 
    461461} 
    462462 
  • trunk/wp-admin/wpmu-options.php

    r1285 r1289  
    2121        <form method="post" action="wpmu-edit.php?action=siteoptions">   
    2222                <?php wp_nonce_field( "siteoptions" ); ?> 
    23                  
     23 
    2424                <h3><?php _e('Operational Settings <em>(These settings cannot be modified by blog owners)</em>') ?></h3>  
    2525                <table class="form-table"> 
     
    3232                                </td>  
    3333                        </tr>  
    34                          
     34 
    3535                        <tr valign="top">  
    3636                                <th scope="row"><?php _e('Site Admin Email') ?></th>  
     
    4141                                </td> 
    4242                        </tr>  
    43                          
     43 
    4444                        <tr valign="top">  
    4545                                <th scope="row"><?php _e('Allow new registrations') ?></th>  
     
    5656                                </td>  
    5757                        </tr>  
    58                          
     58 
    5959                        <tr valign="top">  
    6060                                <th scope="row"><?php _e('Registration notification') ?></th>  
     
    6969                                </td>  
    7070                        </tr>  
    71                          
     71 
    7272                        <tr valign="top">  
    7373                                <th scope="row"><?php _e('Welcome Email') ?></th>  
     
    7878                                </td>  
    7979                        </tr>  
    80                          
     80 
    8181                        <tr valign="top">  
    8282                                <th scope="row"><?php _e('First Post') ?></th>  
     
    8787                                </td>  
    8888                        </tr>  
    89                          
     89 
    9090                        <tr valign="top">  
    9191                                <th scope="row"><?php _e('Banned Names') ?></th>  
     
    9696                                </td>  
    9797                        </tr>  
    98                          
     98 
    9999                        <tr valign="top"> 
    100100                                <th scope="row"><?php _e('Limited Email Registrations') ?></th>  
     
    107107                                </td>  
    108108                        </tr>  
    109                          
     109 
    110110                        <tr valign="top">  
    111111                                <th scope="row"><?php _e('Banned Email Domains') ?></th>  
     
    116116                                </td>  
    117117                        </tr> 
    118                          
     118 
    119119                        <tr valign="top">  
    120120                                <th scope="row"><?php _e('Blog upload space') ?></th>  
    121121                                <td><input name="blog_upload_space" type="text" id="blog_upload_space" value="<?php echo get_site_option('blog_upload_space', 10) ?>" size="3" /> MB</td> 
    122122                        </tr> 
    123                          
     123 
    124124                        <tr valign="top">  
    125125                                <th scope="row"><?php _e('Upload File Types') ?></th>  
    126126                                <td><input name="upload_filetypes" type="text" id="upload_filetypes" value="<?php echo get_site_option('upload_filetypes', 'jpg jpeg png gif') ?>" size="45" /></td> 
    127127                        </tr> 
    128                          
     128 
    129129                        <tr valign="top">  
    130130                                <th scope="row"><?php _e('Max upload file size') ?></th>  
     
    132132                        </tr>  
    133133                </table> 
    134                  
    135                 <h3><?php _e('Administration Settings') ?></h3>         
     134 
     135                <h3><?php _e('Administration Settings') ?></h3>  
    136136                <table class="form-table"> 
    137137                        <tr valign="top">  
     
    144144                        </tr>  
    145145                </table> 
    146                  
     146 
    147147                <h3><?php _e('Site Wide Settings <em>(These settings may be overridden by blog owners)</em>') ?></h3>  
    148148                <table class="form-table"> 
     
    167167                        ?> 
    168168                </table> 
    169                  
     169 
    170170                <h3><?php _e('Menus <em>(Enable or disable WP Backend Menus)</em>') ?></h3>  
    171171                <table class="form-table"> 
     
    185185 
    186186                <?php do_action( 'wpmu_options' ); // Add more options here ?> 
    187                  
     187 
    188188                <p class="submit">  
    189189                        <input type="submit" name="Submit" value="<?php _e('Update Options') ?>" /></p>  
  • trunk/wp-admin/wpmu-themes.php

    r1278 r1289  
    2222        <form action='wpmu-edit.php?action=updatethemes' method='post'> 
    2323                <h2><?php _e('Site Themes') ?></h2> 
    24                 <p><?php _e('Disable themes site-wide. You can enable themes on a blog by blog basis.') ?></p>          
     24                <p><?php _e('Disable themes site-wide. You can enable themes on a blog by blog basis.') ?></p> 
    2525                <table class="widefat"> 
    2626                        <thead> 
     
    3838                                $class = ('alt' == $class) ? '' : 'alt'; 
    3939                                $class1 = $enabled = $disabled = ''; 
    40                                 
     40                 
    4141                                if( isset( $allowed_themes[ $theme_key ] ) == true ) { 
    4242                                        $enabled = 'checked="checked" '; 
     
    5959                        </tbody> 
    6060                </table> 
    61                  
     61 
    6262                <p class="submit"> 
    6363                        <input type='submit' value='<?php _e('Update Themes &raquo;') ?>' /></p> 
  • trunk/wp-admin/wpmu-upgrade-site.php

    r1261 r1289  
    2020        case "upgrade": 
    2121                $n = ( isset($_GET['n']) ) ? intval($_GET['n']) : 0; 
    22                  
     22 
    2323                $blogs = $wpdb->get_results( "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' AND spam = '0' AND deleted = '0' AND archived = '0' ORDER BY registered DESC LIMIT {$n}, 5", ARRAY_A ); 
    2424                if( is_array( $blogs ) ) { 
     
    5858                } 
    5959        break; 
    60          
     60 
    6161        default: ?> 
    6262                <p><?php _e("You can upgrade all the blogs on your site through this page. It works by calling the upgrade script of each blog automatically. Hit the link below to upgrade."); ?></p> 
  • trunk/wp-admin/wpmu-users.php

    r1270 r1289  
    4141        $apage = isset( $_GET['apage'] ) ? intval( $_GET['apage'] ) : 1; 
    4242        $num = isset( $_GET['num'] ) ? intval( $_GET['num'] ) : 15; 
     43        $s = wp_specialchars( trim( $_GET[ 's' ] ) ); 
    4344 
    4445        $query = "SELECT * FROM {$wpdb->users}"; 
    45          
    46         if( !empty($_GET['s']) ) { 
    47                 $search = '%' . trim(addslashes($_GET['s'])) . '%'; 
     46 
     47        if( !empty( $s ) ) { 
     48                $search = '%' . trim( $s ) . '%'; 
    4849                $query .= " WHERE user_login LIKE '$search' OR user_email LIKE '$search'"; 
    4950        } 
    50          
     51 
    5152        if( !isset($_GET['sortby']) ) { 
    5253                $_GET['sortby'] = 'id'; 
    5354        } 
    54          
     55 
    5556        if( $_GET['sortby'] == 'email' ) { 
    5657                $query .= ' ORDER BY user_email '; 
     
    6465                $query .= ' ORDER BY user_registered '; 
    6566        } 
    66          
     67 
    6768        $query .= ( $_GET['order'] == 'DESC' ) ? 'DESC' : 'ASC'; 
    6869 
    69         if( !empty($_GET['s'])) { 
     70        if( !empty( $s )) { 
    7071                $user_list = $wpdb->get_results( $query, ARRAY_A ); 
    71                 $total = count($user_list);     
     72                $total = count($user_list); 
    7273        } else { 
    7374                $total = $wpdb->get_var( "SELECT COUNT(*) FROM {$wpdb->users}"); 
    7475        } 
    75          
     76 
    7677        $query .= " LIMIT " . intval( ( $apage - 1 ) * $num) . ", " . intval( $num ); 
    77          
     78 
    7879        $user_list = $wpdb->get_results( $query, ARRAY_A ); 
    7980 
     
    8889        <h2><?php _e("Users"); ?></h2> 
    8990        <form action="wpmu-users.php" method="get" style="position:absolute;right:0;top:0;">  
    90                 <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes(wp_specialchars($_GET['s'], 1)); ?>" size="17" /> 
     91                <input type="text" name="s" value="<?php if (isset($_GET['s'])) echo stripslashes( $s ); ?>" size="17" /> 
    9192                <input type="submit" id="post-query-submit" value="<?php _e('Search Users') ?>" class="button" /> 
    9293        </form> 
     
    9495        <form id="form-user-list" action='wpmu-edit.php?action=allusers' method='post'> 
    9596                <div class="tablenav"> 
    96                         <?php if ( $user_navigation ) echo "<div class='tablenav-pages'>$user_navigation</div>"; ?>     
     97                        <?php if ( $user_navigation ) echo "<div class='tablenav-pages'>$user_navigation</div>"; ?> 
    9798 
    9899                        <div class="alignleft">