Ticket #11881: 11881.fixes-setup-config-only.diff

File 11881.fixes-setup-config-only.diff, 2.3 KB (added by nacin, 3 years ago)

As a stopgap -- moves is_multisite() to new wp-includes/load.php and includes load.php from setup-config.php.

Line 
1Index: wp-settings.php
2===================================================================
3--- wp-settings.php     (revision 12723)
4+++ wp-settings.php     (working copy)
5@@ -9,20 +9,14 @@
6  * @package WordPress
7  */
8 
9-
10 /**
11- * Whether Multisite support is enabled
12+ * Stores the location of the WordPress directory of functions, classes, and core content.
13  *
14- * @since 3.0
15- *
16- * @return bool True if multisite is enabled, false otherwise.
17+ * @since 1.0.0
18  */
19-function is_multisite() {
20-       if ( ( defined('MULTISITE') && MULTISITE ) || defined('VHOST') || defined('SUNRISE') )
21-               return true;
22+define('WPINC', 'wp-includes');
23 
24-       return false;
25-}
26+require( ABSPATH . WPINC . '/load.php');
27 
28 if ( !defined('WP_MEMORY_LIMIT') ) {
29         if( is_multisite() ) {
30@@ -255,13 +249,6 @@
31 if ( !defined('MEDIA_TRASH') )
32        define('MEDIA_TRASH', false);
33 
34-/**
35- * Stores the location of the WordPress directory of functions, classes, and core content.
36- *
37- * @since 1.0.0
38- */
39-define('WPINC', 'wp-includes');
40-
41 if ( !defined('WP_LANG_DIR') ) {
42        /**
43         * Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
44Index: wp-includes/load.php
45===================================================================
46--- wp-includes/load.php        (revision 0)
47+++ wp-includes/load.php        (revision 0)
48@@ -0,0 +1,23 @@
49+<?php
50+
51+/**
52+ * Initialization functions.
53+ *
54+ * @package WordPress
55+ */
56+
57+/**
58+ * Whether Multisite support is enabled
59+ *
60+ * @since 3.0
61+ *
62+ * @return bool True if multisite is enabled, false otherwise.
63+ */
64+function is_multisite() {
65+       if ( ( defined('MULTISITE') && MULTISITE ) || defined('VHOST') || defined('SUNRISE') )
66+               return true;
67+
68+       return false;
69+}
70+
71+?>
72\ No newline at end of file
73Index: wp-admin/setup-config.php
74===================================================================
75--- wp-admin/setup-config.php   (revision 12723)
76+++ wp-admin/setup-config.php   (working copy)
77@@ -31,8 +31,10 @@
78 define('ABSPATH', dirname(dirname(__FILE__)).'/');
79 define('WPINC', 'wp-includes');
80 define('WP_CONTENT_DIR', ABSPATH . 'wp-content');
81+define('WP_DEBUG', false);
82 /**#@-*/
83 
84+require_once(ABSPATH . WPINC . '/load.php');
85 require_once(ABSPATH . WPINC . '/compat.php');
86 require_once(ABSPATH . WPINC . '/functions.php');
87 require_once(ABSPATH . WPINC . '/classes.php');