<!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>[12712] trunk/wp-admin: merge multisite admin - edit links,tags,cats,
options, See #11644</title>
</head>
<body>
<div id="msg">
<dl>
<dt>Revision</dt> <dd><a href="http://trac.wordpress.org/changeset/12712">12712</a></dd>
<dt>Author</dt> <dd>wpmuguru</dd>
<dt>Date</dt> <dd>2010-01-12 21:11:52 +0000 (Tue, 12 Jan 2010)</dd>
</dl>
<h3>Log Message</h3>
<pre>merge multisite admin - edit links,tags,cats,options, See <a href="http://trac.wordpress.org/ticket/11644">#11644</a></pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkwpadminadminphp">trunk/wp-admin/admin.php</a></li>
<li><a href="#trunkwpadmincategoriesphp">trunk/wp-admin/categories.php</a></li>
<li><a href="#trunkwpadmineditcategoryformphp">trunk/wp-admin/edit-category-form.php</a></li>
<li><a href="#trunkwpadmineditlinkcategoriesphp">trunk/wp-admin/edit-link-categories.php</a></li>
<li><a href="#trunkwpadmineditlinkcategoryformphp">trunk/wp-admin/edit-link-category-form.php</a></li>
<li><a href="#trunkwpadminedittagformphp">trunk/wp-admin/edit-tag-form.php</a></li>
<li><a href="#trunkwpadminedittagsphp">trunk/wp-admin/edit-tags.php</a></li>
<li><a href="#trunkwpadminmenuheaderphp">trunk/wp-admin/menu-header.php</a></li>
<li><a href="#trunkwpadminoptionsdiscussionphp">trunk/wp-admin/options-discussion.php</a></li>
<li><a href="#trunkwpadminoptionsgeneralphp">trunk/wp-admin/options-general.php</a></li>
<li><a href="#trunkwpadminoptionsmiscphp">trunk/wp-admin/options-misc.php</a></li>
<li><a href="#trunkwpadminoptionspermalinkphp">trunk/wp-admin/options-permalink.php</a></li>
<li><a href="#trunkwpadminoptionswritingphp">trunk/wp-admin/options-writing.php</a></li>
<li><a href="#trunkwpadminoptionsphp">trunk/wp-admin/options.php</a></li>
</ul>
<h3>Property Changed</h3>
<ul>
<li><a href="#trunkwpadmin">trunk/wp-admin/</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkwpadmin"></a>
<div class="propset"><h4>Property changes: trunk/wp-admin</h4>
<pre class="diff"><span>
<span class="cx">Name: svn:ignore
</span><span class="cx"> + .categories.php.swp
</span></span></pre></div>
<a id="trunkwpadminadminphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/admin.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/admin.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/admin.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -27,8 +27,23 @@
</span><span class="cx">          */
</span><span class="cx">         do_action('after_db_upgrade');
</span><span class="cx"> } elseif ( get_option('db_version') != $wp_db_version ) {
</span><del>-        wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
-        exit;
</del><ins>+        if ( !is_multisite() ) {
+                wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));
+                exit;
+        } elseif ( apply_filters( 'do_mu_upgrade', true ) ) {
+                /**
+                 * On really small MU installs run the upgrader every time,
+                 * else run it less often to reduce load.
+                 *
+                 * @since 2.8.4b
+                 */
+                $c = get_blog_count();
+                if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) {
+                        require_once( ABSPATH . WPINC . '/http.php' );
+                        $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) );
+                        do_action( 'after_mu_upgrade', $response );
+                }
+        }
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> require_once(ABSPATH . 'wp-admin/includes/admin.php');
</span><span class="lines">@@ -45,6 +60,7 @@
</span><span class="cx">
</span><span class="cx"> set_screen_options();
</span><span class="cx">
</span><ins>+$posts_per_page = get_option('posts_per_page');
</ins><span class="cx"> $date_format = get_option('date_format');
</span><span class="cx"> $time_format = get_option('time_format');
</span><span class="cx">
</span><span class="lines">@@ -94,7 +110,7 @@
</span><span class="cx">                         wp_die(__('Invalid plugin page'));
</span><span class="cx">                 }
</span><span class="cx">
</span><del>-                if (! ( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) )
</del><ins>+                if ( !( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) && !( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") && is_file(WPMU_PLUGIN_DIR . "/$plugin_page") ) )
</ins><span class="cx">                         wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
</span><span class="cx">
</span><span class="cx">                 do_action('load-' . $plugin_page);
</span><span class="lines">@@ -102,7 +118,10 @@
</span><span class="cx">                 if (! isset($_GET['noheader']))
</span><span class="cx">                         require_once(ABSPATH . 'wp-admin/admin-header.php');
</span><span class="cx">
</span><del>-                include(WP_PLUGIN_DIR . "/$plugin_page");
</del><ins>+                if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") )
+                        include(WPMU_PLUGIN_DIR . "/$plugin_page");
+                else
+                        include(ABSPATH . PLUGINDIR . "/$plugin_page");
</ins><span class="cx">         }
</span><span class="cx">
</span><span class="cx">         include(ABSPATH . 'wp-admin/admin-footer.php');
</span><span class="lines">@@ -139,6 +158,9 @@
</span><span class="cx">         require_once(ABSPATH . 'wp-admin/includes/upgrade.php');
</span><span class="cx">
</span><span class="cx">         define('WP_IMPORTING', true);
</span><ins>+        if ( is_multisite() ) {
+                kses_init_filters(); // Always filter imported data with kses.
+        }
</ins><span class="cx">
</span><span class="cx">         call_user_func($wp_importers[$importer][2]);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadmincategoriesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/categories.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/categories.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/categories.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -297,13 +297,13 @@
</span><span class="cx">         <input name="cat_name" id="cat_name" type="text" value="" size="40" aria-required="true" />
</span><span class="cx"> <p><?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></p>
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php if ( is_multisite() ) { ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="category_nicename"><?php _e('Category Slug') ?></label>
</span><span class="cx">         <input name="category_nicename" id="category_nicename" type="text" value="" size="40" />
</span><span class="cx"> <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php } ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="category_parent"><?php _e('Category Parent') ?></label>
</span><span class="cx">         <?php wp_dropdown_categories(array('hide_empty' => 0, 'hide_if_empty' => false, 'taxonomy' => $taxonomy, 'name' => 'category_parent', 'orderby' => 'name', 'selected' => $category->parent, 'hierarchical' => true, 'show_option_none' => __('None'))); ?>
</span></span></pre></div>
<a id="trunkwpadmineditcategoryformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-category-form.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-category-form.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/edit-category-form.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -58,11 +58,13 @@
</span><span class="cx">                         <th scope="row" valign="top"><label for="cat_name"><?php _e('Category Name') ?></label></th>
</span><span class="cx">                         <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php if ( is_multisite() ) { ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th>
</span><span class="cx">                         <td><input name="category_nicename" id="category_nicename" type="text" value="<?php echo esc_attr(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br />
</span><span class="cx"> <span class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></span></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php } ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th>
</span><span class="cx">                         <td>
</span></span></pre></div>
<a id="trunkwpadmineditlinkcategoriesphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-link-categories.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-link-categories.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/edit-link-categories.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -200,13 +200,13 @@
</span><span class="cx">         <label for="name"><?php _e('Link Category name') ?></label>
</span><span class="cx">         <input name="name" id="name" type="text" value="" size="40" aria-required="true" />
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php if ( is_multisite() ) { ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="slug"><?php _e('Link Category slug') ?></label>
</span><span class="cx">         <input name="slug" id="slug" type="text" value="" size="40" />
</span><span class="cx">         <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php } ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="description"><?php _e('Description (optional)') ?></label>
</span><span class="cx">         <textarea name="description" id="description" rows="5" cols="40"></textarea>
</span></span></pre></div>
<a id="trunkwpadmineditlinkcategoryformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-link-category-form.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-link-category-form.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/edit-link-category-form.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -72,11 +72,13 @@
</span><span class="cx">                         <th scope="row" valign="top"><label for="name"><?php _e('Link Category name') ?></label></th>
</span><span class="cx">                         <td><input name="name" id="name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="slug"><?php _e('Link Category slug') ?></label></th>
</span><span class="cx">                         <td><input name="slug" id="slug" type="text" value="<?php echo esc_attr(apply_filters('editable_slug', $category->slug)); ?>" size="40" /><br />
</span><span class="cx"> <?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php } ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th>
</span><span class="cx">                         <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo $category->description; ?></textarea><br />
</span></span></pre></div>
<a id="trunkwpadminedittagformphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tag-form.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tag-form.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/edit-tag-form.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -35,11 +35,13 @@
</span><span class="cx">                         <th scope="row" valign="top"><label for="name"><?php _e('Tag name') ?></label></th>
</span><span class="cx">                         <td><input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo esc_attr($tag->name); ?>" size="40" aria-required="true" /></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th>
</span><span class="cx">                         <td><input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo esc_attr(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
</span><span class="cx"> <p class="description"><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
</span><span class="cx">                 </tr>
</span><ins>+<?php } ?>
</ins><span class="cx">                 <tr class="form-field">
</span><span class="cx">                         <th scope="row" valign="top"><label for="description"><?php _e('Description') ?></label></th>
</span><span class="cx">                         <td><textarea name="description" id="description" rows="5" cols="50" style="width: 97%;"><?php echo esc_html($tag->description); ?></textarea><br />
</span></span></pre></div>
<a id="trunkwpadminedittagsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/edit-tags.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/edit-tags.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/edit-tags.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -300,13 +300,13 @@
</span><span class="cx">         <input name="tag-name" id="tag-name" type="text" value="" size="40" aria-required="true" />
</span><span class="cx">         <p><?php _e('The name is how the tag appears on your site.'); ?></p>
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="slug"><?php _e('Tag slug') ?></label>
</span><span class="cx">         <input name="slug" id="slug" type="text" value="" size="40" />
</span><span class="cx">         <p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
</span><span class="cx"> </div>
</span><del>-
</del><ins>+<?php } ?>
</ins><span class="cx"> <div class="form-field">
</span><span class="cx">         <label for="description"><?php _e('Description') ?></label>
</span><span class="cx">         <textarea name="description" id="description" rows="5" cols="40"></textarea>
</span></span></pre></div>
<a id="trunkwpadminmenuheaderphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/menu-header.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/menu-header.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/menu-header.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -15,8 +15,10 @@
</span><span class="cx"> */
</span><span class="cx"> $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']);
</span><span class="cx"> $self = preg_replace('|^.*/plugins/|i', '', $self);
</span><ins>+$self = preg_replace('|^.*/mu-plugins/|i', '', $self);
</ins><span class="cx">
</span><span class="cx"> global $menu, $submenu, $parent_file; //For when admin-header is included from within a function.
</span><ins>+$parent_file = apply_filters("parent_file", $parent_file); // For plugins to move submenu tabs around.
</ins><span class="cx">
</span><span class="cx"> get_admin_page_parent();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminoptionsdiscussionphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-discussion.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-discussion.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options-discussion.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -52,6 +52,7 @@
</span><span class="cx"> <label for="comment_registration">
</span><span class="cx"> <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> />
</span><span class="cx"> <?php _e('Users must be registered and logged in to comment') ?>
</span><ins>+<?php if ( !get_option( 'users_can_register' ) && is_multisite() ) _e( ' (Signup has been disabled. Only members of this site can comment)' ); ?>
</ins><span class="cx"> </label>
</span><span class="cx"> <br />
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminoptionsgeneralphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-general.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-general.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options-general.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -70,6 +70,7 @@
</span><span class="cx"> <td><input name="blogdescription" type="text" id="blogdescription" value="<?php form_option('blogdescription'); ?>" class="regular-text" />
</span><span class="cx"> <span class="description"><?php _e('In a few words, explain what this blog is about.') ?></span></td>
</span><span class="cx"> </tr>
</span><ins>+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx"> <tr valign="top">
</span><span class="cx"> <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th>
</span><span class="cx"> <td><input name="siteurl" type="text" id="siteurl" value="<?php form_option('siteurl'); ?>" class="regular-text code<?php if ( defined( 'WP_SITEURL' ) ) : ?> disabled" disabled="disabled"<?php else: ?>"<?php endif; ?> /></td>
</span><span class="lines">@@ -97,6 +98,13 @@
</span><span class="cx"> <select name="default_role" id="default_role"><?php wp_dropdown_roles( get_option('default_role') ); ?></select>
</span><span class="cx"> </td>
</span><span class="cx"> </tr>
</span><ins>+<?php } else { ?>
+<tr valign="top">
+<th scope="row"><label for="new_admin_email"><?php _e('E-mail address') ?> </label></th>
+<td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" />
+<span class="setting-description"><?php _e('This address is used for admin purposes.') ?> <?php _e('If you change this we will send you an email at your new address to confirm it. <strong>The new address will not become active until confirmed.</strong>') ?></span></td>
+</tr>
+<?php } ?>
</ins><span class="cx"> <tr>
</span><span class="cx"> <?php
</span><span class="cx"> if ( !wp_timezone_supported() ) : // no magic timezone support here
</span><span class="lines">@@ -281,6 +289,26 @@
</span><span class="cx"> </select></td>
</span><span class="cx"> </tr>
</span><span class="cx"> <?php do_settings_fields('general', 'default'); ?>
</span><ins>+<?php
+if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) )
+        while( ( $lang_file = readdir( $dh ) ) !== false )
+                if( substr( $lang_file, -3 ) == '.mo' )
+                        $lang_files[] = $lang_file;
+$lang = get_option('WPLANG');
+
+if( is_array($lang_files) && !empty($lang_files) ) {
+        ?>
+        <tr valign="top">
+                <th width="33%" scope="row"><?php _e('Blog language:') ?></th>
+                <td>
+                        <select name="WPLANG" id="WPLANG">
+                                <?php mu_dropdown_languages( $lang_files, get_option('WPLANG') ); ?>
+                        </select>
+                </td>
+        </tr>
+        <?php
+} // languages
+?>
</ins><span class="cx"> </table>
</span><span class="cx">
</span><span class="cx"> <?php do_settings_sections('general'); ?>
</span></span></pre></div>
<a id="trunkwpadminoptionsmiscphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-misc.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-misc.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options-misc.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx">
</span><span class="cx"> <form method="post" action="options.php">
</span><span class="cx"> <?php settings_fields('misc'); ?>
</span><del>-
</del><ins>+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx"> <h3><?php _e('Uploading Files'); ?></h3>
</span><span class="cx"> <table class="form-table">
</span><span class="cx"> <tr valign="top">
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> </tr>
</span><span class="cx">
</span><span class="cx"> </table>
</span><del>-
</del><ins>+<?php } ?>
</ins><span class="cx"> <?php do_settings_sections('misc'); ?>
</span><span class="cx">
</span><span class="cx"> <p class="submit">
</span></span></pre></div>
<a id="trunkwpadminoptionspermalinkphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-permalink.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-permalink.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options-permalink.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -82,6 +82,9 @@
</span><span class="cx">                 $permalink_structure = $_POST['permalink_structure'];
</span><span class="cx">                 if (! empty($permalink_structure) )
</span><span class="cx">                         $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']);
</span><ins>+                if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
+                        $permalink_structure = '/blog' . $permalink_structure;
+                }
</ins><span class="cx">                 $wp_rewrite->set_permalink_structure($permalink_structure);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -89,6 +92,9 @@
</span><span class="cx">                 $category_base = $_POST['category_base'];
</span><span class="cx">                 if (! empty($category_base) )
</span><span class="cx">                         $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']);
</span><ins>+                if ( is_miltisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
+                        $category_base = '/blog' . $category_base;
+                }
</ins><span class="cx">                 $wp_rewrite->set_category_base($category_base);
</span><span class="cx">         }
</span><span class="cx">
</span><span class="lines">@@ -96,6 +102,9 @@
</span><span class="cx">                 $tag_base = $_POST['tag_base'];
</span><span class="cx">                 if (! empty($tag_base) )
</span><span class="cx">                         $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']);
</span><ins>+                if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) {
+                        $tag_base = '/blog' . $tag_base;
+                }
</ins><span class="cx">                 $wp_rewrite->set_tag_base($tag_base);
</span><span class="cx">         }
</span><span class="cx"> }
</span><span class="lines">@@ -194,6 +203,7 @@
</span><span class="cx">                         </label>
</span><span class="cx">                 </th>
</span><span class="cx">                 <td>
</span><ins>+                        <?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $permalink_structure = str_replace( "/blog", "", $permalink_structure ); }?>
</ins><span class="cx">                         <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" />
</span><span class="cx">                 </td>
</span><span class="cx">         </tr>
</span><span class="lines">@@ -209,11 +219,11 @@
</span><span class="cx"> <table class="form-table">
</span><span class="cx">         <tr>
</span><span class="cx">                 <th><label for="category_base"><?php _e('Category base'); ?></label></th>
</span><del>-                <td><input name="category_base" id="category_base" type="text" value="<?php echo esc_attr($category_base); ?>" class="regular-text code" /></td>
</del><ins>+                <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $category_base = str_replace( "/blog", "", $category_base ); }?> <input name="category_base" id="category_base" type="text" value="<?php echo esc_attr( $category_base ); ?>" class="regular-text code" /></td>
</ins><span class="cx">         </tr>
</span><span class="cx">         <tr>
</span><span class="cx">                 <th><label for="tag_base"><?php _e('Tag base'); ?></label></th>
</span><del>-                <td><input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
</del><ins>+                <td><?php if ( is_multisite() && !is_subdomain_install() && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { echo "/blog"; $tag_base = str_replace( "/blog", "", $tag_base ); }?> <input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>
</ins><span class="cx">         </tr>
</span><span class="cx">         <?php do_settings_fields('permalink', 'optional'); ?>
</span><span class="cx"> </table>
</span><span class="lines">@@ -224,6 +234,7 @@
</span><span class="cx">         <input type="submit" name="submit" class="button-primary" value="<?php esc_attr_e('Save Changes') ?>" />
</span><span class="cx"> </p>
</span><span class="cx"> </form>
</span><ins>+<?php if ( !is_multisite || is_super_admin() ) { ?>
</ins><span class="cx"> <?php if ($iis7_permalinks) :
</span><span class="cx">         if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) :
</span><span class="cx">                 if ( file_exists($home_path . 'web.config') ) : ?>
</span><span class="lines">@@ -251,6 +262,7 @@
</span><span class="cx"> </form>
</span><span class="cx">         <?php endif; ?>
</span><span class="cx"> <?php endif; ?>
</span><ins>+<?php } // multisite ?>
</ins><span class="cx">
</span><span class="cx"> </div>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminoptionswritingphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options-writing.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options-writing.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options-writing.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -81,6 +81,7 @@
</span><span class="cx"> <?php do_settings_fields('writing', 'remote_publishing'); ?>
</span><span class="cx"> </table>
</span><span class="cx">
</span><ins>+<?php if ( !is_multisite() || defined( 'POST_BY_EMAIL' ) ) { ?>
</ins><span class="cx"> <h3><?php _e('Post via e-mail') ?></h3>
</span><span class="cx"> <p><?php printf(__('To post to WordPress by e-mail you must set up a secret e-mail account with POP3 access. Any mail received at this address will be posted, so it&#8217;s a good idea to keep this address very secret. Here are three random strings you could use: <kbd>%s</kbd>, <kbd>%s</kbd>, <kbd>%s</kbd>.'), wp_generate_password(8, false), wp_generate_password(8, false), wp_generate_password(8, false)) ?></p>
</span><span class="cx">
</span><span class="lines">@@ -112,7 +113,8 @@
</span><span class="cx"> </tr>
</span><span class="cx"> <?php do_settings_fields('writing', 'post_via_email'); ?>
</span><span class="cx"> </table>
</span><del>-
</del><ins>+<?php } ?>
+<?php if ( !is_multisite() ) { ?>
</ins><span class="cx"> <h3><?php _e('Update Services') ?></h3>
</span><span class="cx">
</span><span class="cx"> <?php if ( get_option('blog_public') ) : ?>
</span><span class="lines">@@ -126,6 +128,7 @@
</span><span class="cx">         <p><?php printf(__('WordPress is not notifying any <a href="http://codex.wordpress.org/Update_Services">Update Services</a> because of your blog&#8217;s <a href="%s">privacy settings</a>.'), 'options-privacy.php'); ?></p>
</span><span class="cx">
</span><span class="cx"> <?php endif; ?>
</span><ins>+<?php } // multisite ?>
</ins><span class="cx">
</span><span class="cx"> <?php do_settings_sections('writing'); ?>
</span><span class="cx">
</span></span></pre></div>
<a id="trunkwpadminoptionsphp"></a>
<div class="modfile"><h4>Modified: trunk/wp-admin/options.php (12711 => 12712)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/wp-admin/options.php        2010-01-12 20:12:04 UTC (rev 12711)
+++ trunk/wp-admin/options.php        2010-01-12 21:11:52 UTC (rev 12712)
</span><span class="lines">@@ -38,6 +38,20 @@
</span><span class="cx"> if ( !current_user_can('manage_options') )
</span><span class="cx">         wp_die(__('Cheatin&#8217; uh?'));
</span><span class="cx">
</span><ins>+if ( is_multisite() && is_super_admin() && $_GET[ 'adminhash' ] ) {
+        $new_admin_details = get_option( 'adminhash' );
+        if( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && $new_admin_details[ 'newemail' ] != '' ) {
+                update_option( "admin_email", $new_admin_details[ 'newemail' ] );
+                delete_option( "adminhash" );
+                delete_option( "new_admin_email" );
+                wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" );
+                exit;
+        } else {
+                wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=false" );
+                exit;
+        }
+}
+
</ins><span class="cx"> switch($action) {
</span><span class="cx">
</span><span class="cx"> case 'update':
</span><span class="lines">@@ -55,6 +69,8 @@
</span><span class="cx">
</span><span class="cx">         if ( 'options' == $option_page ) {
</span><span class="cx">                 $options = explode(',', stripslashes( $_POST[ 'page_options' ] ));
</span><ins>+                if ( !is_super_admin() )
+                        wp_die( __( 'Not allowed here' ) );
</ins><span class="cx">         } else {
</span><span class="cx">                 $options = $whitelist_options[ $option_page ];
</span><span class="cx">         }
</span><span class="lines">@@ -90,6 +106,9 @@
</span><span class="cx">         break;
</span><span class="cx">
</span><span class="cx"> default:
</span><ins>+        if ( !is_super_admin() )
+                wp_die( __( 'Not admin' ) );
+
</ins><span class="cx">         include('admin-header.php'); ?>
</span><span class="cx">
</span><span class="cx"> <div class="wrap">
</span><span class="lines">@@ -99,6 +118,11 @@
</span><span class="cx"> <?php wp_nonce_field('options-options') ?>
</span><span class="cx"> <input type="hidden" name="action" value="update" />
</span><span class="cx"> <input type='hidden' name='option_page' value='options' />
</span><ins>+<?php if ( is_multisite() ) { ?>
+<p class="submit submit-top">
+        <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button-primary" />
+</p>
+<?php } ?>
</ins><span class="cx"> <table class="form-table">
</span><span class="cx"> <?php
</span><span class="cx"> $options = $wpdb->get_results("SELECT * FROM $wpdb->options ORDER BY option_name");
</span><span class="lines">@@ -106,6 +130,8 @@
</span><span class="cx"> foreach ( (array) $options as $option) :
</span><span class="cx">         $disabled = '';
</span><span class="cx">         $option->option_name = esc_attr($option->option_name);
</span><ins>+        if( $option->option_name == '' )
+                continue;
</ins><span class="cx">         if ( is_serialized($option->option_value) ) {
</span><span class="cx">                 if ( is_serialized_string($option->option_value) ) {
</span><span class="cx">                         // this is a serialized string, so we should display it
</span></span></pre>
</div>
</div>
</body>
</html>