Follow-up for I68b1ae842: Deprecate $wgScriptExtension as well
authorOri Livneh <ori@wikimedia.org>
Wed, 22 Apr 2015 19:03:36 +0000 (12:03 -0700)
committerOri.livneh <ori@wikimedia.org>
Mon, 11 May 2015 18:17:04 +0000 (18:17 +0000)
Change-Id: I3690f78bc57030d3f1e3992554ba0ae7eb393273

RELEASE-NOTES-1.25
includes/DefaultSettings.php
includes/Setup.php

index e91a02e..3303f30 100644 (file)
@@ -489,10 +489,11 @@ changes to languages because of Bugzilla reports.
 * $wgResourceModuleSkinStyles no longer supports per-module local or remote paths. They
   can only be set for the entire skin.
 * Removed global function swap(). (deprecated since 1.24)
-* Deprecated the ".php5" file extension entry points. Refer to the ".php" files
-  instead. If you want ".php5" URLs to continue to work, set up redirects. In
-  Apache, this can be done by enabling mod_rewrite and adding the following
-  rules to your configuration:
+* Deprecated the ".php5" file extension entry points and the $wgScriptExtension
+  configuration variable. Refer to the ".php" files instead. If you want
+  ".php5" URLs to continue to work, set up redirects. In Apache, this can be
+  done by enabling mod_rewrite and adding the following rules to your
+  configuration:
 
     RewriteEngine On
     RewriteBase /
index 3ca54b5..31724f6 100644 (file)
@@ -154,12 +154,15 @@ $wgUsePathInfo = ( strpos( PHP_SAPI, 'cgi' ) === false ) &&
        ( strpos( PHP_SAPI, 'isapi' ) === false );
 
 /**
- * The extension to append to script names by default. This can either be .php
- * or .php5.
+ * The extension to append to script names by default.
+ *
+ * Some hosting providers used PHP 4 for *.php files, and PHP 5 for *.php5.
+ * This variable was provided to support those providers.
  *
- * Some hosting providers use PHP 4 for *.php files, and PHP 5 for *.php5. This
- * variable is provided to support those providers.
  * @since 1.11
+ * @deprecated since 1.25; support for '.php5' is being phased out of MediaWiki
+ *  proper. Backward-compatibility can be maintained by configuring your web
+ *  server to rewrite URLs. See RELEASE-NOTES for details.
  */
 $wgScriptExtension = '.php';
 
index 7a33328..1324ed8 100644 (file)
@@ -485,8 +485,8 @@ require_once "$IP/includes/libs/normal/UtfNormalUtil.php";
 
 $ps_default2 = Profiler::instance()->scopedProfileIn( $fname . '-defaults2' );
 
-if ( defined( 'MW_ENTRY_PHP5' ) ) {
-       wfWarn( 'The ".php5" entry point files are deprecated. Use ".php" instead.' );
+if ( $wgScriptExtension !== '.php' || defined( 'MW_ENTRY_PHP5' ) ) {
+       wfWarn( 'Script extensions other than ".php" are deprecated.' );
 }
 
 if ( $wgCanonicalServer === false ) {