<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" /><style type="text/css"><!--
#msg dl { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fc0 solid; padding: 6px; }
#msg ul, pre { overflow: auto; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<title>[12632] trunk: Strip trailing whites from ms files.</title>
</head>
<body>

<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12632">12632</a></dd>
<dt>Author</dt> <dd>ryan</dd>
<dt>Date</dt> <dd>2010-01-07 04:27:46 +0000 (Thu, 07 Jan 2010)</dd>
</dl>

<h3>Log Message</h3>
<pre>Strip trailing whites from ms files. see <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminincludesmsphp">trunk/wp-admin/includes/ms.php</a></li>
<li><a href="#trunkwpadminmsadminphp">trunk/wp-admin/ms-admin.php</a></li>
<li><a href="#trunkwpadminmseditphp">trunk/wp-admin/ms-edit.php</a></li>
<li><a href="#trunkwpadminmsoptionsphp">trunk/wp-admin/ms-options.php</a></li>
<li><a href="#trunkwpadminmssitesphp">trunk/wp-admin/ms-sites.php</a></li>
<li><a href="#trunkwpadminmsupgradesitephp">trunk/wp-admin/ms-upgrade-site.php</a></li>
<li><a href="#trunkwpadminmsusersphp">trunk/wp-admin/ms-users.php</a></li>
<li><a href="#trunkwpincludesmsfunctionsphp">trunk/wp-includes/ms-functions.php</a></li>
<li><a href="#trunkwpincludesmssettingsphp">trunk/wp-includes/ms-settings.php</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadminincludesmsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/includes/ms.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/includes/ms.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/includes/ms.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -47,8 +47,8 @@
</span><span class="cx">         update_blog_status( $blog_id, 'deleted', 1 );
</span><span class="cx"> 
</span><span class="cx">         if ( $drop ) {
</span><del>-                $drop_tables = $wpdb-&gt;get_results(&quot;show tables LIKE '&quot;. $wpdb-&gt;base_prefix . $blog_id . &quot;\_%'&quot;, ARRAY_A); 
-                $drop_tables = apply_filters( 'wpmu_drop_tables', $drop_tables ); 
</del><ins>+                $drop_tables = $wpdb-&gt;get_results(&quot;show tables LIKE '&quot;. $wpdb-&gt;base_prefix . $blog_id . &quot;\_%'&quot;, ARRAY_A);
+                $drop_tables = apply_filters( 'wpmu_drop_tables', $drop_tables );
</ins><span class="cx"> 
</span><span class="cx">                 reset( $drop_tables );
</span><span class="cx">                 foreach ( (array) $drop_tables as $drop_table) {
</span><span class="lines">@@ -219,10 +219,10 @@
</span><span class="cx">                 &quot;newemail&quot; =&gt; $value
</span><span class="cx">         );
</span><span class="cx">         update_option( 'adminhash', $new_admin_email );
</span><del>-        
</del><ins>+
</ins><span class="cx">         $content = apply_filters( 'new_admin_email_content', __(&quot;Dear user,
</span><span class="cx"> 
</span><del>-You recently requested to have the administration email address on 
</del><ins>+You recently requested to have the administration email address on
</ins><span class="cx"> your blog changed.
</span><span class="cx"> If this is correct, please click on the following link to change it:
</span><span class="cx"> ###ADMIN_URL###
</span><span class="lines">@@ -235,12 +235,12 @@
</span><span class="cx"> Regards,
</span><span class="cx"> All at ###SITENAME###
</span><span class="cx"> ###SITEURL###&quot;), $new_admin_email );
</span><del>-        
</del><ins>+
</ins><span class="cx">         $content = str_replace('###ADMIN_URL###', clean_url(get_option( &quot;siteurl&quot; ).'/wp-admin/options.php?adminhash='.$hash), $content);
</span><span class="cx">         $content = str_replace('###EMAIL###', $value, $content);
</span><span class="cx">         $content = str_replace('###SITENAME###', get_site_option( 'site_name' ), $content);
</span><span class="cx">         $content = str_replace('###SITEURL###', 'http://' . $current_site-&gt;domain . $current_site-&gt;path, $content);
</span><del>-        
</del><ins>+
</ins><span class="cx">         wp_mail( $value, sprintf(__('[%s] New Admin Email Address'), get_option('blogname')), $content );
</span><span class="cx"> }
</span><span class="cx"> add_action('update_option_new_admin_email', 'update_option_new_admin_email', 10, 2);
</span><span class="lines">@@ -354,7 +354,7 @@
</span><span class="cx"> 
</span><span class="cx"> function get_space_allowed() {
</span><span class="cx">         $spaceAllowed = get_option(&quot;blog_upload_space&quot;);
</span><del>-        if( $spaceAllowed == false ) 
</del><ins>+        if( $spaceAllowed == false )
</ins><span class="cx">                 $spaceAllowed = get_site_option(&quot;blog_upload_space&quot;);
</span><span class="cx">         if( empty($spaceAllowed) || !is_numeric($spaceAllowed) )
</span><span class="cx">                 $spaceAllowed = 50;
</span><span class="lines">@@ -376,12 +376,12 @@
</span><span class="cx">                 $space .= __('MB');
</span><span class="cx">         }
</span><span class="cx">         ?&gt;
</span><del>-        &lt;strong&gt;&lt;?php printf(__('Used: %1s%% of %2s'), number_format($percentused), $space );?&gt;&lt;/strong&gt; 
</del><ins>+        &lt;strong&gt;&lt;?php printf(__('Used: %1s%% of %2s'), number_format($percentused), $space );?&gt;&lt;/strong&gt;
</ins><span class="cx">         &lt;?php
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Display File upload quota on dashboard
</span><del>-function dashboard_quota() {        
</del><ins>+function dashboard_quota() {
</ins><span class="cx">         if ( get_site_option( 'upload_space_check_disabled' ) ) {
</span><span class="cx">                 return true;
</span><span class="cx">         }
</span><span class="lines">@@ -412,10 +412,10 @@
</span><span class="cx"> 
</span><span class="cx"> // Edit blog upload space setting on Edit Blog page
</span><span class="cx"> function upload_space_setting( $id ) {
</span><del>-        $quota = get_blog_option($id, &quot;blog_upload_space&quot;); 
</del><ins>+        $quota = get_blog_option($id, &quot;blog_upload_space&quot;);
</ins><span class="cx">         if( !$quota )
</span><span class="cx">                 $quota = '';
</span><del>-        
</del><ins>+
</ins><span class="cx">         ?&gt;
</span><span class="cx">         &lt;tr&gt;
</span><span class="cx">                 &lt;th&gt;&lt;?php _e('Blog Upload Space Quota'); ?&gt;&lt;/th&gt;
</span><span class="lines">@@ -432,9 +432,9 @@
</span><span class="cx"> 
</span><span class="cx">         if( $refresh == 1 )
</span><span class="cx">                 refresh_user_details($id);
</span><del>-        
</del><ins>+
</ins><span class="cx">         if( $pref == 'spam' ) {
</span><del>-                if( $value == 1 ) 
</del><ins>+                if( $value == 1 )
</ins><span class="cx">                         do_action( &quot;make_spam_user&quot;, $id );
</span><span class="cx">                 else
</span><span class="cx">                         do_action( &quot;make_ham_user&quot;, $id );
</span><span class="lines">@@ -445,7 +445,7 @@
</span><span class="cx"> 
</span><span class="cx"> function refresh_user_details($id) {
</span><span class="cx">         $id = (int) $id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( !$user = get_userdata( $id ) )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><span class="lines">@@ -464,8 +464,8 @@
</span><span class="cx">         $spaceAllowed = get_space_allowed();
</span><span class="cx"> 
</span><span class="cx">         $dirName = trailingslashit( BLOGUPLOADDIR );
</span><del>-        if (!(is_dir($dirName) &amp;&amp; is_readable($dirName))) 
-                return; 
</del><ins>+        if (!(is_dir($dirName) &amp;&amp; is_readable($dirName)))
+                return;
</ins><span class="cx"> 
</span><span class="cx">           $dir = dir($dirName);
</span><span class="cx">            $size = 0;
</span><span class="lines">@@ -512,7 +512,7 @@
</span><span class="cx">         $c = 0;
</span><span class="cx">         if ( isset( $_GET[ 'c' ] ) )
</span><span class="cx">                 $c = (int)$_GET[ 'c' ];
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $c &gt;= 5 ) {
</span><span class="cx">                 wp_die( __( &quot;You don&amp;#8217;t have permission to view this blog. Please contact the system administrator.&quot; ) );
</span><span class="cx">         }
</span><span class="lines">@@ -521,13 +521,13 @@
</span><span class="cx">         $blog = get_active_blog_for_user( $current_user-&gt;ID );
</span><span class="cx">         $dashboard_blog = get_dashboard_blog();
</span><span class="cx">         if( is_object( $blog ) ) {
</span><del>-                $protocol = ( is_ssl() ? 'https://' : 'http://' ); 
</del><ins>+                $protocol = ( is_ssl() ? 'https://' : 'http://' );
</ins><span class="cx">                 wp_redirect( $protocol . $blog-&gt;domain . $blog-&gt;path . 'wp-admin/?c=' . $c ); // redirect and count to 5, &quot;just in case&quot;
</span><span class="cx">                 exit;
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        /* 
-           If the user is a member of only 1 blog and the user's primary_blog isn't set to that blog, 
</del><ins>+        /*
+           If the user is a member of only 1 blog and the user's primary_blog isn't set to that blog,
</ins><span class="cx">            then update the primary_blog record to match the user's blog
</span><span class="cx">          */
</span><span class="cx">         $blogs = get_blogs_of_user( $current_user-&gt;ID );
</span><span class="lines">@@ -540,7 +540,7 @@
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="cx">                 $blog = get_blog_details( get_usermeta( $current_user-&gt;ID , 'primary_blog' ) );
</span><del>-                $protocol = ( is_ssl() ? 'https://' : 'http://' ); 
</del><ins>+                $protocol = ( is_ssl() ? 'https://' : 'http://' );
</ins><span class="cx">                 wp_redirect( $protocol . $blog-&gt;domain . $blog-&gt;path . 'wp-admin/?c=' . $c ); // redirect and count to 5, &quot;just in case&quot;
</span><span class="cx">                 exit;
</span><span class="cx">         }
</span><span class="lines">@@ -558,7 +558,7 @@
</span><span class="cx">         } else {
</span><span class="cx">                 $writing = array( 'ping_sites', 'mailserver_login', 'mailserver_pass', 'default_email_category', 'mailserver_port', 'mailserver_url' );
</span><span class="cx">         }
</span><del>-        $removed = array( 
</del><ins>+        $removed = array(
</ins><span class="cx">                 'general' =&gt; array( 'siteurl', 'home', 'admin_email', 'users_can_register', 'default_role' ),
</span><span class="cx">                 'reading' =&gt; array( 'gzipcompression' ),
</span><span class="cx">                 'writing' =&gt; $writing,
</span><span class="lines">@@ -584,12 +584,12 @@
</span><span class="cx"> // See &quot;import_allow_fetch_attachments&quot; and &quot;import_attachment_size_limit&quot; filters too.
</span><span class="cx"> 
</span><span class="cx"> function mu_dropdown_languages( $lang_files = array(), $current = '' ) {
</span><del>-        $flag = false;        
</del><ins>+        $flag = false;
</ins><span class="cx">         $output = array();
</span><del>-                                        
</del><ins>+
</ins><span class="cx">         foreach ( (array) $lang_files as $val ) {
</span><span class="cx">                 $code_lang = basename( $val, '.mo' );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if ( $code_lang == 'en_US' ) { // American English
</span><span class="cx">                         $flag = true;
</span><span class="cx">                         $ae = __('American English');
</span><span class="lines">@@ -602,18 +602,18 @@
</span><span class="cx">                         $translated = format_code_lang($code_lang);
</span><span class="cx">                         $output[$translated] =  '&lt;option value=&quot;'.$code_lang.'&quot;'.(($current == $code_lang) ? ' selected=&quot;selected&quot;' : '').'&gt; '.$translated.'&lt;/option&gt;';
</span><span class="cx">                 }
</span><del>-                
-        }                                                
-        
</del><ins>+
+        }
+
</ins><span class="cx">         if ( $flag === false ) { // WordPress english
</span><span class="cx">                 $output[] = '&lt;option value=&quot;&quot;'.((empty($current)) ? ' selected=&quot;selected&quot;' : '').'&gt;'.__('English').&quot;&lt;/option&gt;&quot;;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Order by name
</span><span class="cx">         uksort($output, 'strnatcasecmp');
</span><del>-        
-        $output = apply_filters('mu_dropdown_languages', $output, $lang_files, $current);        
-        echo implode(&quot;\n\t&quot;, $output);        
</del><ins>+
+        $output = apply_filters('mu_dropdown_languages', $output, $lang_files, $current);
+        echo implode(&quot;\n\t&quot;, $output);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // Only show &quot;Media&quot; upload icon
</span><span class="lines">@@ -762,10 +762,10 @@
</span><span class="cx"> function activate_sitewide_plugin() {
</span><span class="cx">         if ( !isset( $_GET['sitewide'] ) )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         /* Add the plugin to the list of sitewide active plugins */
</span><span class="cx">         $active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
</span><del>-        
</del><ins>+
</ins><span class="cx">         /* Add the activated plugin to the list */
</span><span class="cx">         $active_sitewide_plugins[ $_GET['plugin'] ] = time();
</span><span class="cx"> 
</span><span class="lines">@@ -775,7 +775,7 @@
</span><span class="cx"> 
</span><span class="cx">         return true;
</span><span class="cx"> }
</span><del>-add_action( 'activate_' . $_GET['plugin'], 'activate_sitewide_plugin' ); 
</del><ins>+add_action( 'activate_' . $_GET['plugin'], 'activate_sitewide_plugin' );
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * deactivate_sitewide_plugin()
</span><span class="lines">@@ -785,7 +785,7 @@
</span><span class="cx"> function deactivate_sitewide_plugin( $plugin = false ) {
</span><span class="cx">         if ( !$plugin )
</span><span class="cx">                 $plugin = $_GET['plugin'];
</span><del>-                
</del><ins>+
</ins><span class="cx">         /* Get the active sitewide plugins */
</span><span class="cx">         $active_sitewide_plugins = (array) maybe_unserialize( get_site_option( 'active_sitewide_plugins' ) );
</span><span class="cx"> 
</span><span class="lines">@@ -797,11 +797,11 @@
</span><span class="cx"> 
</span><span class="cx">         if ( !update_site_option( 'active_sitewide_plugins', $active_sitewide_plugins ) )
</span><span class="cx">                 wp_redirect( 'plugins.php?error=true' );
</span><del>-        
</del><ins>+
</ins><span class="cx">         return true;
</span><span class="cx"> }
</span><del>-add_action( 'deactivate_' . $_GET['plugin'], 'deactivate_sitewide_plugin' ); 
-add_action( 'deactivate_invalid_plugin', 'deactivate_sitewide_plugin' ); 
</del><ins>+add_action( 'deactivate_' . $_GET['plugin'], 'deactivate_sitewide_plugin' );
+add_action( 'deactivate_invalid_plugin', 'deactivate_sitewide_plugin' );
</ins><span class="cx"> 
</span><span class="cx"> /**
</span><span class="cx">  * add_sitewide_activate_row()
</span><span class="lines">@@ -811,13 +811,13 @@
</span><span class="cx"> function add_sitewide_activate_row( $file, $plugin_data, $context ) {
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( 'sitewide-active' == $context )
</span><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( is_plugin_active( $file ) )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         echo '&lt;tr&gt;&lt;td colspan=&quot;5&quot; style=&quot;background: #f5f5f5; text-align: right;&quot;&gt;';
</span><span class="cx"> 
</span><span class="cx">         echo '&lt;a href=&quot;' . wp_nonce_url( admin_url( 'plugins.php?action=activate&amp;amp;sitewide=1&amp;amp;plugin=' . $file ), 'activate-plugin_' . $file ) . '&quot; title=&quot;' . __( 'Activate this plugin for all blogs across the entire network' ) . '&quot;&gt;&amp;uarr; ' . sprintf( __( 'Activate %s Site Wide' ), strip_tags( $plugin_data[&quot;Title&quot;] ) ) . '&lt;/a&gt;';
</span><span class="lines">@@ -834,13 +834,13 @@
</span><span class="cx"> function is_wpmu_sitewide_plugin( $file ) {
</span><span class="cx">         /* Open the plugin file for reading to check if this is a ms-plugin. */
</span><span class="cx">         $fp = @fopen( WP_PLUGIN_DIR . '/' . $file, 'r' );
</span><del>-        
</del><ins>+
</ins><span class="cx">         /* Pull only the first 8kiB of the file in. */
</span><span class="cx">         $plugin_data = @fread( $fp, 8192 );
</span><del>-        
</del><ins>+
</ins><span class="cx">         /* PHP will close file handle, but we are good citizens. */
</span><span class="cx">         @fclose($fp);
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( preg_match( '|Site Wide Only:(.*)true$|mi', $plugin_data ) )
</span><span class="cx">                 return true;
</span><span class="cx"> 
</span><span class="lines">@@ -858,14 +858,14 @@
</span><span class="cx"> 
</span><span class="cx">         if ( !is_site_admin() )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         $active_sitewide_plugins = maybe_unserialize( get_site_option( 'active_sitewide_plugins') );
</span><span class="cx">         $context = 'sitewide-active';
</span><span class="cx"> 
</span><del>-        if ( $active_sitewide_plugins ) { 
</del><ins>+        if ( $active_sitewide_plugins ) {
</ins><span class="cx"> ?&gt;
</span><span class="cx">                 &lt;h3&gt;&lt;?php _e( 'Currently Active Site Wide Plugins' ) ?&gt;&lt;/h3&gt;
</span><del>-        
</del><ins>+
</ins><span class="cx">                 &lt;p&gt;&lt;?php _e( 'Plugins that appear in the list below are activate for all blogs across this installation.' ) ?&gt;&lt;/p&gt;
</span><span class="cx"> 
</span><span class="cx">                 &lt;table class=&quot;widefat&quot; cellspacing=&quot;0&quot; id=&quot;&lt;?php echo $context ?&gt;-plugins-table&quot;&gt;
</span><span class="lines">@@ -898,7 +898,7 @@
</span><span class="cx">                                 $action_links = apply_filters( &quot;plugin_action_links_$plugin_file&quot;, $action_links, $plugin_file, $plugin_data, $context );
</span><span class="cx"> 
</span><span class="cx">                                 $plugin_data = $all_plugins[$plugin_file];
</span><del>-                                
</del><ins>+
</ins><span class="cx">                                 echo &quot;
</span><span class="cx">                         &lt;tr class='$context' style='background: #eef2ff;'&gt;
</span><span class="cx">                                 &lt;th scope='row' class='check-column'&gt;&amp;nbsp;&lt;/th&gt;
</span><span class="lines">@@ -931,16 +931,16 @@
</span><span class="cx">                                 echo implode(' | ', $plugin_meta);
</span><span class="cx">                                 echo &quot;&lt;/td&gt;
</span><span class="cx">                         &lt;/tr&gt;\n&quot;;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                                 do_action( 'after_plugin_row', $plugin_file, $plugin_data, $context );
</span><span class="cx">                                 do_action( &quot;after_plugin_row_$plugin_file&quot;, $plugin_file, $plugin_data, $context );
</span><span class="cx">                         }
</span><span class="cx">                 ?&gt;
</span><span class="cx">                         &lt;/tbody&gt;
</span><span class="cx">                 &lt;/table&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 &lt;p&gt;&lt;?php _e( 'Plugins that are enabled site wide can only be disabled by a site administrator.' ) ?&gt;&lt;/p&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx"> &lt;?php
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -959,14 +959,14 @@
</span><span class="cx">                 unset( $inactive_plugins[ $sitewide_plugin ] );
</span><span class="cx">         }
</span><span class="cx"> 
</span><del>-        /* Now unset any sitewide only plugins if the user is not a site admin */        
</del><ins>+        /* Now unset any sitewide only plugins if the user is not a site admin */
</ins><span class="cx">         if ( !is_site_admin() ) {
</span><span class="cx">                 foreach ( $inactive_plugins as $plugin_name =&gt; $activated_time ) {
</span><span class="cx">                         if ( is_wpmu_sitewide_plugin( $plugin_name ) )
</span><span class="cx">                                 unset( $inactive_plugins[ $plugin_name ] );
</span><span class="cx">                 }
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         return $inactive_plugins;
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'all_plugins', 'sitewide_filter_inactive_plugins_list' );
</span><span class="lines">@@ -983,7 +983,7 @@
</span><span class="cx">         foreach ( $active_sitewide_plugins as $sitewide_plugin =&gt; $activated_time ) {
</span><span class="cx">                 unset( $active_plugins[ $sitewide_plugin ] );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         return $active_plugins;
</span><span class="cx"> }
</span><span class="cx"> add_filter( 'all_plugins', 'sitewide_filter_active_plugins_list' );
</span><span class="lines">@@ -996,12 +996,12 @@
</span><span class="cx">  */
</span><span class="cx"> function check_is_wpmu_plugin_on_activate() {
</span><span class="cx">         /***
</span><del>-         * On plugin activation on a blog level, check to see if this is actually a 
</del><ins>+         * On plugin activation on a blog level, check to see if this is actually a
</ins><span class="cx">          * site wide MU plugin. If so, deactivate and activate it site wide.
</span><span class="cx">          */
</span><span class="cx">         if ( is_wpmu_sitewide_plugin( $_GET['plugin'] ) || isset( $_GET['sitewide'] ) ) {
</span><span class="cx">                 deactivate_plugins( $_GET['plugin'], true );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 /* Silently activate because the activate_* hook has already run. */
</span><span class="cx">                 if ( is_site_admin() ) {
</span><span class="cx">                         $_GET['sitewide'] = true;
</span><span class="lines">@@ -1022,7 +1022,7 @@
</span><span class="cx"> 
</span><span class="cx">                                 if ( is_site_admin() )
</span><span class="cx">                                         activate_sitewide_plugin( $plugin );
</span><del>-                        }                        
</del><ins>+                        }
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -1050,10 +1050,10 @@
</span><span class="cx">                         $found = false;
</span><span class="cx">                         ?&gt;
</span><span class="cx">                         &lt;select name=&quot;primary_blog&quot;&gt;
</span><del>-                                &lt;?php foreach( (array) $all_blogs as $blog ) { 
</del><ins>+                                &lt;?php foreach( (array) $all_blogs as $blog ) {
</ins><span class="cx">                                         if( $primary_blog == $blog-&gt;userblog_id )
</span><span class="cx">                                                 $found = true;
</span><del>-                                        ?&gt;&lt;option value='&lt;?php echo $blog-&gt;userblog_id ?&gt;'&lt;?php if( $primary_blog == $blog-&gt;userblog_id ) echo ' selected=&quot;selected&quot;' ?&gt;&gt;http://&lt;?php echo $blog-&gt;domain.$blog-&gt;path ?&gt;&lt;/option&gt;&lt;?php 
</del><ins>+                                        ?&gt;&lt;option value='&lt;?php echo $blog-&gt;userblog_id ?&gt;'&lt;?php if( $primary_blog == $blog-&gt;userblog_id ) echo ' selected=&quot;selected&quot;' ?&gt;&gt;http://&lt;?php echo $blog-&gt;domain.$blog-&gt;path ?&gt;&lt;/option&gt;&lt;?php
</ins><span class="cx">                                 } ?&gt;
</span><span class="cx">                         &lt;/select&gt;
</span><span class="cx">                         &lt;?php
</span><span class="lines">@@ -1073,7 +1073,7 @@
</span><span class="cx">                 &lt;/td&gt;
</span><span class="cx">         &lt;/tr&gt;
</span><span class="cx">         &lt;/table&gt;
</span><del>-        &lt;?php        
</del><ins>+        &lt;?php
</ins><span class="cx"> }
</span><span class="cx"> add_action ( 'myblogs_allblogs_options', 'choose_primary_blog' );
</span><span class="cx"> 
</span><span class="lines">@@ -1144,7 +1144,7 @@
</span><span class="cx">         &lt;form id=&quot;myblogs&quot; action=&quot;&quot; method=&quot;post&quot;&gt;
</span><span class="cx">         &lt;?php
</span><span class="cx">         do_action( 'myblogs_allblogs_options' );
</span><del>-        ?&gt;&lt;table class='widefat'&gt; &lt;?php 
</del><ins>+        ?&gt;&lt;table class='widefat'&gt; &lt;?php
</ins><span class="cx">         $settings_html = apply_filters( 'myblogs_options', '', 'global' );
</span><span class="cx">         if ( $settings_html != '' ) {
</span><span class="cx">                 echo &quot;&lt;tr&gt;&lt;td valign='top'&gt;&lt;h3&gt;&quot; . __( 'Global Settings' ) . &quot;&lt;/h3&gt;&lt;/td&gt;&lt;td&gt;&quot;;
</span><span class="lines">@@ -1165,7 +1165,7 @@
</span><span class="cx">                 $rows[] = array_slice( $blogs, $split, $cols );
</span><span class="cx">                 $split = $split + $cols;
</span><span class="cx">         }
</span><del>-  
</del><ins>+
</ins><span class="cx">         foreach( $rows as $row ) {
</span><span class="cx">                 $c = $c == &quot;alternate&quot; ? &quot;&quot; : &quot;alternate&quot;;
</span><span class="cx">                 echo &quot;&lt;tr class='$c'&gt;&quot;;
</span><span class="lines">@@ -1216,8 +1216,8 @@
</span><span class="cx">                 while( $rows = $wpdb-&gt;get_results( &quot;SELECT meta_key, meta_value FROM {$wpdb-&gt;sitemeta} ORDER BY meta_id LIMIT $start, 20&quot; ) ) {
</span><span class="cx">                         foreach( $rows as $row ) {
</span><span class="cx">                                 $value = $row-&gt;meta_value;
</span><del>-                                if ( !@unserialize( $value ) ) 
-                                        $value = stripslashes( $value ); 
</del><ins>+                                if ( !@unserialize( $value ) )
+                                        $value = stripslashes( $value );
</ins><span class="cx">                                 if ( $value !== $row-&gt;meta_value ) {
</span><span class="cx">                                         update_site_option( $row-&gt;meta_key, $value );
</span><span class="cx">                                 }
</span><span class="lines">@@ -1230,8 +1230,8 @@
</span><span class="cx">         while( $rows = $wpdb-&gt;get_results( &quot;SELECT option_name, option_value FROM $options_table ORDER BY option_id LIMIT $start, 20&quot; ) ) {
</span><span class="cx">                 foreach( $rows as $row ) {
</span><span class="cx">                         $value = $row-&gt;option_value;
</span><del>-                        if ( !@unserialize( $value ) ) 
-                                $value = stripslashes( $value ); 
</del><ins>+                        if ( !@unserialize( $value ) )
+                                $value = stripslashes( $value );
</ins><span class="cx">                         if ( $value !== $row-&gt;option_value ) {
</span><span class="cx">                                 update_blog_option( $blog_id, $row-&gt;option_name, $value );
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkwpadminmsadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-admin.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-admin.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-admin.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -30,7 +30,7 @@
</span><span class="cx"> ?&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;wrap&quot;&gt;
</span><del>-        &lt;h2&gt;&lt;?php echo wp_specialchars( $title ); ?&gt;&lt;/h2&gt; 
</del><ins>+        &lt;h2&gt;&lt;?php echo wp_specialchars( $title ); ?&gt;&lt;/h2&gt;
</ins><span class="cx"> 
</span><span class="cx">         &lt;ul class=&quot;subsubsub&quot;&gt;
</span><span class="cx">         &lt;li&gt;&lt;a href=&quot;ms-blogs.php#form-add-blog&quot; class=&quot;rbutton&quot;&gt;&lt;strong&gt;&lt;?php _e('Create a New Blog'); ?&gt;&lt;/strong&gt;&lt;/a&gt; | &lt;/li&gt;
</span><span class="lines">@@ -44,9 +44,9 @@
</span><span class="cx">         &lt;form name=&quot;searchform&quot; action=&quot;ms-users.php&quot; method=&quot;get&quot;&gt;
</span><span class="cx">                 &lt;p&gt;
</span><span class="cx">                         &lt;input type=&quot;hidden&quot; name=&quot;action&quot; value=&quot;users&quot; /&gt;
</span><del>-                        &lt;input type=&quot;text&quot; name=&quot;s&quot; value=&quot;&quot; size=&quot;17&quot; /&gt; 
</del><ins>+                        &lt;input type=&quot;text&quot; name=&quot;s&quot; value=&quot;&quot; size=&quot;17&quot; /&gt;
</ins><span class="cx">                         &lt;input class=&quot;button&quot; type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;&lt;?php esc_attr_e(&quot;Search Users&quot;); ?&gt;&quot; /&gt;
</span><del>-                &lt;/p&gt; 
</del><ins>+                &lt;/p&gt;
</ins><span class="cx">         &lt;/form&gt;
</span><span class="cx"> 
</span><span class="cx">         &lt;form name=&quot;searchform&quot; action=&quot;ms-blogs.php&quot; method=&quot;get&quot;&gt;
</span></span></pre></div>
<a id="trunkwpadminmseditphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-edit.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-edit.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-edit.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -10,10 +10,10 @@
</span><span class="cx"> 
</span><span class="cx"> do_action('wpmuadminedit', '');
</span><span class="cx"> 
</span><del>-if( isset($_GET[ 'id' ]) ) { 
-        $id = intval( $_GET[ 'id' ] ); 
-} elseif( isset($_POST[ 'id' ]) ) { 
-        $id = intval( $_POST[ 'id' ] ); 
</del><ins>+if( isset($_GET[ 'id' ]) ) {
+        $id = intval( $_GET[ 'id' ] );
+} elseif( isset($_POST[ 'id' ]) ) {
+        $id = intval( $_POST[ 'id' ] );
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> if( isset( $_POST['ref'] ) == false &amp;&amp; !empty($_SERVER['HTTP_REFERER']) ) {
</span><span class="lines">@@ -143,8 +143,8 @@
</span><span class="cx"> 
</span><span class="cx">                 if ( empty($domain) || empty($email))
</span><span class="cx">                         wp_die( __('Missing blog address or email address.') );
</span><del>-                if( !is_email( $email ) ) 
-                        wp_die( __('Invalid email address') ); 
</del><ins>+                if( !is_email( $email ) )
+                        wp_die( __('Invalid email address') );
</ins><span class="cx"> 
</span><span class="cx">                 if( constant( 'VHOST' ) == 'yes' ) {
</span><span class="cx">                         $newdomain = $domain.&quot;.&quot;.$current_site-&gt;domain;
</span><span class="lines">@@ -218,7 +218,7 @@
</span><span class="cx">                         if( get_option( 'home' ) != 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] )
</span><span class="cx">                                 update_option( 'home', 'http://' . $_POST['blog']['domain'] . $_POST['blog']['path'] );
</span><span class="cx">                 }
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 $wp_rewrite-&gt;flush_rules();
</span><span class="cx"> 
</span><span class="cx">                 // update blogs table
</span><span class="lines">@@ -317,11 +317,11 @@
</span><span class="cx">                                 } elseif ( isset($_POST['allblog_spam']) ) {
</span><span class="cx">                                         $blogfunction = 'all_spam';
</span><span class="cx">                                         update_blog_status( $val, &quot;spam&quot;, '1', 0 );
</span><del>-                                        set_time_limit(60); 
</del><ins>+                                        set_time_limit(60);
</ins><span class="cx">                                 } elseif ( isset($_POST['allblog_notspam']) ) {
</span><span class="cx">                                         $blogfunction = 'all_notspam';
</span><span class="cx">                                         update_blog_status( $val, &quot;spam&quot;, '0', 0 );
</span><del>-                                        set_time_limit(60); 
</del><ins>+                                        set_time_limit(60);
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                 }
</span><span class="lines">@@ -431,7 +431,7 @@
</span><span class="cx">                                         &lt;input type='hidden' name='ref' value='&lt;?php echo $referrer; ?&gt;' /&gt;
</span><span class="cx">                                         &lt;?php wp_nonce_field( $_GET['action2'] ) ?&gt;
</span><span class="cx">                                         &lt;p&gt;&lt;?php echo wp_specialchars( stripslashes($_GET['msg']) ); ?&gt;&lt;/p&gt;
</span><del>-                                        &lt;p class=&quot;submit&quot;&gt;&lt;input class=&quot;button&quot; type='submit' value='&lt;?php _e(&quot;Confirm&quot;); ?&gt;' /&gt;&lt;/p&gt;                                                
</del><ins>+                                        &lt;p class=&quot;submit&quot;&gt;&lt;input class=&quot;button&quot; type='submit' value='&lt;?php _e(&quot;Confirm&quot;); ?&gt;' /&gt;&lt;/p&gt;
</ins><span class="cx">                                 &lt;/form&gt;
</span><span class="cx">                         &lt;/body&gt;
</span><span class="cx">                 &lt;/html&gt;
</span></span></pre></div>
<a id="trunkwpadminmsoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-options.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-options.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-options.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -280,7 +280,7 @@
</span><span class="cx">                         &lt;a name='menu'&gt;&lt;/a&gt;
</span><span class="cx">                         &lt;?php
</span><span class="cx">                         $menu_perms = get_site_option( &quot;menu_items&quot; );
</span><del>-                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' =&gt; __('Plugins')) );                        
</del><ins>+                        $menu_items = apply_filters( 'mu_menu_items', array('plugins' =&gt; __('Plugins')) );
</ins><span class="cx">                         foreach ( (array) $menu_items as $key =&gt; $val ) {
</span><span class="cx">                                 echo &quot;&lt;tr&gt;&lt;th scope='row'&gt;&quot; . wp_specialchars($val) . &quot;&lt;/th&gt;&lt;td&gt;&lt;input type='checkbox' name='menu_items[&quot; . $key . &quot;]' value='1'&quot; . (( $menu_perms[$key] == '1' ) ? ' checked=&quot;checked&quot;' : '') . &quot; /&gt;&lt;/td&gt;&lt;/tr&gt;&quot;;
</span><span class="cx">                         }
</span></span></pre></div>
<a id="trunkwpadminmssitesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-sites.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-sites.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-sites.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -81,68 +81,68 @@
</span><span class="cx">                 &lt;h2&gt;&lt;?php _e('Edit Blog'); ?&gt; - &lt;a href='http://&lt;?php echo $details['domain'].$details['path']; ?&gt;'&gt;http://&lt;?php echo $details['domain'].$details['path']; ?&gt;&lt;/a&gt;&lt;/h2&gt;
</span><span class="cx">                 &lt;form method=&quot;post&quot; action=&quot;ms-edit.php?action=updateblog&quot;&gt;
</span><span class="cx">                         &lt;?php wp_nonce_field('editblog'); ?&gt;
</span><del>-                        &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo esc_attr($id) ?&gt;&quot; /&gt; 
</del><ins>+                        &lt;input type=&quot;hidden&quot; name=&quot;id&quot; value=&quot;&lt;?php echo esc_attr($id) ?&gt;&quot; /&gt;
</ins><span class="cx">                         &lt;div class='metabox-holder' style='width:49%;float:left;'&gt;
</span><span class="cx">                         &lt;div id=&quot;blogedit_bloginfo&quot; class=&quot;postbox &quot; &gt;
</span><span class="cx">                         &lt;h3 class='hndle'&gt;&lt;span&gt;&lt;?php _e('Blog info (wp_blogs)'); ?&gt;&lt;/span&gt;&lt;/h3&gt;
</span><span class="cx">                         &lt;div class=&quot;inside&quot;&gt;
</span><span class="cx">                                 &lt;table class=&quot;form-table&quot;&gt;
</span><span class="cx">                                                         &lt;tr class=&quot;form-field form-required&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Domain') ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Domain') ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;http://&lt;input name=&quot;blog[domain]&quot; type=&quot;text&quot; id=&quot;domain&quot; value=&quot;&lt;?php echo $details['domain'] ?&gt;&quot; size=&quot;33&quot; /&gt;&lt;/td&gt;
</span><del>-                                                        &lt;/tr&gt; 
</del><ins>+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field form-required&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Path') ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Path') ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;&lt;input name=&quot;blog[path]&quot; type=&quot;text&quot; id=&quot;path&quot; value=&quot;&lt;?php echo esc_attr($details['path']) ?&gt;&quot; size=&quot;40&quot; style='margin-bottom:5px;' /&gt;
</span><span class="cx">                                                                 &lt;br /&gt;&lt;input type='checkbox' style='width:20px;' name='update_home_url' value='update' &lt;?php if( get_blog_option( $id, 'siteurl' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) || get_blog_option( $id, 'home' ) == preg_replace('|/+$|', '', 'http://' . $details['domain'] . $details['path']) ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e( &quot;Update 'siteurl' and 'home' as well.&quot; ); ?&gt;&lt;/td&gt;
</span><del>-                                                        &lt;/tr&gt; 
</del><ins>+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Registered') ?&gt;&lt;/th&gt; 
-                                                                &lt;td&gt;&lt;input name=&quot;blog[registered]&quot; type=&quot;text&quot; id=&quot;blog_registered&quot; value=&quot;&lt;?php echo esc_attr($details['registered']) ?&gt;&quot; size=&quot;40&quot; /&gt;&lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Registered') ?&gt;&lt;/th&gt;
+                                                                &lt;td&gt;&lt;input name=&quot;blog[registered]&quot; type=&quot;text&quot; id=&quot;blog_registered&quot; value=&quot;&lt;?php echo esc_attr($details['registered']) ?&gt;&quot; size=&quot;40&quot; /&gt;&lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Last Updated') ?&gt;&lt;/th&gt; 
-                                                                &lt;td&gt;&lt;input name=&quot;blog[last_updated]&quot; type=&quot;text&quot; id=&quot;blog_last_updated&quot; value=&quot;&lt;?php echo esc_attr($details['last_updated']) ?&gt;&quot; size=&quot;40&quot; /&gt;&lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Last Updated') ?&gt;&lt;/th&gt;
+                                                                &lt;td&gt;&lt;input name=&quot;blog[last_updated]&quot; type=&quot;text&quot; id=&quot;blog_last_updated&quot; value=&quot;&lt;?php echo esc_attr($details['last_updated']) ?&gt;&quot; size=&quot;40&quot; /&gt;&lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Public') ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Public') ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[public]' value='1' &lt;?php if( $details['public'] == '1' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('Yes') ?&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[public]' value='0' &lt;?php if( $details['public'] == '0' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('No') ?&gt;
</span><del>-                                                                &lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Archived' ); ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Archived' ); ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[archived]' value='1' &lt;?php if( $details['archived'] == '1' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('Yes') ?&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[archived]' value='0' &lt;?php if( $details['archived'] == '0' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('No') ?&gt;
</span><del>-                                                                &lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Mature' ); ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Mature' ); ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[mature]' value='1' &lt;?php if( $details['mature'] == '1' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('Yes') ?&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[mature]' value='0' &lt;?php if( $details['mature'] == '0' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('No') ?&gt;
</span><del>-                                                                &lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Spam' ); ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Spam' ); ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[spam]' value='1' &lt;?php if( $details['spam'] == '1' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('Yes') ?&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[spam]' value='0' &lt;?php if( $details['spam'] == '0' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('No') ?&gt;
</span><del>-                                                                &lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Deleted' ); ?&gt;&lt;/th&gt; 
</del><ins>+                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php _e( 'Deleted' ); ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                 &lt;td&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[deleted]' value='1' &lt;?php if( $details['deleted'] == '1' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('Yes') ?&gt;
</span><span class="cx">                                                                         &lt;input type='radio' style='width:20px;' name='blog[deleted]' value='0' &lt;?php if( $details['deleted'] == '0' ) echo 'checked=&quot;checked&quot;'; ?&gt; /&gt; &lt;?php _e('No') ?&gt;
</span><del>-                                                                &lt;/td&gt; 
-                                                        &lt;/tr&gt; 
</del><ins>+                                                                &lt;/td&gt;
+                                                        &lt;/tr&gt;
</ins><span class="cx">                                                 &lt;/table&gt;
</span><span class="cx">                                                 &lt;p class=&quot;submit&quot; style=&quot;margin:-15px 0 -5px 230px;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e('Update Options') ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;/div&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;div id=&quot;blogedit_blogoptions&quot; class=&quot;postbox &quot; &gt;
</span><span class="cx">                         &lt;h3 class='hndle'&gt;&lt;span&gt;&lt;?php printf( __('Blog options (wp_%s_options)'), $id ); ?&gt;&lt;/span&gt;&lt;/h3&gt;
</span><span class="cx">                         &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -165,16 +165,16 @@
</span><span class="cx">                                                                 if ( stristr($val['option_value'], &quot;\r&quot;) || stristr($val['option_value'], &quot;\n&quot;) || stristr($val['option_value'], &quot;\r\n&quot;) ) {
</span><span class="cx">                                                                 ?&gt;
</span><span class="cx">                                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $val['option_name'] ) ) ?&gt;&lt;/th&gt; 
</del><ins>+                                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $val['option_name'] ) ) ?&gt;&lt;/th&gt;
</ins><span class="cx">                                                                                 &lt;td&gt;&lt;textarea rows=&quot;5&quot; cols=&quot;40&quot; name=&quot;option[&lt;?php echo $val['option_name'] ?&gt;]&quot; type=&quot;text&quot; id=&quot;&lt;?php echo $val['option_name'] ?&gt;&quot;&lt;?php echo $disabled ?&gt;&gt;&lt;?php echo wp_specialchars( stripslashes( $val['option_value'] ), 1 ) ?&gt;&lt;/textarea&gt;&lt;/td&gt;
</span><span class="cx">                                                                         &lt;/tr&gt;
</span><span class="cx">                                                                 &lt;?php
</span><span class="cx">                                                                 } else {
</span><span class="cx">                                                                 ?&gt;
</span><span class="cx">                                                                         &lt;tr class=&quot;form-field&quot;&gt;
</span><del>-                                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $val['option_name'] ) ) ?&gt;&lt;/th&gt; 
-                                                                                &lt;td&gt;&lt;input name=&quot;option[&lt;?php echo $val['option_name'] ?&gt;]&quot; type=&quot;text&quot; id=&quot;&lt;?php echo $val['option_name'] ?&gt;&quot; value=&quot;&lt;?php echo esc_attr( stripslashes( $val['option_value'] ), 1 ) ?&gt;&quot; size=&quot;40&quot; &lt;?php echo $disabled ?&gt; /&gt;&lt;/td&gt; 
-                                                                        &lt;/tr&gt; 
</del><ins>+                                                                                &lt;th scope=&quot;row&quot;&gt;&lt;?php echo ucwords( str_replace( &quot;_&quot;, &quot; &quot;, $val['option_name'] ) ) ?&gt;&lt;/th&gt;
+                                                                                &lt;td&gt;&lt;input name=&quot;option[&lt;?php echo $val['option_name'] ?&gt;]&quot; type=&quot;text&quot; id=&quot;&lt;?php echo $val['option_name'] ?&gt;&quot; value=&quot;&lt;?php echo esc_attr( stripslashes( $val['option_value'] ), 1 ) ?&gt;&quot; size=&quot;40&quot; &lt;?php echo $disabled ?&gt; /&gt;&lt;/td&gt;
+                                                                        &lt;/tr&gt;
</ins><span class="cx">                                                                 &lt;?php
</span><span class="cx">                                                                 }
</span><span class="cx">                                                         } // End foreach
</span><span class="lines">@@ -183,7 +183,7 @@
</span><span class="cx">                                                 &lt;p class=&quot;submit&quot; style=&quot;margin:-15px 0 -5px 230px;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e('Update Options') ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;/div&gt;
</span><span class="cx">                         &lt;/div&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;div class='metabox-holder' style='width:49%;float:right;'&gt;
</span><span class="cx">                         &lt;?php
</span><span class="cx">                                         // Blog Themes
</span><span class="lines">@@ -199,12 +199,12 @@
</span><span class="cx">                                                 if( isset($allowed_themes[$theme_key] ) == false ) {
</span><span class="cx">                                                         $checked = ( isset($blog_allowed_themes[ $theme_key ]) ) ? 'checked=&quot;checked&quot;' : '';
</span><span class="cx">                                                         $out .= '&lt;tr class=&quot;form-field form-required&quot;&gt;
</span><del>-                                                                        &lt;th title=&quot;'.htmlspecialchars( $theme[&quot;Description&quot;] ).'&quot; scope=&quot;row&quot;&gt;'.$key.'&lt;/th&gt; 
-                                                                        &lt;td&gt;&lt;input name=&quot;theme['.$theme_key.']&quot; type=&quot;checkbox&quot; style=&quot;width:20px;&quot; value=&quot;on&quot; '.$checked.'/&gt;' . __( 'Active' ) . '&lt;/td&gt; 
</del><ins>+                                                                        &lt;th title=&quot;'.htmlspecialchars( $theme[&quot;Description&quot;] ).'&quot; scope=&quot;row&quot;&gt;'.$key.'&lt;/th&gt;
+                                                                        &lt;td&gt;&lt;input name=&quot;theme['.$theme_key.']&quot; type=&quot;checkbox&quot; style=&quot;width:20px;&quot; value=&quot;on&quot; '.$checked.'/&gt;' . __( 'Active' ) . '&lt;/td&gt;
</ins><span class="cx">                                                                 &lt;/tr&gt;';
</span><span class="cx">                                                 }
</span><span class="cx">                                         }
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         if ( $out != '' ) {
</span><span class="cx">                         ?&gt;
</span><span class="cx">                         &lt;div id=&quot;blogedit_blogthemes&quot; class=&quot;postbox&quot;&gt;
</span><span class="lines">@@ -217,7 +217,7 @@
</span><span class="cx">                                 &lt;p class=&quot;submit&quot; style=&quot;margin:-15px 0 -5px 230px;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e('Update Options') ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;/div&gt;
</span><span class="cx">                         &lt;?php } ?&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;?php
</span><span class="cx">                                         // Blog users
</span><span class="cx">                                         $blogusers = get_users_of_blog( $id );
</span><span class="lines">@@ -236,7 +236,7 @@
</span><span class="cx">                                                         if( $val-&gt;user_id != $current_user-&gt;data-&gt;ID ) {
</span><span class="cx">                                                                 ?&gt;
</span><span class="cx">                                                                 &lt;td&gt;
</span><del>-                                                                        &lt;select name=&quot;role[&lt;?php echo $val-&gt;user_id ?&gt;]&quot; id=&quot;new_role&quot;&gt;&lt;?php 
</del><ins>+                                                                        &lt;select name=&quot;role[&lt;?php echo $val-&gt;user_id ?&gt;]&quot; id=&quot;new_role&quot;&gt;&lt;?php
</ins><span class="cx">                                                                                 foreach( $editblog_roles as $role =&gt; $role_assoc ){
</span><span class="cx">                                                                                         $name = translate_with_context($role_assoc['name']);
</span><span class="cx">                                                                                         $selected = ( $role == $existing_role ) ? 'selected=&quot;selected&quot;' : '';
</span><span class="lines">@@ -260,7 +260,7 @@
</span><span class="cx">                                                 echo &quot;&lt;/div&gt;&lt;/div&gt;&quot;;
</span><span class="cx">                                         }
</span><span class="cx">                         ?&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;div id=&quot;blogedit_blogadduser&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                         &lt;h3 class='hndle'&gt;&lt;span&gt;&lt;?php _e('Add a new user'); ?&gt;&lt;/span&gt;&lt;/h3&gt;
</span><span class="cx">                         &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -274,7 +274,7 @@
</span><span class="cx">                                                         &lt;th scope=&quot;row&quot;&gt;&lt;?php _e('Role:') ?&gt;&lt;/th&gt;
</span><span class="cx">                                                         &lt;td&gt;
</span><span class="cx">                                                                 &lt;select name=&quot;new_role&quot; id=&quot;new_role&quot;&gt;
</span><del>-                                                                &lt;?php 
</del><ins>+                                                                &lt;?php
</ins><span class="cx">                                                                 reset( $editblog_roles );
</span><span class="cx">                                                                 foreach( $editblog_roles as $role =&gt; $role_assoc ){
</span><span class="cx">                                                                         $name = translate_with_context($role_assoc['name']);
</span><span class="lines">@@ -288,7 +288,7 @@
</span><span class="cx">                                         &lt;/table&gt;
</span><span class="cx">                                 &lt;p class=&quot;submit&quot; style=&quot;margin:-15px 0 -5px 230px;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e('Update Options') ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;/div&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;div id=&quot;blogedit_miscoptions&quot; class=&quot;postbox&quot;&gt;
</span><span class="cx">                         &lt;h3 class='hndle'&gt;&lt;span&gt;&lt;?php _e('Misc Blog Actions') ?&gt;&lt;/span&gt;&lt;/h3&gt;
</span><span class="cx">                         &lt;div class=&quot;inside&quot;&gt;
</span><span class="lines">@@ -297,9 +297,9 @@
</span><span class="cx">                                         &lt;/table&gt;
</span><span class="cx">                                 &lt;p class=&quot;submit&quot; style=&quot;margin:-15px 0 -5px 230px;&quot;&gt;&lt;input type=&quot;submit&quot; name=&quot;Submit&quot; value=&quot;&lt;?php esc_attr_e('Update Options') ?&gt;&quot; /&gt;&lt;/p&gt;
</span><span class="cx">                         &lt;/div&gt;&lt;/div&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;/div&gt;
</span><del>-                        
</del><ins>+
</ins><span class="cx">                         &lt;div style=&quot;clear:both;&quot;&gt;&lt;/div&gt;
</span><span class="cx">                 &lt;/form&gt;
</span><span class="cx">                 &lt;/div&gt;
</span><span class="lines">@@ -324,7 +324,7 @@
</span><span class="cx">                                 WHERE site_id = '{$wpdb-&gt;siteid}'
</span><span class="cx">                                 AND {$wpdb-&gt;blogs}.blog_id = {$wpdb-&gt;registration_log}.blog_id
</span><span class="cx">                                 AND {$wpdb-&gt;registration_log}.IP LIKE ('%{$s}%')&quot;;
</span><del>-                } 
</del><ins>+                }
</ins><span class="cx"> 
</span><span class="cx">                 if( isset( $_GET['sortby'] ) == false ) {
</span><span class="cx">                         $_GET['sortby'] = 'id';
</span><span class="lines">@@ -407,10 +407,10 @@
</span><span class="cx">                         'registered'   =&gt; __('Registered'),
</span><span class="cx">                         'users'        =&gt; __('Users')
</span><span class="cx">                 );
</span><del>-                
</del><ins>+
</ins><span class="cx">                 if( has_filter( 'wpmublogsaction' ) )
</span><span class="cx">                         $posts_columns['plugins'] = __('Actions');
</span><del>-                        
</del><ins>+
</ins><span class="cx">                 $posts_columns = apply_filters('wpmu_blogs_columns', $posts_columns);
</span><span class="cx"> 
</span><span class="cx">                 $sortby_url = &quot;s=&quot;;
</span><span class="lines">@@ -427,7 +427,7 @@
</span><span class="cx">                                 &lt;th scope=&quot;col&quot; class=&quot;check-column&quot;&gt;&lt;/th&gt;
</span><span class="cx">                                 &lt;?php foreach($posts_columns as $column_id =&gt; $column_display_name) {
</span><span class="cx">                                         $column_link = &quot;&lt;a href='ms-blogs.php?{$sortby_url}&amp;amp;sortby={$column_id}&amp;amp;&quot;;
</span><del>-                                        if( $_GET['sortby'] == $column_id ) { 
</del><ins>+                                        if( $_GET['sortby'] == $column_id ) {
</ins><span class="cx">                                                 $column_link .= $_GET[ 'order' ] == 'DESC' ? 'order=ASC&amp;amp;' : 'order=DESC&amp;amp;';
</span><span class="cx">                                         }
</span><span class="cx">                                         $column_link .= &quot;apage={$apage}'&gt;{$column_display_name}&lt;/a&gt;&quot;;
</span><span class="lines">@@ -443,7 +443,7 @@
</span><span class="cx">                         if ($blog_list) {
</span><span class="cx">                                 $bgcolor = $class = '';
</span><span class="cx">                                 $status_list = array( &quot;archived&quot; =&gt; &quot;#fee&quot;, &quot;spam&quot; =&gt; &quot;#faa&quot;, &quot;deleted&quot; =&gt; &quot;#f55&quot; );
</span><del>-                                foreach ($blog_list as $blog) { 
</del><ins>+                                foreach ($blog_list as $blog) {
</ins><span class="cx">                                         $class = ('alternate' == $class) ? '' : 'alternate';
</span><span class="cx">                                         reset( $status_list );
</span><span class="cx"> 
</span><span class="lines">@@ -455,7 +455,7 @@
</span><span class="cx">                                         }
</span><span class="cx">                                         echo &quot;&lt;tr $bgcolour class='$class'&gt;&quot;;
</span><span class="cx"> 
</span><del>-                                        $blogname = ( constant( &quot;VHOST&quot; ) == 'yes' ) ? str_replace('.'.$current_site-&gt;domain, '', $blog['domain']) : $blog['path']; 
</del><ins>+                                        $blogname = ( constant( &quot;VHOST&quot; ) == 'yes' ) ? str_replace('.'.$current_site-&gt;domain, '', $blog['domain']) : $blog['path'];
</ins><span class="cx">                                         foreach( $posts_columns as $column_name=&gt;$column_display_name ) {
</span><span class="cx">                                                 switch($column_name) {
</span><span class="cx">                                                         case 'id': ?&gt;
</span><span class="lines">@@ -467,7 +467,7 @@
</span><span class="cx">                                                                 &lt;/th&gt;
</span><span class="cx">                                                         &lt;?php
</span><span class="cx">                                                         break;
</span><del>- 
</del><ins>+
</ins><span class="cx">                                                         case 'blogname': ?&gt;
</span><span class="cx">                                                                 &lt;td valign=&quot;top&quot;&gt;
</span><span class="cx">                                                                         &lt;a href=&quot;ms-blogs.php?action=editblog&amp;amp;id=&lt;?php echo $blog['blog_id'] ?&gt;&quot; class=&quot;edit&quot;&gt;&lt;?php echo $blogname; ?&gt;&lt;/a&gt;
</span><span class="lines">@@ -476,27 +476,27 @@
</span><span class="cx">                                                                         $controlActions        = array();
</span><span class="cx">                                                                         $controlActions[]        = '&lt;a href=&quot;ms-blogs.php?action=editblog&amp;amp;id=' . $blog['blog_id'] . '&quot; class=&quot;edit&quot;&gt;' . __('Edit') . '&lt;/a&gt;';
</span><span class="cx">                                                                         $controlActions[]        = &quot;&lt;a href='{$protocol}{$blog['domain']}{$blog['path']}wp-admin/' class='edit'&gt;&quot; . __('Backend') . '&lt;/a&gt;';
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         if( get_blog_status( $blog['blog_id'], &quot;deleted&quot; ) == '1' )
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=activateblog&amp;amp;ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to activate the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __('Activate') . '&lt;/a&gt;';
</span><span class="cx">                                                                         else
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=deactivateblog&amp;amp;ref=' . urlencode( $_SERVER['REQUEST_URI'] ) . '&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to deactivate the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __('Deactivate') . '&lt;/a&gt;';
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         if( get_blog_status( $blog['blog_id'], &quot;archived&quot; ) == '1' )
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=unarchiveblog&amp;amp;id=' .  $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to unarchive the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __('Unarchive') . '&lt;/a&gt;';
</span><span class="cx">                                                                         else
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=archiveblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to archive the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __('Archive') . '&lt;/a&gt;';
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         if( get_blog_status( $blog['blog_id'], &quot;spam&quot; ) == '1' )
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=unspamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to unspam the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __('Not Spam') . '&lt;/a&gt;';
</span><span class="cx">                                                                         else
</span><span class="cx">                                                                                 $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=spamblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to mark the blog %s as spam&quot; ), $blogname ) ) . '&quot;&gt;' . __(&quot;Spam&quot;) . '&lt;/a&gt;';
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         $controlActions[]        = '&lt;a class=&quot;delete&quot; href=&quot;ms-edit.php?action=confirm&amp;amp;action2=deleteblog&amp;amp;id=' . $blog['blog_id'] . '&amp;amp;msg=' . urlencode( sprintf( __( &quot;You are about to delete the blog %s&quot; ), $blogname ) ) . '&quot;&gt;' . __(&quot;Delete&quot;) . '&lt;/a&gt;';
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         $controlActions[]        = &quot;&lt;a href='http://{$blog['domain']}{$blog['path']}' rel='permalink'&gt;&quot; . __('Visit') . '&lt;/a&gt;';
</span><span class="cx">                                                                         ?&gt;
</span><del>-                                                                        
</del><ins>+
</ins><span class="cx">                                                                         &lt;?php if (count($controlActions)) : ?&gt;
</span><span class="cx">                                                                         &lt;div class=&quot;row-actions&quot;&gt;
</span><span class="cx">                                                                                 &lt;?php echo implode(' | ', $controlActions); ?&gt;
</span><span class="lines">@@ -505,7 +505,7 @@
</span><span class="cx">                                                                 &lt;/td&gt;
</span><span class="cx">                                                         &lt;?php
</span><span class="cx">                                                         break;
</span><del>- 
</del><ins>+
</ins><span class="cx">                                                         case 'lastupdated': ?&gt;
</span><span class="cx">                                                                 &lt;td valign=&quot;top&quot;&gt;
</span><span class="cx">                                                                         &lt;?php echo ( $blog['last_updated'] == '0000-00-00 00:00:00' ) ? __(&quot;Never&quot;) : mysql2date(__('Y-m-d \&lt;\b\r \/\&gt; g:i:s a'), $blog['last_updated']); ?&gt;
</span><span class="lines">@@ -522,7 +522,7 @@
</span><span class="cx">                                                         case 'users': ?&gt;
</span><span class="cx">                                                                 &lt;td valign=&quot;top&quot;&gt;
</span><span class="cx">                                                                         &lt;?php
</span><del>-                                                                        $blogusers = get_users_of_blog( $blog['blog_id'] ); 
</del><ins>+                                                                        $blogusers = get_users_of_blog( $blog['blog_id'] );
</ins><span class="cx">                                                                         if ( is_array( $blogusers ) ) {
</span><span class="cx">                                                                                 $blogusers_warning = '';
</span><span class="cx">                                                                                 if ( count( $blogusers ) &gt; 5 ) {
</span><span class="lines">@@ -530,7 +530,7 @@
</span><span class="cx">                                                                                         $blogusers_warning = __( 'Only showing first 5 users.' ) . ' &lt;a href=&quot;' . $protocol . $blog[ 'domain' ] . $blog[ 'path' ] . 'wp-admin/users.php&quot;&gt;' . __( 'More' ) . '&lt;/a&gt;';
</span><span class="cx">                                                                                 }
</span><span class="cx">                                                                                 foreach ( $blogusers as $key =&gt; $val ) {
</span><del>-                                                                                        echo '&lt;a href=&quot;user-edit.php?user_id=' . $val-&gt;user_id . '&quot;&gt;' . $val-&gt;user_login . '&lt;/a&gt; ('.$val-&gt;user_email.')&lt;br /&gt;'; 
</del><ins>+                                                                                        echo '&lt;a href=&quot;user-edit.php?user_id=' . $val-&gt;user_id . '&quot;&gt;' . $val-&gt;user_login . '&lt;/a&gt; ('.$val-&gt;user_email.')&lt;br /&gt;';
</ins><span class="cx">                                                                                 }
</span><span class="cx">                                                                                 if( $blogusers_warning != '' ) {
</span><span class="cx">                                                                                         echo '&lt;strong&gt;' . $blogusers_warning . '&lt;/strong&gt;&lt;br /&gt;';
</span><span class="lines">@@ -548,7 +548,7 @@
</span><span class="cx">                                                                 &lt;/td&gt;
</span><span class="cx">                                                                 &lt;?php } ?&gt;
</span><span class="cx">                                                         &lt;?php break;
</span><del>- 
</del><ins>+
</ins><span class="cx">                                                         default: ?&gt;
</span><span class="cx">                                                                 &lt;?php if( has_filter( 'manage_blogs_custom_column' ) ) { ?&gt;
</span><span class="cx">                                                                 &lt;td valign=&quot;top&quot;&gt;
</span><span class="lines">@@ -563,9 +563,9 @@
</span><span class="cx">                                         &lt;?php
</span><span class="cx">                                 }
</span><span class="cx">                         } else { ?&gt;
</span><del>-                                &lt;tr style='background-color: &lt;?php echo $bgcolor; ?&gt;'&gt; 
-                                        &lt;td colspan=&quot;8&quot;&gt;&lt;?php _e('No blogs found.') ?&gt;&lt;/td&gt; 
-                                &lt;/tr&gt; 
</del><ins>+                                &lt;tr style='background-color: &lt;?php echo $bgcolor; ?&gt;'&gt;
+                                        &lt;td colspan=&quot;8&quot;&gt;&lt;?php _e('No blogs found.') ?&gt;&lt;/td&gt;
+                                &lt;/tr&gt;
</ins><span class="cx">                         &lt;?php
</span><span class="cx">                         } // end if ($blogs)
</span><span class="cx">                         ?&gt;
</span><span class="lines">@@ -585,10 +585,10 @@
</span><span class="cx">                                                 &lt;th style=&quot;text-align:center;&quot; scope='row'&gt;&lt;?php _e('Blog Address') ?&gt;&lt;/th&gt;
</span><span class="cx">                                                 &lt;td&gt;
</span><span class="cx">                                                 &lt;?php if ( constant( &quot;VHOST&quot; ) == 'yes' ) { ?&gt;
</span><del>-                                                        &lt;input name=&quot;blog[domain]&quot; type=&quot;text&quot; title=&quot;&lt;?php _e('Domain') ?&gt;&quot;/&gt;.&lt;?php echo $current_site-&gt;domain;?&gt; 
</del><ins>+                                                        &lt;input name=&quot;blog[domain]&quot; type=&quot;text&quot; title=&quot;&lt;?php _e('Domain') ?&gt;&quot;/&gt;.&lt;?php echo $current_site-&gt;domain;?&gt;
</ins><span class="cx">                                                 &lt;?php } else {
</span><span class="cx">                                                         echo $current_site-&gt;domain . $current_site-&gt;path ?&gt;&lt;input name=&quot;blog[domain]&quot; type=&quot;text&quot; title=&quot;&lt;?php _e('Domain') ?&gt;&quot;/&gt;
</span><del>-                                                &lt;?php } 
</del><ins>+                                                &lt;?php }
</ins><span class="cx">                                                 echo &quot;&lt;p&gt;&quot; . __( 'Only the characters a-z and 0-9 recommended.' ) . &quot;&lt;/p&gt;&quot;;
</span><span class="cx">                                                 ?&gt;
</span><span class="cx">                                                 &lt;/td&gt;
</span></span></pre></div>
<a id="trunkwpadminmsupgradesitephp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-upgrade-site.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-upgrade-site.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-upgrade-site.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -37,7 +37,7 @@
</span><span class="cx">                                                 wp_die( &quot;&lt;strong&gt;Warning!&lt;/strong&gt; Problem upgrading {$siteurl}. Your server may not be able to connect to blogs running on it.&lt;br /&gt; Error message: &lt;em&gt;&quot; . $response-&gt;get_error_message() .&quot;&lt;/em&gt;&quot; );
</span><span class="cx">                                         }
</span><span class="cx">                                         do_action( 'after_mu_upgrade', $response );
</span><del>-                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] ); 
</del><ins>+                                        do_action( 'wpmu_upgrade_site', $details[ 'blog_id' ] );
</ins><span class="cx">                                 }
</span><span class="cx">                         }
</span><span class="cx">                         echo &quot;&lt;/ul&gt;&quot;;
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">                         echo '&lt;p&gt;'.__('All Done!').'&lt;/p&gt;';
</span><span class="cx">                 }
</span><span class="cx">         break;
</span><del>-        default: 
</del><ins>+        default:
</ins><span class="cx">                 ?&gt;&lt;p&gt;&lt;?php _e(&quot;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.&quot;); ?&gt;&lt;/p&gt;
</span><span class="cx">                 &lt;p&gt;&lt;a class=&quot;button&quot; href=&quot;ms-upgrade-site.php?action=upgrade&quot;&gt;&lt;?php _e(&quot;Upgrade Site&quot;); ?&gt;&lt;/a&gt;&lt;/p&gt;&lt;?php
</span><span class="cx">                 do_action( 'wpmu_upgrade_page' );
</span></span></pre></div>
<a id="trunkwpadminmsusersphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/ms-users.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/ms-users.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-admin/ms-users.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -26,9 +26,9 @@
</span><span class="cx">                         case 'all_spam':
</span><span class="cx">                                 _e('Users marked as spam !');
</span><span class="cx">                         break;
</span><del>-                        case 'all_notspam': 
-                                _e('Users marked as not spam !'); 
-                        break; 
</del><ins>+                        case 'all_notspam':
+                                _e('Users marked as not spam !');
+                        break;
</ins><span class="cx">                         case 'all_delete':
</span><span class="cx">                                 _e('Users deleted !');
</span><span class="cx">                         break;
</span><span class="lines">@@ -85,12 +85,12 @@
</span><span class="cx"> 
</span><span class="cx">         // Pagination
</span><span class="cx">         $user_navigation = paginate_links( array(
</span><del>-                'total' =&gt; ceil($total / $num),        
</del><ins>+                'total' =&gt; ceil($total / $num),
</ins><span class="cx">                 'current' =&gt; $apage,
</span><span class="cx">                 'base' =&gt; add_query_arg( 'apage', '%#%' ),
</span><span class="cx">                 'format' =&gt; ''
</span><span class="cx">         ));
</span><del>-        
</del><ins>+
</ins><span class="cx">         if ( $user_navigation ) {
</span><span class="cx">                 $user_navigation = sprintf( '&lt;span class=&quot;displaying-num&quot;&gt;' . __( 'Displaying %s&amp;#8211;%s of %s' ) . '&lt;/span&gt;%s',
</span><span class="cx">                         number_format_i18n( ( $apage - 1 ) * $num + 1 ),
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">                         $user_navigation
</span><span class="cx">                 );
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         ?&gt;
</span><span class="cx">         &lt;div class=&quot;wrap&quot;&gt;
</span><span class="cx">         &lt;h2&gt;&lt;?php _e( $current_site-&gt;site_name ); ?&gt; &lt;?php _e(&quot;Users&quot;); ?&gt;&lt;/h2&gt;
</span><span class="lines">@@ -157,11 +157,11 @@
</span><span class="cx">                         &lt;tbody id=&quot;users&quot; class=&quot;list:user user-list&quot;&gt;
</span><span class="cx">                         &lt;?php if ($user_list) {
</span><span class="cx">                                 $bgcolor = '';
</span><del>-                                foreach ( (array) $user_list as $user) { 
</del><ins>+                                foreach ( (array) $user_list as $user) {
</ins><span class="cx">                                         $class = ('alternate' == $class) ? '' : 'alternate';
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         $status_list = array( &quot;spam&quot; =&gt; &quot;#faa&quot;, &quot;deleted&quot; =&gt; &quot;#f55&quot; );
</span><del>-                                        
</del><ins>+
</ins><span class="cx">                                         $bgcolour = &quot;&quot;;
</span><span class="cx">                                         foreach ( $status_list as $status =&gt; $col ) {
</span><span class="cx">                                                 if( $user[$status] ) {
</span><span class="lines">@@ -177,7 +177,7 @@
</span><span class="cx">                                                 switch($column_name) {
</span><span class="cx">                                                         case 'checkbox': ?&gt;
</span><span class="cx">                                                                 &lt;th scope=&quot;row&quot; class=&quot;check-column&quot;&gt;&lt;input type='checkbox' id='user_&lt;?php echo $user['ID'] ?&gt;' name='allusers[]' value='&lt;?php echo esc_attr($user['ID']) ?&gt;' /&gt;&lt;/th&gt;
</span><del>-                                                        &lt;?php 
</del><ins>+                                                        &lt;?php
</ins><span class="cx">                                                         break;
</span><span class="cx"> 
</span><span class="cx">                                                         case 'login':
</span><span class="lines">@@ -212,7 +212,7 @@
</span><span class="cx">                                                         &lt;?php
</span><span class="cx">                                                         break;
</span><span class="cx"> 
</span><del>-                                                        case 'blogs': 
</del><ins>+                                                        case 'blogs':
</ins><span class="cx">                                                                 $blogs = get_blogs_of_user( $user['ID'], true );
</span><span class="cx">                                                                 ?&gt;
</span><span class="cx">                                                                 &lt;td&gt;
</span><span class="lines">@@ -222,17 +222,17 @@
</span><span class="cx">                                                                                         $path        = ($val-&gt;path == '/') ? '' : $val-&gt;path;
</span><span class="cx">                                                                                         echo '&lt;a href=&quot;ms-blogs.php?action=editblog&amp;amp;id=' . $val-&gt;userblog_id . '&quot;&gt;' . str_replace( '.' . $current_site-&gt;domain, '', $val-&gt;domain . $path ) . '&lt;/a&gt;';
</span><span class="cx">                                                                                         echo ' &lt;small class=&quot;row-actions&quot;&gt;';
</span><del>-                                                                                        
</del><ins>+
</ins><span class="cx">                                                                                         // Edit
</span><span class="cx">                                                                                         echo '&lt;a href=&quot;ms-blogs.php?action=editblog&amp;amp;id=' . $val-&gt;userblog_id . '&quot;&gt;' . __('Edit') . '&lt;/a&gt; | ';
</span><del>-                                                                                        
</del><ins>+
</ins><span class="cx">                                                                                         // View
</span><del>-                                                                                        echo '&lt;a '; 
</del><ins>+                                                                                        echo '&lt;a ';
</ins><span class="cx">                                                                                         if( get_blog_status( $val-&gt;userblog_id, 'spam' ) == 1 )
</span><span class="cx">                                                                                                 echo 'style=&quot;background-color: #f66&quot; ';
</span><span class="cx">                                                                                         echo 'target=&quot;_new&quot; href=&quot;http://'.$val-&gt;domain . $val-&gt;path.'&quot;&gt;' . __('View') . '&lt;/a&gt;';
</span><del>-                                                                                        
-                                                                                        echo '&lt;/small&gt;&lt;br /&gt;'; 
</del><ins>+
+                                                                                        echo '&lt;/small&gt;&lt;br /&gt;';
</ins><span class="cx">                                                                                 }
</span><span class="cx">                                                                         }
</span><span class="cx">                                                                         ?&gt;
</span><span class="lines">@@ -247,20 +247,20 @@
</span><span class="cx">                                                 }
</span><span class="cx">                                         endforeach
</span><span class="cx">                                         ?&gt;
</span><del>-                                        &lt;/tr&gt; 
</del><ins>+                                        &lt;/tr&gt;
</ins><span class="cx">                                         &lt;?php
</span><span class="cx">                                 }
</span><span class="cx">                         } else {
</span><span class="cx">                         ?&gt;
</span><del>-                                &lt;tr style='background-color: &lt;?php echo $bgcolor; ?&gt;'&gt; 
-                                        &lt;td colspan=&quot;&lt;?php echo (int) count($posts_columns); ?&gt;&quot;&gt;&lt;?php _e('No users found.') ?&gt;&lt;/td&gt; 
-                                &lt;/tr&gt; 
</del><ins>+                                &lt;tr style='background-color: &lt;?php echo $bgcolor; ?&gt;'&gt;
+                                        &lt;td colspan=&quot;&lt;?php echo (int) count($posts_columns); ?&gt;&quot;&gt;&lt;?php _e('No users found.') ?&gt;&lt;/td&gt;
+                                &lt;/tr&gt;
</ins><span class="cx">                                 &lt;?php
</span><span class="cx">                         } // end if ($users)
</span><del>-                        ?&gt; 
</del><ins>+                        ?&gt;
</ins><span class="cx">                         &lt;/tbody&gt;
</span><span class="cx">                 &lt;/table&gt;
</span><del>-                
</del><ins>+
</ins><span class="cx">                 &lt;div class=&quot;tablenav&quot;&gt;
</span><span class="cx">                         &lt;?php if ( $user_navigation ) echo &quot;&lt;div class='tablenav-pages'&gt;$user_navigation&lt;/div&gt;&quot;; ?&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkwpincludesmsfunctionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-functions.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-functions.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-includes/ms-functions.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -77,7 +77,7 @@
</span><span class="cx"> 
</span><span class="cx"> function get_admin_users_for_domain( $sitedomain = '', $path = '' ) {
</span><span class="cx">         global $wpdb;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if( $sitedomain == '' ) {
</span><span class="cx">                 $site_id = $wpdb-&gt;siteid;
</span><span class="cx">         } else {
</span><span class="lines">@@ -187,7 +187,7 @@
</span><span class="cx">  * Determine if user is a site admin.
</span><span class="cx">  *
</span><span class="cx">  * @deprecated Use {@link is_keymaster()}
</span><del>- * 
</del><ins>+ *
</ins><span class="cx">  */
</span><span class="cx"> function is_site_admin( $user_login = '' ) {
</span><span class="cx">         // This function must reside in a file included only if is_multsite() since many plugins
</span><span class="lines">@@ -269,7 +269,7 @@
</span><span class="cx"> 
</span><span class="cx"> function add_blog_option( $id, $key, $value ) {
</span><span class="cx">         $id = (int) $id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         switch_to_blog($id);
</span><span class="cx">         add_option( $key, $value );
</span><span class="cx">         restore_current_blog();
</span><span class="lines">@@ -278,7 +278,7 @@
</span><span class="cx"> 
</span><span class="cx"> function delete_blog_option( $id, $key ) {
</span><span class="cx">         $id = (int) $id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         switch_to_blog($id);
</span><span class="cx">         delete_option( $key );
</span><span class="cx">         restore_current_blog();
</span><span class="lines">@@ -287,7 +287,7 @@
</span><span class="cx"> 
</span><span class="cx"> function update_blog_option( $id, $key, $value, $refresh = true ) {
</span><span class="cx">         $id = (int) $id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         switch_to_blog($id);
</span><span class="cx">         update_option( $key, $value );
</span><span class="cx">         restore_current_blog();
</span><span class="lines">@@ -308,8 +308,8 @@
</span><span class="cx"> 
</span><span class="cx">         $switched_stack[] = $blog_id;
</span><span class="cx"> 
</span><del>-        /* If we're switching to the same blog id that we're on, 
-        * set the right vars, do the associated actions, but skip 
</del><ins>+        /* If we're switching to the same blog id that we're on,
+        * set the right vars, do the associated actions, but skip
</ins><span class="cx">         * the extra unnecessary work */
</span><span class="cx">         if ( $blog_id == $new_blog ) {
</span><span class="cx">                 do_action( 'switch_blog', $blog_id, $blog_id );
</span><span class="lines">@@ -407,7 +407,7 @@
</span><span class="cx"> 
</span><span class="cx">         do_action('switch_blog', $blog_id, $prev_blog_id);
</span><span class="cx"> 
</span><del>-        /* If we still have items in the switched stack, consider ourselves still 'switched' */ 
</del><ins>+        /* If we still have items in the switched stack, consider ourselves still 'switched' */
</ins><span class="cx">         $switched = ( is_array( $switched_stack ) &amp;&amp; count( $switched_stack ) &gt; 0 );
</span><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="lines">@@ -511,12 +511,12 @@
</span><span class="cx"> function is_user_member_of_blog( $user_id, $blog_id = 0 ) {
</span><span class="cx">         $user_id = (int) $user_id;
</span><span class="cx">         $blog_id = (int) $blog_id;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if( $blog_id == 0 ) {
</span><span class="cx">                 global $wpdb;
</span><span class="cx">                 $blog_id = $wpdb-&gt;blogid;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         $blogs = get_blogs_of_user( $user_id );
</span><span class="cx">         if( is_array( $blogs ) ) {
</span><span class="cx">                 return array_key_exists( $blog_id, $blogs );
</span><span class="lines">@@ -906,9 +906,9 @@
</span><span class="cx"> 
</span><span class="cx"> function is_email_address_unsafe( $user_email ) {
</span><span class="cx">         $banned_names = get_site_option( &quot;banned_email_domains&quot; );
</span><del>-        if ($banned_names &amp;&amp; !is_array( $banned_names )) { 
-                $banned_names = explode( &quot;\n&quot;, $banned_names); 
-        } 
</del><ins>+        if ($banned_names &amp;&amp; !is_array( $banned_names )) {
+                $banned_names = explode( &quot;\n&quot;, $banned_names);
+        }
</ins><span class="cx">         if ( is_array( $banned_names ) &amp;&amp; empty( $banned_names ) == false ) {
</span><span class="cx">                 $email_domain = strtolower( substr( $user_email, 1 + strpos( $user_email, '@' ) ) );
</span><span class="cx">                 foreach( (array) $banned_names as $banned_domain ) {
</span><span class="lines">@@ -1116,15 +1116,15 @@
</span><span class="cx">         $domain = $wpdb-&gt;escape($domain);
</span><span class="cx">         $path = $wpdb-&gt;escape($path);
</span><span class="cx">         $title = $wpdb-&gt;escape($title);
</span><del>-                                        
</del><ins>+
</ins><span class="cx">         $wpdb-&gt;insert( $wpdb-&gt;signups, array(
</span><del>-                'domain' =&gt; $domain, 
-                'path' =&gt; $path, 
</del><ins>+                'domain' =&gt; $domain,
+                'path' =&gt; $path,
</ins><span class="cx">                 'title' =&gt; $title,
</span><del>-                'user_login' =&gt; $user, 
-                'user_email' =&gt; $user_email, 
</del><ins>+                'user_login' =&gt; $user,
+                'user_email' =&gt; $user_email,
</ins><span class="cx">                 'registered' =&gt; current_time('mysql', true),
</span><del>-                'activation_key' =&gt; $key, 
</del><ins>+                'activation_key' =&gt; $key,
</ins><span class="cx">                 'meta' =&gt; $meta
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="lines">@@ -1139,15 +1139,15 @@
</span><span class="cx">         $user_email = sanitize_email( $user_email );
</span><span class="cx">         $key = substr( md5( time() . rand() . $user_email ), 0, 16 );
</span><span class="cx">         $meta = serialize($meta);
</span><del>-                                        
</del><ins>+
</ins><span class="cx">         $wpdb-&gt;insert( $wpdb-&gt;signups, array(
</span><del>-                'domain' =&gt; '', 
-                'path' =&gt; '', 
</del><ins>+                'domain' =&gt; '',
+                'path' =&gt; '',
</ins><span class="cx">                 'title' =&gt; '',
</span><del>-                'user_login' =&gt; $user, 
-                'user_email' =&gt; $user_email, 
</del><ins>+                'user_login' =&gt; $user,
+                'user_email' =&gt; $user_email,
</ins><span class="cx">                 'registered' =&gt; current_time('mysql', true),
</span><del>-                'activation_key' =&gt; $key, 
</del><ins>+                'activation_key' =&gt; $key,
</ins><span class="cx">                 'meta' =&gt; $meta
</span><span class="cx">         ) );
</span><span class="cx"> 
</span><span class="lines">@@ -1343,25 +1343,25 @@
</span><span class="cx">         global $current_site;
</span><span class="cx">         if( get_site_option( 'registrationnotification' ) != 'yes' )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         $email = get_site_option( 'admin_email' );
</span><span class="cx">         if( is_email($email) == false )
</span><span class="cx">                 return false;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $options_site_url = clean_url(&quot;http://{$current_site-&gt;domain}{$current_site-&gt;path}wp-admin/ms-options.php&quot;);
</span><span class="cx"> 
</span><span class="cx">         switch_to_blog( $blog_id );
</span><span class="cx">         $blogname = get_option( 'blogname' );
</span><span class="cx">         $siteurl = get_option( 'siteurl' );
</span><span class="cx">         restore_current_blog();
</span><del>-        
</del><ins>+
</ins><span class="cx">         $msg = sprintf( __( &quot;New Blog: %1s
</span><span class="cx"> URL: %2s
</span><span class="cx"> Remote IP: %3s
</span><span class="cx"> 
</span><span class="cx"> Disable these notifications: %4s&quot;), $blogname, $siteurl, $_SERVER['REMOTE_ADDR'], $options_site_url);
</span><span class="cx">         $msg = apply_filters( 'newblog_notify_siteadmin', $msg );
</span><del>-        
</del><ins>+
</ins><span class="cx">         wp_mail( $email, sprintf( __( &quot;New Blog Registration: %s&quot; ), $siteurl ), $msg );
</span><span class="cx">         return true;
</span><span class="cx"> }
</span><span class="lines">@@ -1370,7 +1370,7 @@
</span><span class="cx">         global $current_site;
</span><span class="cx">         if( get_site_option( 'registrationnotification' ) != 'yes' )
</span><span class="cx">                 return false;
</span><del>-                
</del><ins>+
</ins><span class="cx">         $email = get_site_option( 'admin_email' );
</span><span class="cx">         if( is_email($email) == false )
</span><span class="cx">                 return false;
</span><span class="lines">@@ -1381,7 +1381,7 @@
</span><span class="cx"> Remote IP: %2s
</span><span class="cx"> 
</span><span class="cx"> Disable these notifications: %3s&quot;), $user-&gt;user_login, $_SERVER['REMOTE_ADDR'], $options_site_url);
</span><del>-        
</del><ins>+
</ins><span class="cx">         $msg = apply_filters( 'newuser_notify_siteadmin', $msg );
</span><span class="cx">         wp_mail( $email, sprintf(__(&quot;New User Registration: %s&quot;), $user-&gt;user_login), $msg );
</span><span class="cx">         return true;
</span><span class="lines">@@ -1416,7 +1416,7 @@
</span><span class="cx"> 
</span><span class="cx">         require_once( ABSPATH . 'wp-admin/includes/upgrade.php');
</span><span class="cx"> 
</span><del>-        if ( $wpdb-&gt;get_results(&quot;SELECT ID FROM $wpdb-&gt;posts&quot;) ) 
</del><ins>+        if ( $wpdb-&gt;get_results(&quot;SELECT ID FROM $wpdb-&gt;posts&quot;) )
</ins><span class="cx">                 die(__('&lt;h1&gt;Already Installed&lt;/h1&gt;&lt;p&gt;You appear to have already installed WordPress. To reinstall please clear your old database tables first.&lt;/p&gt;') . '&lt;/body&gt;&lt;/html&gt;');
</span><span class="cx">         $wpdb-&gt;suppress_errors( false);
</span><span class="cx"> 
</span><span class="lines">@@ -1444,7 +1444,7 @@
</span><span class="cx">         // Default link category
</span><span class="cx">         $cat_name = __('Blogroll');
</span><span class="cx">         $cat_slug = sanitize_title($cat_name);
</span><del>-        
</del><ins>+
</ins><span class="cx">         $blogroll_id = $wpdb-&gt;get_var( $wpdb-&gt;prepare( &quot;SELECT cat_ID FROM {$wpdb-&gt;sitecategories} WHERE category_nicename = %s&quot;, $cat_slug ) );
</span><span class="cx">         if( $blogroll_id == null ) {
</span><span class="cx">                 $wpdb-&gt;insert( $wpdb-&gt;sitecategories, array('cat_ID' =&gt; 0, 'cat_name' =&gt; $cat_name, 'category_nicename' =&gt; $cat_slug, 'last_updated' =&gt; current_time('mysql', true)) );
</span><span class="lines">@@ -1487,11 +1487,11 @@
</span><span class="cx">         $first_post = str_replace( &quot;SITE_URL&quot;, clean_url(&quot;http://&quot; . $current_site-&gt;domain . $current_site-&gt;path), $first_post );
</span><span class="cx">         $first_post = str_replace( &quot;SITE_NAME&quot;, $current_site-&gt;site_name, $first_post );
</span><span class="cx">         $wpdb-&gt;insert( $wpdb-&gt;posts, array(
</span><del>-                'post_author' =&gt; $user_id, 
-                'post_date' =&gt; $now, 
</del><ins>+                'post_author' =&gt; $user_id,
+                'post_date' =&gt; $now,
</ins><span class="cx">                 'post_date_gmt' =&gt; $now_gmt,
</span><del>-                'post_content' =&gt; stripslashes( $first_post ), 
-                'post_excerpt' =&gt; '', 
</del><ins>+                'post_content' =&gt; stripslashes( $first_post ),
+                'post_excerpt' =&gt; '',
</ins><span class="cx">                 'post_title' =&gt; __('Hello world!'),
</span><span class="cx">                 'post_name' =&gt; __('hello-world'),
</span><span class="cx">                 'post_modified' =&gt; $now,
</span><span class="lines">@@ -1506,11 +1506,11 @@
</span><span class="cx"> 
</span><span class="cx">         // First page
</span><span class="cx">         $wpdb-&gt;insert( $wpdb-&gt;posts, array(
</span><del>-                'post_author' =&gt; $user_id, 
-                'post_date' =&gt; $now, 
</del><ins>+                'post_author' =&gt; $user_id,
+                'post_date' =&gt; $now,
</ins><span class="cx">                 'post_date_gmt' =&gt; $now_gmt,
</span><span class="cx">                 'post_content' =&gt; get_site_option( 'first_page' ),
</span><del>-                'post_excerpt' =&gt; '', 
</del><ins>+                'post_excerpt' =&gt; '',
</ins><span class="cx">                 'post_title' =&gt; __('About'),
</span><span class="cx">                 'post_name' =&gt; __('about'),
</span><span class="cx">                 'post_modified' =&gt; $now,
</span><span class="lines">@@ -1521,30 +1521,30 @@
</span><span class="cx">                 'pinged' =&gt; '',
</span><span class="cx">                 'post_content_filtered' =&gt; ''
</span><span class="cx">         ) );
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Flush rules to pick up the new page.
</span><span class="cx">         $wp_rewrite-&gt;init();
</span><span class="cx">         $wp_rewrite-&gt;flush_rules();
</span><span class="cx"> 
</span><span class="cx">         // Default comment
</span><span class="cx">         $wpdb-&gt;insert( $wpdb-&gt;comments, array(
</span><del>-                'comment_post_ID' =&gt; '1', 
</del><ins>+                'comment_post_ID' =&gt; '1',
</ins><span class="cx">                 'comment_author' =&gt; __( get_site_option( 'first_comment_author' ) ),
</span><span class="cx">                 'comment_author_email' =&gt; '',
</span><span class="cx">                 'comment_author_url' =&gt; get_site_option( 'first_comment_url' ),
</span><del>-                'comment_author_IP' =&gt; '127.0.0.1', 
</del><ins>+                'comment_author_IP' =&gt; '127.0.0.1',
</ins><span class="cx">                 'comment_date' =&gt; $now,
</span><del>-                'comment_date_gmt' =&gt; $now_gmt, 
</del><ins>+                'comment_date_gmt' =&gt; $now_gmt,
</ins><span class="cx">                 'comment_content' =&gt; __( get_site_option( 'first_comment' ) )
</span><span class="cx">         ) );
</span><del>-        
</del><ins>+
</ins><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx">         $wpdb-&gt;update( $wpdb-&gt;options, array('option_value' =&gt; $user-&gt;user_email), array('option_name' =&gt; 'admin_email') );
</span><span class="cx"> 
</span><span class="cx">         // Remove all perms except for the login user.
</span><span class="cx">         $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;DELETE FROM $wpdb-&gt;usermeta WHERE user_id != %d AND meta_key = %s&quot;, $user_id, $table_prefix.'user_level') );
</span><span class="cx">         $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;DELETE FROM $wpdb-&gt;usermeta WHERE user_id != %d AND meta_key = %s&quot;, $user_id, $table_prefix.'capabilities') );
</span><del>-        
</del><ins>+
</ins><span class="cx">         // Delete any caps that snuck into the previously active blog. (Hardcoded to blog 1 for now.) TODO: Get previous_blog_id.
</span><span class="cx">         if ( !is_site_admin( $user-&gt;user_login ) &amp;&amp; $user_id != 1 )
</span><span class="cx">                 $wpdb-&gt;query( $wpdb-&gt;prepare(&quot;DELETE FROM $wpdb-&gt;usermeta WHERE user_id = %d AND meta_key = %s&quot;, $user_id, $wpdb-&gt;base_prefix.'1_capabilities') );
</span><span class="lines">@@ -1605,7 +1605,7 @@
</span><span class="cx">         if( !apply_filters('wpmu_welcome_user_notification', $user_id, $password, $meta) )
</span><span class="cx">                 return false;
</span><span class="cx"> 
</span><del>-        $welcome_email = get_site_option( 'welcome_user_email' ); 
</del><ins>+        $welcome_email = get_site_option( 'welcome_user_email' );
</ins><span class="cx"> 
</span><span class="cx">         $user = new WP_User($user_id);
</span><span class="cx"> 
</span><span class="lines">@@ -1746,12 +1746,12 @@
</span><span class="cx">         }
</span><span class="cx">         $spaceAllowed = get_space_allowed();
</span><span class="cx">         if(empty($spaceAllowed) || !is_numeric($spaceAllowed))
</span><del>-                $spaceAllowed = 10;        // Default space allowed is 10 MB 
-        
</del><ins>+                $spaceAllowed = 10;        // Default space allowed is 10 MB
+
</ins><span class="cx">         $dirName = BLOGUPLOADDIR;
</span><span class="cx">         $size = get_dirsize($dirName) / 1024 / 1024;
</span><del>-        
-        if( ($spaceAllowed-$size) &lt; 0 ) { 
</del><ins>+
+        if( ($spaceAllowed-$size) &lt; 0 ) {
</ins><span class="cx">                 if( $echo )
</span><span class="cx">                         _e( &quot;Sorry, you have used your space allocation. Please delete some files to upload more files.&quot; ); //No space left
</span><span class="cx">                 return true;
</span><span class="lines">@@ -1787,7 +1787,7 @@
</span><span class="cx">         if( upload_is_user_over_quota( false ) == true ) {
</span><span class="cx">                 return 0;
</span><span class="cx">         }
</span><del>-        
</del><ins>+
</ins><span class="cx">         $spaceAllowed = 1024 * 1024 * get_space_allowed();
</span><span class="cx">         $dirName = BLOGUPLOADDIR;
</span><span class="cx">         $dirsize = get_dirsize($dirName) ;
</span><span class="lines">@@ -1801,7 +1801,7 @@
</span><span class="cx"> if ( !function_exists('graceful_fail') ) :
</span><span class="cx"> function graceful_fail( $message ) {
</span><span class="cx">         $message = apply_filters('graceful_fail', $message);
</span><del>-        $message_template = apply_filters( 'graceful_fail_template', 
</del><ins>+        $message_template = apply_filters( 'graceful_fail_template',
</ins><span class="cx"> '&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
</span><span class="cx"> &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot;&gt;&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
</span><span class="cx"> &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=UTF-8&quot; /&gt;
</span><span class="lines">@@ -1843,7 +1843,7 @@
</span><span class="cx">                         return false;
</span><span class="cx"> 
</span><span class="cx">                 if( $this-&gt;reallydeleteblog == true ) {
</span><del>-                        wpmu_delete_blog( $wpdb-&gt;blogid ); 
</del><ins>+                        wpmu_delete_blog( $wpdb-&gt;blogid );
</ins><span class="cx">                 }
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="lines">@@ -1862,14 +1862,14 @@
</span><span class="cx">                         update_option( &quot;delete_blog_hash&quot;, $hash );
</span><span class="cx">                         $url_delete = get_option( &quot;siteurl&quot; ) . &quot;/wp-admin/options-general.php?page=delete-blog&amp;h=&quot; . $hash;
</span><span class="cx">                         $msg = __(&quot;Dear User,
</span><del>-You recently clicked the 'Delete Blog' link on your blog and filled in a 
</del><ins>+You recently clicked the 'Delete Blog' link on your blog and filled in a
</ins><span class="cx"> form on that page.
</span><span class="cx"> If you really want to delete your blog, click the link below. You will not
</span><span class="cx"> be asked to confirm again so only click this link if you are 100% certain:
</span><span class="cx"> URL_DELETE
</span><span class="cx"> 
</span><span class="cx"> If you delete your blog, please consider opening a new blog here
</span><del>-some time in the future! (But remember your current blog and username 
</del><ins>+some time in the future! (But remember your current blog and username
</ins><span class="cx"> are gone forever.)
</span><span class="cx"> 
</span><span class="cx"> Thanks for using the site,
</span><span class="lines">@@ -1932,8 +1932,8 @@
</span><span class="cx"> 
</span><span class="cx">         clean_term_cache($term_id);
</span><span class="cx"> 
</span><del>-        return $global_id; 
-}   
</del><ins>+        return $global_id;
+}
</ins><span class="cx"> 
</span><span class="cx"> function redirect_this_site( $deprecated = '' ) {
</span><span class="cx">         global $current_site;
</span><span class="lines">@@ -1944,7 +1944,7 @@
</span><span class="cx">         if( is_array( $upload ) == false || defined( 'WP_IMPORTING' ) )
</span><span class="cx">                 return $upload;
</span><span class="cx">         if( strlen( $upload[ 'bits' ] )  &gt; ( 1024 * get_site_option( 'fileupload_maxk', 1500 ) ) ) {
</span><del>-                return sprintf(__( &quot;This file is too big. Files must be less than %dKb in size.&lt;br /&gt;&quot; ), get_site_option( 'fileupload_maxk', 1500 )); 
</del><ins>+                return sprintf(__( &quot;This file is too big. Files must be less than %dKb in size.&lt;br /&gt;&quot; ), get_site_option( 'fileupload_maxk', 1500 ));
</ins><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         return $upload;
</span><span class="lines">@@ -2112,7 +2112,7 @@
</span><span class="cx">         return strtolower( $username );
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-/* Short circuit the update checks. Make sure update informtion is 
</del><ins>+/* Short circuit the update checks. Make sure update informtion is
</ins><span class="cx">    stored in wp_sitemeta rather than the options table of individual blogs */
</span><span class="cx"> 
</span><span class="cx"> // update_plugins (transient)
</span><span class="lines">@@ -2197,8 +2197,8 @@
</span><span class="cx">         global $current_site, $current_blog;
</span><span class="cx"> 
</span><span class="cx">         $dashboard_blog = get_dashboard_blog();
</span><del>-        if ( $current_blog-&gt;blog_id == $dashboard_blog-&gt;blog_id &amp;&amp; $dashboard_blog-&gt;blog_id != $current_site-&gt;blog_id ) { 
-                $protocol = ( is_ssl() ? 'https://' : 'http://' ); 
</del><ins>+        if ( $current_blog-&gt;blog_id == $dashboard_blog-&gt;blog_id &amp;&amp; $dashboard_blog-&gt;blog_id != $current_site-&gt;blog_id ) {
+                $protocol = ( is_ssl() ? 'https://' : 'http://' );
</ins><span class="cx">                 wp_redirect( $protocol . $dashboard_blog-&gt;domain . trailingslashit( $dashboard_blog-&gt;path ) . 'wp-admin/' );
</span><span class="cx">                 die();
</span><span class="cx">         }
</span><span class="lines">@@ -2222,7 +2222,7 @@
</span><span class="cx">                 $user_id = $current_user-&gt;ID;
</span><span class="cx">         if( $blog_id == 0 )
</span><span class="cx">                 $blog_id = $wpdb-&gt;blogid;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $local_key = $wpdb-&gt;base_prefix . $blog_id . &quot;_&quot; . $key;
</span><span class="cx">         if( isset( $current_user-&gt;$local_key ) )
</span><span class="cx">                 return true;
</span><span class="lines">@@ -2346,7 +2346,7 @@
</span><span class="cx"> 
</span><span class="cx">         if ( !$active_sitewide_plugins )
</span><span class="cx">                 return $active_plugins;
</span><del>-        
</del><ins>+
</ins><span class="cx">         $plugins = array_merge( (array) $active_plugins, array_keys( (array) $active_sitewide_plugins ) );
</span><span class="cx">         sort( $plugins );
</span><span class="cx">         return $plugins;
</span></span></pre></div>
<a id="trunkwpincludesmssettingsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-includes/ms-settings.php (12631 => 12632)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-includes/ms-settings.php        2010-01-07 04:23:23 UTC (rev 12631)
+++ trunk/wp-includes/ms-settings.php        2010-01-07 04:27:46 UTC (rev 12632)
</span><span class="lines">@@ -53,7 +53,7 @@
</span><span class="cx">         $current_site = wp_cache_get( &quot;current_site&quot;, &quot;site-options&quot; );
</span><span class="cx">         if( $current_site )
</span><span class="cx">                 return $current_site;
</span><del>-                
</del><ins>+
</ins><span class="cx">         $wpdb-&gt;suppress_errors();
</span><span class="cx">         $sites = $wpdb-&gt;get_results( &quot;SELECT * FROM $wpdb-&gt;site&quot; ); // usually only one site
</span><span class="cx">         if( count( $sites ) == 1 ) {
</span></span></pre>
</div>
</div>

</body>
</html>