Clean up access points
* Harmonize spacing * Use // for comments rather than # * Harmonize call style for 'require', 'include' etc. * Add missing profileinfo.php5 * Use "./" for path to api.php in api.php5 (to match other php5 files). * Move documentation related to Setup.php from index.php to WebStart.php * Remove "Initialise common code." comment in api.php (was already remove in most entry points) Change-Id: I8dc4a79fd13cee49e34f250a4039b3666bd42aca
This commit is contained in:
parent
dc27e4cd0f
commit
86a9b8c06c
16 changed files with 52 additions and 27 deletions
1
api.php
1
api.php
|
|
@ -40,7 +40,6 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.
|
|||
wfPHPVersionError( 'api.php' );
|
||||
}
|
||||
|
||||
// Initialise common code.
|
||||
require __DIR__ . '/includes/WebStart.php';
|
||||
|
||||
wfProfileIn( 'api.php' );
|
||||
|
|
|
|||
6
api.php5
6
api.php5
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of api.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of api.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -21,4 +21,4 @@
|
|||
* @file
|
||||
*/
|
||||
|
||||
require 'api.php';
|
||||
require './api.php';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of img_auth.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of img_auth.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
<?php
|
||||
/**
|
||||
* This does the initial setup for a web request.
|
||||
* This does the initial set up for a web request.
|
||||
* It does some security checks, starts the profiler and loads the
|
||||
* configuration, and optionally loads Setup.php depending on whether
|
||||
* MW_NO_SETUP is defined.
|
||||
*
|
||||
* Setup.php (if loaded) then sets up GlobalFunctions, the AutoLoader,
|
||||
* and the configuration globals (though not $wgTitle).
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -40,9 +40,6 @@ if ( !function_exists( 'version_compare' ) || version_compare( phpversion(), '5.
|
|||
wfPHPVersionError( 'index.php' );
|
||||
}
|
||||
|
||||
# Initialise common code. This gives us access to GlobalFunctions, the
|
||||
# AutoLoader, and the globals $wgRequest, $wgOut, $wgUser, $wgLang and
|
||||
# $wgContLang, amongst others
|
||||
require __DIR__ . '/includes/WebStart.php';
|
||||
|
||||
$mediaWiki = new MediaWiki();
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of index.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of index.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of load.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of load.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@
|
|||
define( 'MW_CONFIG_CALLBACK', 'Installer::overrideConfig' );
|
||||
define( 'MEDIAWIKI_INSTALL', true );
|
||||
|
||||
// Resolve relative to regular MediaWiki root
|
||||
// instead of mw-config subdirectory.
|
||||
chdir( dirname( __DIR__ ) );
|
||||
require dirname( __DIR__ ) . '/includes/WebStart.php';
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of mw-config/index.php to used in web server requiring .php5
|
||||
* extension to execute scripts with PHP5 engine.
|
||||
* Version of mw-config/index.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -21,5 +21,6 @@
|
|||
* @file
|
||||
*/
|
||||
|
||||
define('MW_INSTALL_PHP5_EXT', 1);
|
||||
define( 'MW_INSTALL_PHP5_EXT', 1 );
|
||||
|
||||
require './index.php';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of opensearch_desc.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of opensearch_desc.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
24
profileinfo.php5
Normal file
24
profileinfo.php5
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of profileinfo.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along
|
||||
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
* http://www.gnu.org/copyleft/gpl.html
|
||||
*
|
||||
* @file
|
||||
*/
|
||||
|
||||
require './profileinfo.php';
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of thumb.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of thumb.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
|
||||
define( 'THUMB_HANDLER', true );
|
||||
|
||||
# Execute thumb.php, having set THUMB_HANDLER so that
|
||||
# it knows to extract params from a thumbnail file URL.
|
||||
// Execute thumb.php, having set THUMB_HANDLER so that
|
||||
// it knows to extract params from a thumbnail file URL.
|
||||
require __DIR__ . '/thumb.php';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/**
|
||||
* Version of thumb_handler.php to used in web server requiring .php5 extension
|
||||
* to execute scripts with PHP5 engine.
|
||||
* Version of thumb_handler.php to be used in web servers that require the .php5
|
||||
* extension to execute scripts with the PHP5 engine.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
<?php
|
||||
// stub file for compatibility with older versions
|
||||
// Stub file for compatibility with older versions of MediaWiki
|
||||
include_once './index.php';
|
||||
|
|
|
|||
Loading…
Reference in a new issue