Commit 8ed9347e authored by Hugh Davenport's avatar Hugh Davenport Committed by Son Nguyen
Browse files

Set default dev options when not a prod site



Currently does the following:
 - Displays logging to screen as well as errorlog
 - Turn on debugjs, debugcss, and don't pack js
 - Print performance statistics to foot
 - Disable caching

Change-Id: I4571838ffea6b1510124bc14165eba8b3cc915c4
Signed-off-by: default avatarHugh Davenport <hugh@catalyst.net.nz>
parent b45e4637
......@@ -283,6 +283,16 @@ if (!$bcrypt_cost || !is_int($bcrypt_cost) || $bcrypt_cost < 4 || $bcrypt_cost >
}
$CFG->bcrypt_cost = sprintf('%02d', $bcrypt_cost);
if (!get_config('productionmode')) {
$CFG->log_dbg_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$CFG->log_info_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$CFG->log_warn_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$CFG->log_environ_targets = LOG_TARGET_SCREEN | LOG_TARGET_ERRORLOG;
$CFG->developermode = DEVMODE_DEBUGJS | DEVMODE_DEBUGCSS | DEVMODE_UNPACKEDJS;
$CFG->perftofoot = true;
$CFG->nocache = true;
}
header('Content-type: text/html; charset=UTF-8');
// Only do authentication once we know the page theme, so that the login form
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment