Merge "Show a warning in edit preview when a template loop is detected"
[lhc/web/wiklou.git] / includes / PreConfigSetup.php
1 <?php
2 /**
3 * File-scope setup actions, loaded before LocalSettings.php, shared by
4 * WebStart.php and doMaintenance.php
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * http://www.gnu.org/copyleft/gpl.html
20 *
21 *
22 * @file
23 */
24
25 if ( !defined( 'MEDIAWIKI' ) ) {
26 // Not an entry point
27 exit( 1 );
28 }
29
30 // Grab profiling functions
31 require_once "$IP/includes/profiler/ProfilerFunctions.php";
32
33 // Start the autoloader, so that extensions can derive classes from core files
34 require_once "$IP/includes/AutoLoader.php";
35
36 // Load up some global defines.
37 require_once "$IP/includes/Defines.php";
38
39 // Start the profiler
40 $wgProfiler = [];
41 if ( file_exists( "$IP/StartProfiler.php" ) ) {
42 require "$IP/StartProfiler.php";
43 }
44
45 // Load default settings
46 require_once "$IP/includes/DefaultSettings.php";
47
48 // Load global functions
49 require_once "$IP/includes/GlobalFunctions.php";
50
51 // Load composer's autoloader if present
52 if ( is_readable( "$IP/vendor/autoload.php" ) ) {
53 require_once "$IP/vendor/autoload.php";
54 }