| Index: trunk/phase3/maintenance/doMaintenance.php |
| — | — | @@ -61,11 +61,10 @@ |
| 62 | 62 | // Some other requires |
| 63 | 63 | require_once( "$IP/includes/AutoLoader.php" ); |
| 64 | 64 | require_once( "$IP/includes/Defines.php" ); |
| | 65 | +require_once( "$IP/includes/DefaultSettings.php" ); |
| 65 | 66 | |
| 66 | 67 | if ( defined( 'MW_CONFIG_CALLBACK' ) ) { |
| 67 | 68 | # Use a callback function to configure MediaWiki |
| 68 | | - require_once( "$IP/includes/DefaultSettings.php" ); |
| 69 | | - |
| 70 | 69 | $callback = MW_CONFIG_CALLBACK; |
| 71 | 70 | # PHP 5.1 doesn't support "class::method" for call_user_func, so split it |
| 72 | 71 | if ( strpos( $callback, '::' ) !== false ) { |
| Index: trunk/phase3/includes/RecentChange.php |
| — | — | @@ -674,7 +674,7 @@ |
| 675 | 675 | $flag .= ($rc_new ? "N" : "") . ($rc_minor ? "M" : "") . ($rc_bot ? "B" : ""); |
| 676 | 676 | } |
| 677 | 677 | |
| 678 | | - if ( $wgRC2UDPInterwikiPrefix === true ) { |
| | 678 | + if ( $wgRC2UDPInterwikiPrefix === true && $wgLocalInterwiki !== false ) { |
| 679 | 679 | $prefix = $wgLocalInterwiki; |
| 680 | 680 | } elseif ( $wgRC2UDPInterwikiPrefix ) { |
| 681 | 681 | $prefix = $wgRC2UDPInterwikiPrefix; |
| Index: trunk/phase3/includes/Setup.php |
| — | — | @@ -289,6 +289,9 @@ |
| 290 | 290 | else $wgHtml5Version = 'HTML+RDFa 1.0'; |
| 291 | 291 | } |
| 292 | 292 | |
| | 293 | +if ( $wgInvalidateCacheOnLocalSettingsChange ) { |
| | 294 | + $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) ); |
| | 295 | +} |
| 293 | 296 | |
| 294 | 297 | wfProfileOut( $fname.'-misc1' ); |
| 295 | 298 | wfProfileIn( $fname.'-memcached' ); |
| Index: trunk/phase3/includes/installer/LocalSettingsGenerator.php |
| — | — | @@ -197,21 +197,11 @@ |
| 198 | 198 | # Further documentation for configuration settings may be found at: |
| 199 | 199 | # http://www.mediawiki.org/wiki/Manual:Configuration_settings |
| 200 | 200 | |
| 201 | | -# If you customize your file layout, set \$IP to the directory that contains |
| 202 | | -# the other MediaWiki files. It will be used as a base to locate files. |
| 203 | | -if( defined( 'MW_INSTALL_PATH' ) ) { |
| 204 | | - \$IP = MW_INSTALL_PATH; |
| 205 | | -} else { |
| 206 | | - \$IP = dirname( __FILE__ ); |
| | 201 | +# Protect against web entry |
| | 202 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| | 203 | + exit; |
| 207 | 204 | } |
| 208 | 205 | |
| 209 | | -require_once( \"\$IP/includes/DefaultSettings.php\" ); |
| 210 | | - |
| 211 | | -if ( \$wgCommandLineMode ) { |
| 212 | | - if ( isset( \$_SERVER ) && array_key_exists( 'REQUEST_METHOD', \$_SERVER ) ) { |
| 213 | | - die( \"This script must be run from the command line\\n\" ); |
| 214 | | - } |
| 215 | | -} |
| 216 | 206 | ## Uncomment this to disable output compression |
| 217 | 207 | # \$wgDisableOutputCompression = true; |
| 218 | 208 | |
| — | — | @@ -285,8 +275,6 @@ |
| 286 | 276 | ## be publically accessible from the web. |
| 287 | 277 | #\$wgCacheDirectory = \"\$IP/cache\"; |
| 288 | 278 | |
| 289 | | -\$wgLocalInterwiki = strtolower( \$wgSitename ); |
| 290 | | - |
| 291 | 279 | # Site language code, should be one of ./languages/Language(.*).php |
| 292 | 280 | \$wgLanguageCode = \"{$this->values['wgLanguageCode']}\"; |
| 293 | 281 | |
| — | — | @@ -313,10 +301,6 @@ |
| 314 | 302 | # Path to the GNU diff3 utility. Used for conflict resolution. |
| 315 | 303 | \$wgDiff3 = \"{$this->values['wgDiff3']}\"; |
| 316 | 304 | |
| 317 | | -# When you make changes to this configuration file, this will make |
| 318 | | -# sure that cached pages are cleared. |
| 319 | | -\$wgCacheEpoch = max( \$wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) ); |
| 320 | | - |
| 321 | 305 | # Enabled Extensions. Most extensions are enabled by including the base extension file here |
| 322 | 306 | # but check specific extension documentation for more details |
| 323 | 307 | "; |
| Index: trunk/phase3/includes/WebStart.php |
| — | — | @@ -91,11 +91,11 @@ |
| 92 | 92 | |
| 93 | 93 | # Start the autoloader, so that extensions can derive classes from core files |
| 94 | 94 | require_once( "$IP/includes/AutoLoader.php" ); |
| | 95 | +# Load default settings |
| | 96 | +require_once( "$IP/includes/DefaultSettings.php" ); |
| 95 | 97 | |
| 96 | 98 | if ( defined( 'MW_CONFIG_CALLBACK' ) ) { |
| 97 | 99 | # Use a callback function to configure MediaWiki |
| 98 | | - require_once( "$IP/includes/DefaultSettings.php" ); |
| 99 | | - |
| 100 | 100 | $callback = MW_CONFIG_CALLBACK; |
| 101 | 101 | # PHP 5.1 doesn't support "class::method" for call_user_func, so split it |
| 102 | 102 | if ( strpos( $callback, '::' ) !== false ) { |
| — | — | @@ -110,7 +110,6 @@ |
| 111 | 111 | # the wiki installer needs to be launched or the generated file moved from |
| 112 | 112 | # ./config/ to ./ |
| 113 | 113 | if( !file_exists( MW_CONFIG_FILE ) ) { |
| 114 | | - require_once( "$IP/includes/DefaultSettings.php" ); # used for printing the version |
| 115 | 114 | require_once( "$IP/includes/templates/NoLocalSettings.php" ); |
| 116 | 115 | die(); |
| 117 | 116 | } |
| Index: trunk/phase3/includes/Title.php |
| — | — | @@ -2645,7 +2645,9 @@ |
| 2646 | 2646 | $this->mInterwiki = $wgContLang->lc( $p ); |
| 2647 | 2647 | |
| 2648 | 2648 | # Redundant interwiki prefix to the local wiki |
| 2649 | | - if ( 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) { |
| | 2649 | + if ( $wgLocalInterwiki !== false |
| | 2650 | + && 0 == strcasecmp( $this->mInterwiki, $wgLocalInterwiki ) ) |
| | 2651 | + { |
| 2650 | 2652 | if ( $dbkey == '' ) { |
| 2651 | 2653 | # Can't have an empty self-link |
| 2652 | 2654 | return false; |
| Index: trunk/phase3/includes/DefaultSettings.php |
| — | — | @@ -26,7 +26,6 @@ |
| 27 | 27 | die( 1 ); |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | | - |
| 31 | 30 | # Create a site configuration object. Not used for much in a default install |
| 32 | 31 | if ( !defined( 'MW_PHP4' ) ) { |
| 33 | 32 | require_once( "$IP/includes/SiteConfiguration.php" ); |
| — | — | @@ -140,7 +139,6 @@ |
| 141 | 140 | * Defaults to "{$wgScriptPath}/redirect{$wgScriptExtension}". |
| 142 | 141 | */ |
| 143 | 142 | $wgRedirectScript = false; ///< defaults to |
| 144 | | -/**@}*/ |
| 145 | 143 | |
| 146 | 144 | /** |
| 147 | 145 | * The URL path to load.php. |
| — | — | @@ -149,6 +147,8 @@ |
| 150 | 148 | */ |
| 151 | 149 | $wgLoadScript = false; |
| 152 | 150 | |
| | 151 | +/**@}*/ |
| | 152 | + |
| 153 | 153 | /************************************************************************//** |
| 154 | 154 | * @name URLs and file paths |
| 155 | 155 | * |
| — | — | @@ -1665,6 +1665,17 @@ |
| 1666 | 1666 | */ |
| 1667 | 1667 | $wgClockSkewFudge = 5; |
| 1668 | 1668 | |
| | 1669 | +/** |
| | 1670 | + * Invalidate various caches when LocalSettings.php changes. This is equivalent |
| | 1671 | + * to setting $wgCacheEpoch to the modification time of LocalSettings.php, as |
| | 1672 | + * was previously done in the default LocalSettings.php file. |
| | 1673 | + * |
| | 1674 | + * On high-traffic wikis, this should be set to false, to avoid the need to |
| | 1675 | + * check the file modification time, and to avoid the performance impact of |
| | 1676 | + * unnecessary cache invalidations. |
| | 1677 | + */ |
| | 1678 | +$wgInvalidateCacheOnLocalSettingsChange = true; |
| | 1679 | + |
| 1669 | 1680 | /** @} */ # end of cache settings |
| 1670 | 1681 | |
| 1671 | 1682 | /************************************************************************//** |
| — | — | @@ -2486,9 +2497,16 @@ |
| 2487 | 2498 | */ |
| 2488 | 2499 | $wgLegalTitleChars = " %!\"$&'()*,\\-.\\/0-9:;=?@A-Z\\\\^_`a-z~\\x80-\\xFF+"; |
| 2489 | 2500 | |
| 2490 | | -$wgLocalInterwiki = 'w'; |
| 2491 | | -$wgInterwikiExpiry = 10800; # Expiry time for cache of interwiki table |
| | 2501 | +/** |
| | 2502 | + * The interwiki prefix of the current wiki, or false if it doesn't have one. |
| | 2503 | + */ |
| | 2504 | +$wgLocalInterwiki = false; |
| 2492 | 2505 | |
| | 2506 | +/** |
| | 2507 | + * Expiry time for cache of interwiki table |
| | 2508 | + */ |
| | 2509 | +$wgInterwikiExpiry = 10800; |
| | 2510 | + |
| 2493 | 2511 | /** Interwiki caching settings. |
| 2494 | 2512 | $wgInterwikiCache specifies path to constant database file |
| 2495 | 2513 | This cdb database is generated by dumpInterwiki from maintenance |
| Index: trunk/phase3/RELEASE-NOTES |
| — | — | @@ -91,6 +91,11 @@ |
| 92 | 92 | the footers of skins. |
| 93 | 93 | * $wgFileCacheDepth can be used to set the depth of the subdirectory hierarchy |
| 94 | 94 | used for the file cache. Default value is 2, which matches former behavior |
| | 95 | +* It's no longer necessary for LocalSettings.php to include DefaultSettings.php. |
| | 96 | +* It's no longer necessary to set $wgCacheEpoch to the file modification time |
| | 97 | + of LocalSettings.php, in LocalSettings.php itself. Instead, this is done |
| | 98 | + automatically if $wgInvalidateCacheOnLocalSettingsChange is true (which is |
| | 99 | + the default). |
| 95 | 100 | |
| 96 | 101 | === New features in 1.17 === |
| 97 | 102 | * (bug 10183) Users can now add personal styles and scripts to all skins via |