Remove $default_cron_key global variable

Use DEFAULT_CRON_KEY constant instead of global variable
This commit is contained in:
Dmitriy Simushev 2014-01-17 11:30:43 +00:00
parent 1396cbc25f
commit e53314f403
2 changed files with 3 additions and 6 deletions

View File

@ -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

View File

@ -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