diff --git a/src/mibew/libs/classes/Mibew/Settings.php b/src/mibew/libs/classes/Mibew/Settings.php index 1bc712e2..8fe82d1d 100644 --- a/src/mibew/libs/classes/Mibew/Settings.php +++ b/src/mibew/libs/classes/Mibew/Settings.php @@ -53,11 +53,8 @@ Class Settings { /** * Settings class constructor. Set default values and load setting from database. - * @global $default_cron_key Default value for cron security key. Defined - * in libs/common/constants.php */ protected function __construct() { - global $default_cron_key; // Set default values $this->settings = array( 'dbversion' => 0, @@ -107,7 +104,7 @@ Class Settings { 'invitation_lifetime' => 60, /* Lifetime for invitation to chat */ 'tracking_lifetime' => 600, /* Time to store tracked old visitors' data */ - 'cron_key' => $default_cron_key, + 'cron_key' => DEFAULT_CRON_KEY, // System values are listed below. They cannot be changed via // administrative interface. Start names for these values from diff --git a/src/mibew/libs/common/constants.php b/src/mibew/libs/common/constants.php index 78b299fa..ca598115 100644 --- a/src/mibew/libs/common/constants.php +++ b/src/mibew/libs/common/constants.php @@ -40,10 +40,10 @@ define('SESSION_PREFIX', md5($mysqlhost.'##'.$mysqldb.'##'.$mysqlprefix) . '_'); * Default value for cron security key. * Another value can be set at operator/settings.php page. */ -$default_cron_key = md5( +define('DEFAULT_CRON_KEY', md5( $mysqlhost . '##' . $mysqldb . '##' . $mysqllogin. '##' . $mysqlpass . '##' . $mysqlprefix . '##' -); +)); /** * Name for cookie to track visitor