MediaWiki  1.29.2
WebStart.php File Reference

This does the initial set up for a web request. More...

Go to the source code of this file.

Variables

 $IP = getenv( 'MW_INSTALL_PATH' )
 
 $wgProfiler = []
 
float $wgRequestTime = $_SERVER['REQUEST_TIME_FLOAT']
 Request start time as fractional seconds since epoch. More...
 
if(defined( 'MW_CONFIG_CALLBACK')) else
 
 if ($IP===false)
 
const MEDIAWIKI true
 

Detailed Description

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.

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

Definition in file WebStart.php.

Variable Documentation

◆ $IP

$IP = getenv( 'MW_INSTALL_PATH' )

Definition at line 58 of file WebStart.php.

◆ $wgProfiler

◆ $wgRequestTime

float $wgRequestTime = $_SERVER['REQUEST_TIME_FLOAT']

Request start time as fractional seconds since epoch.

Deprecated:
since 1.25; use $_SERVER['REQUEST_TIME_FLOAT'] or WebRequest::getElapsedTime() instead.

Definition at line 43 of file WebStart.php.

Referenced by RebuildFileCache\execute(), MWDebug\getDebugInfo(), and Maintenance\setup().

◆ else

if (defined('MW_CONFIG_CALLBACK')) else
Initial value:
{
if ( !defined( 'MW_CONFIG_FILE' ) ) {
define( 'MW_CONFIG_FILE', "$IP/LocalSettings.php" );
}
# LocalSettings.php is the per site customization file. If it does not exist
# the wiki installer needs to be launched or the generated file uploaded to
# the root wiki directory. Give a hint, if it is not readable by the server.
if ( !is_readable( MW_CONFIG_FILE ) ) {
require_once "$IP/includes/NoLocalSettings.php";
die();
}
# Include site settings. $IP may be changed (hopefully before the AutoLoader is invoked)
require_once MW_CONFIG_FILE

Definition at line 113 of file WebStart.php.

◆ if

if(ob_get_level()==0)

Definition at line 59 of file WebStart.php.

◆ MEDIAWIKI

const MEDIAWIKI true

Definition at line 52 of file WebStart.php.