Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Mar 27, 2018
2 parents 8e858a5 + 3d54a47 commit 24deea2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 7 additions & 1 deletion application/config/config-defaults.php
Expand Up @@ -680,7 +680,13 @@
// Hide update key
$config['hide_update_key'] = false;


// Dev part
// 1 : looking for errors, 2 : PHP STRICT error messages
$config['debug'] = 0;
//1 to enable sql logging, only active when debug = 2
$config['debugsql'] = 0;
//Try to set if able PHP max_execution_time
$config['max_execution_time'] = 1200;

// When this parameter is true, the configuration of the XML file will be used instead of the database to display the themes (default behavior in 2.50+).
// This is useful when developing a theme, so changes to XML files are immediately applied without the need to uninstall and reinstall the theme.
Expand Down
8 changes: 4 additions & 4 deletions application/core/LSYii_Controller.php
Expand Up @@ -94,16 +94,16 @@ protected function _init()
}

if (!function_exists('mb_convert_encoding')) {
$dieoutput .= "This script needs the PHP Multibyte String Functions library installed: See <a href='http://manual.limesurvey.org/wiki/Installation_FAQ'>FAQ</a> and <a href='http://de.php.net/manual/en/ref.mbstring.php'>PHP documentation</a><br />";
$dieoutput .= "This script needs the PHP Multibyte String Functions library installed: See <a href='http://manual.limesurvey.org/wiki/Installation_FAQ'>FAQ</a> and <a href='http://de.php.net/manual/en/ref.mbstring.php'>PHP documentation</a><br />";
}

if ($dieoutput != '') {
throw new CException($dieoutput);
throw new CException($dieoutput);
}

if (ini_get("max_execution_time") < 1200) {
if (ini_get("max_execution_time") < Yii::app()->getConfig('max_execution_time')) {
try {
set_time_limit(1200); // Maximum execution time - works only if safe_mode is off
set_time_limit(Yii::app()->getConfig('max_execution_time')); // Maximum execution time - works only if safe_mode is off
} catch (Exception $e) {};
}
if (ini_get('memory_limit') != -1 && convertPHPSizeToBytes(ini_get("memory_limit")) < convertPHPSizeToBytes(Yii::app()->getConfig('memory_limit').'M')) {
Expand Down

0 comments on commit 24deea2

Please sign in to comment.