Index: trunk/phase3/maintenance/doMaintenance.php |
— | — | @@ -2,7 +2,7 @@ |
3 | 3 | /** |
4 | 4 | * We want to make this whole thing as seamless as possible to the |
5 | 5 | * end-user. Unfortunately, we can't do _all_ of the work in the class |
6 | | - * because A) included files are not in global scope, but in the scope |
| 6 | + * because A) included files are not in global scope, but in the scope |
7 | 7 | * of their caller, and B) MediaWiki has way too many globals. So instead |
8 | 8 | * we'll kinda fake it, and do the requires() inline. <3 PHP |
9 | 9 | * |
— | — | @@ -64,7 +64,12 @@ |
65 | 65 | if ( defined( 'MW_CONFIG_CALLBACK' ) ) { |
66 | 66 | # Use a callback function to configure MediaWiki |
67 | 67 | require_once( "$IP/includes/DefaultSettings.php" ); |
68 | | - call_user_func( MW_CONFIG_CALLBACK ); |
| 68 | + |
| 69 | + $callback = MW_CONFIG_CALLBACK; |
| 70 | + if ( strpos( $callback, '::' ) !== false ) { |
| 71 | + $callback = explode( '::', $callback, 2); |
| 72 | + } |
| 73 | + call_user_func( $callback ); |
69 | 74 | } elseif ( file_exists( "$IP/wmf-config/wikimedia-mode" ) ) { |
70 | 75 | // Load settings, using wikimedia-mode if needed |
71 | 76 | // Fixme: replace this hack with general farm-friendly code |
Index: trunk/phase3/includes/WebStart.php |
— | — | @@ -101,7 +101,12 @@ |
102 | 102 | if ( defined( 'MW_CONFIG_CALLBACK' ) ) { |
103 | 103 | # Use a callback function to configure MediaWiki |
104 | 104 | require_once( "$IP/includes/DefaultSettings.php" ); |
105 | | - call_user_func( MW_CONFIG_CALLBACK ); |
| 105 | + |
| 106 | + $callback = MW_CONFIG_CALLBACK; |
| 107 | + if ( strpos( $callback, '::' ) !== false ) { |
| 108 | + $callback = explode( '::', $callback, 2); |
| 109 | + } |
| 110 | + call_user_func( $callback ); |
106 | 111 | } else { |
107 | 112 | # LocalSettings.php is the per site customization file. If it does not exit |
108 | 113 | # the wiki installer need to be launched or the generated file moved from |