set $wgTidyConfig to null and also set $wgUseTidy to true.
* $wgLogAutopatrol now defaults to false instead of true.
* $wgValidateAllHtml was removed and will be ignored.
+* $wgScriptExtension was removed (deprecated and ignored since 1.25).
+ See 1.25 release notes for more information.
=== New features in 1.31 ===
* (T76554) User sub-pages named ….json are now protected in the same way that ….js
maintenance/archives/patch-profiling.sql patch to the database.
To enable the profileinfo.php itself, you'll need to set $wgDBadminuser
- and $wgDBadminpassword in your LocalSettings.php, as well as $wgEnableProfileInfo
+ and $wgDBadminpassword in your LocalSettings.php, as well as $wgEnableProfileInfo
See also https://www.mediawiki.org/wiki/Manual:Profiling .
thumb.php
Script used to resize images if it is configured to be done when the web
browser requests the image and not when generating the page. This script can
be used as a 404 handler to generate image thumbs when they don't exist.
-
-There is also a file with a .php5 extension for each script. They can be used if
-the web server needs a .php5 to run the file with the PHP 5 engine and runs .php
-scripts with PHP 4. You should not use them anymore.
( strpos( PHP_SAPI, 'apache2filter' ) === false ) &&
( strpos( PHP_SAPI, 'isapi' ) === false );
-/**
- * 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.
- *
- * @since 1.11
- * @deprecated since 1.25; support for '.php5' has been 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';
-
/**@}*/
/************************************************************************//**
* - descBaseUrl URL of image description pages, e.g. https://en.wikipedia.org/wiki/File:
* - scriptDirUrl URL of the MediaWiki installation, equivalent to $wgScriptPath, e.g.
* https://en.wikipedia.org/w
- * - scriptExtension Script extension of the MediaWiki installation, equivalent to
- * $wgScriptExtension, e.g. ".php5". Defaults to ".php".
- *
* - articleUrl Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1
* - fetchDescription Fetch the text of the remote file description page. Equivalent to
* $wgFetchCommonsDescriptions.
$wgShellCgroup = false;
/**
- * Executable path of the PHP cli binary (php/php5). Should be set up on install.
+ * Executable path of the PHP cli binary. Should be set up on install.
*/
$wgPhpCli = '/usr/bin/php';
# T32219 : can not use pathinfo() on URLs since slashes do not match
$matches = [];
-$ext = 'php';
$path = '/';
foreach ( array_filter( explode( '/', $_SERVER['PHP_SELF'] ) ) as $part ) {
- if ( !preg_match( '/\.(php5?)$/', $part, $matches ) ) {
+ if ( !preg_match( '/\.(php)$/', $part, $matches ) ) {
$path .= "$part/";
} else {
- $ext = $matches[1] == 'php5' ? 'php5' : 'php';
break;
}
}
[
'wgVersion' => ( isset( $wgVersion ) ? $wgVersion : 'VERSION' ),
'path' => $path,
- 'ext' => $ext,
'localSettingsExists' => file_exists( MW_CONFIG_FILE ),
'installerStarted' => $installerStarted
]
'name' => 'local',
'directory' => $wgUploadDirectory,
'scriptDirUrl' => $wgScriptPath,
- 'scriptExtension' => '.php',
'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
'thumbScriptUrl' => $wgThumbnailScriptPath,
$router->add( "$wgScript/$1" );
if ( isset( $_SERVER['SCRIPT_NAME'] )
- && preg_match( '/\.php5?/', $_SERVER['SCRIPT_NAME'] )
+ && preg_match( '/\.php/', $_SERVER['SCRIPT_NAME'] )
) {
# Check for SCRIPT_NAME, we handle index.php explicitly
# But we do have some other .php files such as img_auth.php
*/
protected $scriptDirUrl;
- /** @var string Script extension of the MediaWiki installation, equivalent
- * to the old $wgScriptExtension, e.g. .php5 defaults to .php */
- protected $scriptExtension;
-
/** @var string Equivalent to $wgArticlePath, e.g. https://en.wikipedia.org/wiki/$1 */
protected $articleUrl;
$optionalSettings = [
'descBaseUrl', 'scriptDirUrl', 'articleUrl', 'fetchDescription',
'thumbScriptUrl', 'pathDisclosureProtection', 'descriptionCacheExpiry',
- 'scriptExtension', 'favicon', 'thumbProxyUrl', 'thumbProxySecret'
+ 'favicon', 'thumbProxyUrl', 'thumbProxySecret',
];
foreach ( $optionalSettings as $var ) {
if ( isset( $info[$var] ) ) {
*/
public function makeUrl( $query = '', $entry = 'index' ) {
if ( isset( $this->scriptDirUrl ) ) {
- $ext = isset( $this->scriptExtension ) ? $this->scriptExtension : '.php';
-
- return wfAppendQuery( "{$this->scriptDirUrl}/{$entry}{$ext}", $query );
+ return wfAppendQuery( "{$this->scriptDirUrl}/{$entry}.php", $query );
}
return false;
$optionalSettings = [
'url', 'thumbUrl', 'initialCapital', 'descBaseUrl', 'scriptDirUrl', 'articleUrl',
- 'fetchDescription', 'descriptionCacheExpiry', 'scriptExtension', 'favicon'
+ 'fetchDescription', 'descriptionCacheExpiry', 'favicon'
];
foreach ( $optionalSettings as $k ) {
if ( isset( $this->$k ) ) {
'wgUrlProtocols' => wfUrlProtocols(),
'wgArticlePath' => $conf->get( 'ArticlePath' ),
'wgScriptPath' => $conf->get( 'ScriptPath' ),
- 'wgScriptExtension' => '.php',
'wgScript' => wfScript(),
'wgSearchType' => $conf->get( 'SearchType' ),
'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
{{^localSettingsExists}}
<p>LocalSettings.php not found.</p>
{{#installerStarted}}
- <p>Please <a href="{{path}}mw-config/index.{{ext}}">complete the installation</a> and download LocalSettings.php.</p>
+ <p>Please <a href="{{path}}mw-config/index.php">complete the installation</a> and download LocalSettings.php.</p>
{{/installerStarted}}
{{^installerStarted}}
- <p>Please <a href="{{path}}mw-config/index.{{ext}}">set up the wiki</a> first.</p>
+ <p>Please <a href="{{path}}mw-config/index.php">set up the wiki</a> first.</p>
{{/installerStarted}}
{{/localSettingsExists}}
</div>
</body>
-</html>
\ No newline at end of file
+</html>
// For wfScript()
'ScriptPath' => '/w',
- 'ScriptExtension' => '.php',
'Script' => '/w/index.php',
'LoadScript' => '/w/load.php',
];