Deprecate .php5 file extension
authorTimo Tijhof <krinklemail@gmail.com>
Fri, 10 Apr 2015 20:12:53 +0000 (21:12 +0100)
committerOri Livneh <ori@wikimedia.org>
Wed, 22 Apr 2015 18:54:58 +0000 (11:54 -0700)
Hello, 2015.

Change-Id: I68b1ae842840be5aba62ca670f6af4e8de380869

RELEASE-NOTES-1.25
api.php5
img_auth.php5
includes/Setup.php
index.php5
load.php5
opensearch_desc.php5
profileinfo.php5
thumb.php5
thumb_handler.php5

index 530a804..e74474d 100644 (file)
@@ -482,9 +482,19 @@ 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:
+
+    RewriteEngine On
+    RewriteBase /
+    RewriteRule ^(.*)\.php5 $1.php [R=301,L]
+
 * The global importScript and importStylesheet functions, as well as the loadedScripts object,
   from wikibits.js (deprecated since 1.17) now emit warnings through mw.log.warn when accessed.
 
+
 == Compatibility ==
 
 MediaWiki 1.25 requires PHP 5.3.3 or later. There is experimental support for
index 524dfd5..7512cde 100644 (file)
--- a/api.php5
+++ b/api.php5
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './api.php';
index 7aee69a..456c4f2 100644 (file)
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './img_auth.php';
index e281768..596e605 100644 (file)
@@ -488,6 +488,10 @@ 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 ( $wgCanonicalServer === false ) {
        $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
 }
index b2ffe50..2a65c71 100644 (file)
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './index.php';
index fb3c764..af16169 100644 (file)
--- a/load.php5
+++ b/load.php5
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './load.php';
index a4dde37..874920e 100644 (file)
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './opensearch_desc.php';
index 14ef421..6d430f6 100644 (file)
@@ -21,4 +21,6 @@
  * @file
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './profileinfo.php';
index d07b86f..5bfe328 100644 (file)
@@ -22,4 +22,6 @@
  * @ingroup Media
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './thumb.php';
index 0e0c3c0..c9e10cd 100644 (file)
@@ -22,4 +22,6 @@
  * @ingroup Media
  */
 
+define( 'MW_ENTRY_PHP5', true );
+
 require './thumb_handler.php';