Make WordPress Core


Ignore:
Timestamp:
01/12/2010 09:11:52 PM (15 years ago)
Author:
wpmuguru
Message:

merge multisite admin - edit links,tags,cats,options, See #11644

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin

    • Property svn:ignore set to
      .categories.php.swp
  • trunk/wp-admin/admin.php

    r12583 r12712  
    2828    do_action('after_db_upgrade');
    2929} 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    }
    3247}
    3348
     
    4661set_screen_options();
    4762
     63$posts_per_page = get_option('posts_per_page');
    4864$date_format = get_option('date_format');
    4965$time_format = get_option('time_format');
     
    95111        }
    96112
    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") ) )
    98114            wp_die(sprintf(__('Cannot load %s.'), htmlentities($plugin_page)));
    99115
     
    103119            require_once(ABSPATH . 'wp-admin/admin-header.php');
    104120
    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");
    106125    }
    107126
     
    140159
    141160    define('WP_IMPORTING', true);
     161    if ( is_multisite() ) {
     162        kses_init_filters();  // Always filter imported data with kses.
     163    }
    142164
    143165    call_user_func($wp_importers[$importer][2]);
Note: See TracChangeset for help on using the changeset viewer.