SECURITY: Disallow loading JS/CSS/Json subpages from unregistered users and log
[lhc/web/wiklou.git] / includes / DevelopmentSettings.php
1 <?php
2 /**
3 * Extra settings useful for MediaWiki development.
4 *
5 * To enable built-in debug and development settings, add the
6 * following to your LocalSettings.php file.
7 *
8 * require "$IP/includes/DevelopmentSettings.php";
9 *
10 * Alternatively, if running phpunit.php (or another Maintenance script),
11 * you can use the --mwdebug option to automatically load these settings.
12 *
13 * @file
14 */
15
16 /**
17 * Debugging: PHP
18 */
19
20 // Enable showing of errors
21 error_reporting( -1 );
22 ini_set( 'display_errors', 1 );
23
24 /**
25 * Debugging: MediaWiki
26 */
27 global $wgDevelopmentWarnings, $wgShowDBErrorBacktrace, $wgShowExceptionDetails,
28 $wgShowSQLErrors, $wgDebugRawPage,
29 $wgDebugComments, $wgDebugDumpSql, $wgDebugTimestamps,
30 $wgCommandLineMode, $wgDebugLogFile, $wgDBerrorLog, $wgDebugLogGroups;
31
32 // Use of wfWarn() should cause tests to fail
33 $wgDevelopmentWarnings = true;
34
35 // Enable showing of errors
36 $wgShowDBErrorBacktrace = true;
37 $wgShowExceptionDetails = true;
38 $wgShowSQLErrors = true;
39 $wgDebugRawPage = true; // T49960
40
41 // Enable log files
42 $logDir = getenv( 'MW_LOG_DIR' );
43 if ( $logDir ) {
44 if ( $wgCommandLineMode ) {
45 $wgDebugLogFile = "$logDir/mw-debug-cli.log";
46 } else {
47 $wgDebugLogFile = "$logDir/mw-debug-www.log";
48 }
49 $wgDBerrorLog = "$logDir/mw-dberror.log";
50 $wgDebugLogGroups['ratelimit'] = "$logDir/mw-ratelimit.log";
51 $wgDebugLogGroups['exception'] = "$logDir/mw-exception.log";
52 $wgDebugLogGroups['error'] = "$logDir/mw-error.log";
53 }
54 unset( $logDir );