if(isset($conf['timezone'])&&$conf['timezone']!=''){// note: !empty($conf['timezone']) should give the same result and is more idiomatic for current versions of PHP (gwyneth 20220315)
date_default_timezone_set($conf['timezone']);
}
/**
* Class for defining (mostly static) methods that are commonly used across the whole application.
*
* @category unknown
* @package server
* @author Till Brehm
* @license bsd-3-clause
* @link empty
**/
classapp{
classapp{
/** @var array List of modules that have been loaded. */
var$loaded_modules=array();
var$loaded_modules=[];
var$loaded_plugins=array();
/** @var array List of plugins that have been loaded. */
var$loaded_plugins=[];
/** @var callable Script calling this. */
var$_calling_script='';
var$_calling_script='';
/**
/** @var resource? Database used for ISPConfig3. */
* @var db
*/
public$db;
public$db;
/**
* Class constructor, which depends on the global configuration stored in $conf.
*
* @param void
* @return void
*/
function__construct(){
function__construct(){
/** @var object Global object storing this application's configuration. */
$tmp_rec=$this->dbmaster->queryOneRecord("SELECT count(syslog_id) as number FROM sys_log WHERE datalog_id = ? AND loglevel = ?",$datalog_id,LOGLEVEL_ERROR);
$tmp_rec=$this->dbmaster->queryOneRecord("SELECT count(syslog_id) as number FROM sys_log WHERE datalog_id = ? AND loglevel = ?",$datalog_id,LOGLEVEL_ERROR);
//* Do not insert duplicate errors into the web log.
//* Do not insert duplicate errors into the web log.
...
@@ -198,18 +308,18 @@ class app {
...
@@ -198,18 +308,18 @@ class app {
// die("Unable to write to logfile.");
// die("Unable to write to logfile.");
//}
//}
}// if
}// if
// Send an email to the administrator if the current priority demands it.