From 15765a295fbe9373f39ba439ae2417f1e4e4058c Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Fri, 10 Apr 2015 21:12:53 +0100 Subject: [PATCH] Deprecate .php5 file extension Hello, 2015. Change-Id: I68b1ae842840be5aba62ca670f6af4e8de380869 --- RELEASE-NOTES-1.25 | 10 ++++++++++ api.php5 | 2 ++ img_auth.php5 | 2 ++ includes/Setup.php | 4 ++++ index.php5 | 2 ++ load.php5 | 2 ++ opensearch_desc.php5 | 2 ++ profileinfo.php5 | 2 ++ thumb.php5 | 2 ++ thumb_handler.php5 | 2 ++ 10 files changed, 30 insertions(+) diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25 index 530a80445c..e74474d0ef 100644 --- a/RELEASE-NOTES-1.25 +++ b/RELEASE-NOTES-1.25 @@ -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 diff --git a/api.php5 b/api.php5 index 524dfd5463..7512cdeb47 100644 --- a/api.php5 +++ b/api.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './api.php'; diff --git a/img_auth.php5 b/img_auth.php5 index 7aee69abd9..456c4f22c6 100644 --- a/img_auth.php5 +++ b/img_auth.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './img_auth.php'; diff --git a/includes/Setup.php b/includes/Setup.php index e28176850f..596e6055e9 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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 ); } diff --git a/index.php5 b/index.php5 index b2ffe50863..2a65c713d6 100644 --- a/index.php5 +++ b/index.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './index.php'; diff --git a/load.php5 b/load.php5 index fb3c7646cb..af161693da 100644 --- a/load.php5 +++ b/load.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './load.php'; diff --git a/opensearch_desc.php5 b/opensearch_desc.php5 index a4dde371e6..874920eac9 100644 --- a/opensearch_desc.php5 +++ b/opensearch_desc.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './opensearch_desc.php'; diff --git a/profileinfo.php5 b/profileinfo.php5 index 14ef421435..6d430f60c6 100644 --- a/profileinfo.php5 +++ b/profileinfo.php5 @@ -21,4 +21,6 @@ * @file */ +define( 'MW_ENTRY_PHP5', true ); + require './profileinfo.php'; diff --git a/thumb.php5 b/thumb.php5 index d07b86f1af..5bfe3284be 100644 --- a/thumb.php5 +++ b/thumb.php5 @@ -22,4 +22,6 @@ * @ingroup Media */ +define( 'MW_ENTRY_PHP5', true ); + require './thumb.php'; diff --git a/thumb_handler.php5 b/thumb_handler.php5 index 0e0c3c0b27..c9e10cd9db 100644 --- a/thumb_handler.php5 +++ b/thumb_handler.php5 @@ -22,4 +22,6 @@ * @ingroup Media */ +define( 'MW_ENTRY_PHP5', true ); + require './thumb_handler.php'; -- 2.20.1