Changeset 12712 for trunk/wp-admin
- Timestamp:
- 01/12/2010 09:11:52 PM (15 years ago)
- Location:
- trunk/wp-admin
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin
-
Property
svn:ignore
set to
.categories.php.swp
-
Property
svn:ignore
set to
-
trunk/wp-admin/admin.php
r12583 r12712 28 28 do_action('after_db_upgrade'); 29 29 } elseif ( get_option('db_version') != $wp_db_version ) { 30 wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); 31 exit; 30 if ( !is_multisite() ) { 31 wp_redirect(admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); 32 exit; 33 } elseif ( apply_filters( 'do_mu_upgrade', true ) ) { 34 /** 35 * On really small MU installs run the upgrader every time, 36 * else run it less often to reduce load. 37 * 38 * @since 2.8.4b 39 */ 40 $c = get_blog_count(); 41 if ( $c <= 50 || ( $c > 50 && mt_rand( 0, (int)( $c / 50 ) ) == 1 ) ) { 42 require_once( ABSPATH . WPINC . '/http.php' ); 43 $response = wp_remote_get( admin_url( 'upgrade.php?step=1' ), array( 'timeout' => 120, 'httpversion' => '1.1' ) ); 44 do_action( 'after_mu_upgrade', $response ); 45 } 46 } 32 47 } 33 48 … … 46 61 set_screen_options(); 47 62 63 $posts_per_page = get_option('posts_per_page'); 48 64 $date_format = get_option('date_format'); 49 65 $time_format = get_option('time_format'); … … 95 111 } 96 112 97 if ( ! ( file_exists(WP_PLUGIN_DIR . "/$plugin_page") && is_file(WP_PLUGIN_DIR . "/$plugin_page") ) )113 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") ) ) 98 114 wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page))); 99 115 … … 103 119 require_once(ABSPATH . 'wp-admin/admin-header.php'); 104 120 105 include(WP_PLUGIN_DIR . "/$plugin_page"); 121 if ( file_exists(WPMU_PLUGIN_DIR . "/$plugin_page") ) 122 include(WPMU_PLUGIN_DIR . "/$plugin_page"); 123 else 124 include(ABSPATH . PLUGINDIR . "/$plugin_page"); 106 125 } 107 126 … … 140 159 141 160 define('WP_IMPORTING', true); 161 if ( is_multisite() ) { 162 kses_init_filters(); // Always filter imported data with kses. 163 } 142 164 143 165 call_user_func($wp_importers[$importer][2]); -
trunk/wp-admin/categories.php
r12694 r12712 298 298 <p><?php _e('The name is used to identify the category almost everywhere, for example under the post or in the category widget.'); ?></p> 299 299 </div> 300 300 <?php if ( is_multisite() ) { ?> 301 301 <div class="form-field"> 302 302 <label for="category_nicename"><?php _e('Category Slug') ?></label> … … 304 304 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 305 305 </div> 306 306 <?php } ?> 307 307 <div class="form-field"> 308 308 <label for="category_parent"><?php _e('Category Parent') ?></label> -
trunk/wp-admin/edit-category-form.php
r12675 r12712 59 59 <td><input name="cat_name" id="cat_name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td> 60 60 </tr> 61 <?php if ( is_multisite() ) { ?> 61 62 <tr class="form-field"> 62 63 <th scope="row" valign="top"><label for="category_nicename"><?php _e('Category Slug') ?></label></th> … … 64 65 <span class="description"><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></span></td> 65 66 </tr> 67 <?php } ?> 66 68 <tr class="form-field"> 67 69 <th scope="row" valign="top"><label for="category_parent"><?php _e('Category Parent') ?></label></th> -
trunk/wp-admin/edit-link-categories.php
r12546 r12712 201 201 <input name="name" id="name" type="text" value="" size="40" aria-required="true" /> 202 202 </div> 203 203 <?php if ( is_multisite() ) { ?> 204 204 <div class="form-field"> 205 205 <label for="slug"><?php _e('Link Category slug') ?></label> … … 207 207 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 208 208 </div> 209 209 <?php } ?> 210 210 <div class="form-field"> 211 211 <label for="description"><?php _e('Description (optional)') ?></label> -
trunk/wp-admin/edit-link-category-form.php
r12228 r12712 73 73 <td><input name="name" id="name" type="text" value="<?php echo esc_attr($category->name); ?>" size="40" aria-required="true" /></td> 74 74 </tr> 75 <?php if ( !is_multisite() ) { ?> 75 76 <tr class="form-field"> 76 77 <th scope="row" valign="top"><label for="slug"><?php _e('Link Category slug') ?></label></th> … … 78 79 <?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></td> 79 80 </tr> 81 <?php } ?> 80 82 <tr class="form-field"> 81 83 <th scope="row" valign="top"><label for="description"><?php _e('Description (optional)') ?></label></th> -
trunk/wp-admin/edit-tag-form.php
r12546 r12712 36 36 <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> 37 37 </tr> 38 <?php if ( !is_multisite() ) { ?> 38 39 <tr class="form-field"> 39 40 <th scope="row" valign="top"><label for="slug"><?php _e('Tag slug') ?></label></th> … … 41 42 <p class="description"><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td> 42 43 </tr> 44 <?php } ?> 43 45 <tr class="form-field"> 44 46 <th scope="row" valign="top"><label for="description"><?php _e('Description') ?></label></th> -
trunk/wp-admin/edit-tags.php
r12683 r12712 301 301 <p><?php _e('The name is how the tag appears on your site.'); ?></p> 302 302 </div> 303 303 <?php if ( !is_multisite() ) { ?> 304 304 <div class="form-field"> 305 305 <label for="slug"><?php _e('Tag slug') ?></label> … … 307 307 <p><?php _e('The “slug” is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p> 308 308 </div> 309 309 <?php } ?> 310 310 <div class="form-field"> 311 311 <label for="description"><?php _e('Description') ?></label> -
trunk/wp-admin/menu-header.php
r12597 r12712 16 16 $self = preg_replace('|^.*/wp-admin/|i', '', $_SERVER['PHP_SELF']); 17 17 $self = preg_replace('|^.*/plugins/|i', '', $self); 18 $self = preg_replace('|^.*/mu-plugins/|i', '', $self); 18 19 19 20 global $menu, $submenu, $parent_file; //For when admin-header is included from within a function. 21 $parent_file = apply_filters("parent_file", $parent_file); // For plugins to move submenu tabs around. 20 22 21 23 get_admin_page_parent(); -
trunk/wp-admin/options-discussion.php
r11958 r12712 53 53 <input name="comment_registration" type="checkbox" id="comment_registration" value="1" <?php checked('1', get_option('comment_registration')); ?> /> 54 54 <?php _e('Users must be registered and logged in to comment') ?> 55 <?php if ( !get_option( 'users_can_register' ) && is_multisite() ) _e( ' (Signup has been disabled. Only members of this site can comment)' ); ?> 55 56 </label> 56 57 <br /> -
trunk/wp-admin/options-general.php
r12507 r12712 71 71 <span class="description"><?php _e('In a few words, explain what this blog is about.') ?></span></td> 72 72 </tr> 73 <?php if ( !is_multisite() ) { ?> 73 74 <tr valign="top"> 74 75 <th scope="row"><label for="siteurl"><?php _e('WordPress address (URL)') ?></label></th> … … 98 99 </td> 99 100 </tr> 101 <?php } else { ?> 102 <tr valign="top"> 103 <th scope="row"><label for="new_admin_email"><?php _e('E-mail address') ?> </label></th> 104 <td><input name="new_admin_email" type="text" id="new_admin_email" value="<?php form_option('admin_email'); ?>" class="regular-text code" /> 105 <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> 106 </tr> 107 <?php } ?> 100 108 <tr> 101 109 <?php … … 282 290 </tr> 283 291 <?php do_settings_fields('general', 'default'); ?> 292 <?php 293 if ( is_multisite() && is_dir( ABSPATH . LANGDIR ) && $dh = opendir( ABSPATH . LANGDIR ) ) 294 while( ( $lang_file = readdir( $dh ) ) !== false ) 295 if( substr( $lang_file, -3 ) == '.mo' ) 296 $lang_files[] = $lang_file; 297 $lang = get_option('WPLANG'); 298 299 if( is_array($lang_files) && !empty($lang_files) ) { 300 ?> 301 <tr valign="top"> 302 <th width="33%" scope="row"><?php _e('Blog language:') ?></th> 303 <td> 304 <select name="WPLANG" id="WPLANG"> 305 <?php mu_dropdown_languages( $lang_files, get_option('WPLANG') ); ?> 306 </select> 307 </td> 308 </tr> 309 <?php 310 } // languages 311 ?> 284 312 </table> 285 313 -
trunk/wp-admin/options-misc.php
r12405 r12712 26 26 <form method="post" action="options.php"> 27 27 <?php settings_fields('misc'); ?> 28 28 <?php if ( !is_multisite() ) { ?> 29 29 <h3><?php _e('Uploading Files'); ?></h3> 30 30 <table class="form-table"> … … 66 66 67 67 </table> 68 68 <?php } ?> 69 69 <?php do_settings_sections('misc'); ?> 70 70 -
trunk/wp-admin/options-permalink.php
r12546 r12712 83 83 if (! empty($permalink_structure) ) 84 84 $permalink_structure = preg_replace('#/+#', '/', '/' . $_POST['permalink_structure']); 85 if ( is_multisite() && !is_subdomain_install() && $permalink_structure != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 86 $permalink_structure = '/blog' . $permalink_structure; 87 } 85 88 $wp_rewrite->set_permalink_structure($permalink_structure); 86 89 } … … 90 93 if (! empty($category_base) ) 91 94 $category_base = preg_replace('#/+#', '/', '/' . $_POST['category_base']); 95 if ( is_miltisite() && !is_subdomain_install() && $category_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 96 $category_base = '/blog' . $category_base; 97 } 92 98 $wp_rewrite->set_category_base($category_base); 93 99 } … … 97 103 if (! empty($tag_base) ) 98 104 $tag_base = preg_replace('#/+#', '/', '/' . $_POST['tag_base']); 105 if ( is_multisite() && !is_subdomain_install() && $tag_base != '' && $current_site->domain.$current_site->path == $current_blog->domain.$current_blog->path ) { 106 $tag_base = '/blog' . $tag_base; 107 } 99 108 $wp_rewrite->set_tag_base($tag_base); 100 109 } … … 195 204 </th> 196 205 <td> 206 <?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 ); }?> 197 207 <input name="permalink_structure" id="permalink_structure" type="text" value="<?php echo esc_attr($permalink_structure); ?>" class="regular-text code" /> 198 208 </td> … … 210 220 <tr> 211 221 <th><label for="category_base"><?php _e('Category base'); ?></label></th> 212 <td>< input name="category_base" id="category_base" type="text" value="<?php echo esc_attr($category_base); ?>" class="regular-text code" /></td>222 <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> 213 223 </tr> 214 224 <tr> 215 225 <th><label for="tag_base"><?php _e('Tag base'); ?></label></th> 216 <td>< input name="tag_base" id="tag_base" type="text" value="<?php echo esc_attr($tag_base); ?>" class="regular-text code" /></td>226 <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> 217 227 </tr> 218 228 <?php do_settings_fields('permalink', 'optional'); ?> … … 225 235 </p> 226 236 </form> 237 <?php if ( !is_multisite || is_super_admin() ) { ?> 227 238 <?php if ($iis7_permalinks) : 228 239 if ( isset($_POST['submit']) && $permalink_structure && ! $usingpi && ! $writable ) : … … 252 263 <?php endif; ?> 253 264 <?php endif; ?> 265 <?php } // multisite ?> 254 266 255 267 </div> -
trunk/wp-admin/options-writing.php
r11761 r12712 82 82 </table> 83 83 84 <?php if ( !is_multisite() || defined( 'POST_BY_EMAIL' ) ) { ?> 84 85 <h3><?php _e('Post via e-mail') ?></h3> 85 86 <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’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> … … 113 114 <?php do_settings_fields('writing', 'post_via_email'); ?> 114 115 </table> 115 116 <?php } ?> 117 <?php if ( !is_multisite() ) { ?> 116 118 <h3><?php _e('Update Services') ?></h3> 117 119 … … 127 129 128 130 <?php endif; ?> 131 <?php } // multisite ?> 129 132 130 133 <?php do_settings_sections('writing'); ?> -
trunk/wp-admin/options.php
r12507 r12712 39 39 wp_die(__('Cheatin’ uh?')); 40 40 41 if ( is_multisite() && is_super_admin() && $_GET[ 'adminhash' ] ) { 42 $new_admin_details = get_option( 'adminhash' ); 43 if( is_array( $new_admin_details ) && $new_admin_details[ 'hash' ] == $_GET[ 'adminhash' ] && $new_admin_details[ 'newemail' ] != '' ) { 44 update_option( "admin_email", $new_admin_details[ 'newemail' ] ); 45 delete_option( "adminhash" ); 46 delete_option( "new_admin_email" ); 47 wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=true" ); 48 exit; 49 } else { 50 wp_redirect( get_option( "siteurl" ) . "/wp-admin/options-general.php?updated=false" ); 51 exit; 52 } 53 } 54 41 55 switch($action) { 42 56 … … 56 70 if ( 'options' == $option_page ) { 57 71 $options = explode(',', stripslashes( $_POST[ 'page_options' ] )); 72 if ( !is_super_admin() ) 73 wp_die( __( 'Not allowed here' ) ); 58 74 } else { 59 75 $options = $whitelist_options[ $option_page ]; … … 91 107 92 108 default: 109 if ( !is_super_admin() ) 110 wp_die( __( 'Not admin' ) ); 111 93 112 include('admin-header.php'); ?> 94 113 … … 100 119 <input type="hidden" name="action" value="update" /> 101 120 <input type='hidden' name='option_page' value='options' /> 121 <?php if ( is_multisite() ) { ?> 122 <p class="submit submit-top"> 123 <input type="submit" name="Submit" value="<?php _e('Save Changes') ?>" class="button-primary" /> 124 </p> 125 <?php } ?> 102 126 <table class="form-table"> 103 127 <?php … … 107 131 $disabled = ''; 108 132 $option->option_name = esc_attr($option->option_name); 133 if( $option->option_name == '' ) 134 continue; 109 135 if ( is_serialized($option->option_value) ) { 110 136 if ( is_serialized_string($option->option_value) ) {
Note: See TracChangeset
for help on using the changeset viewer.