mirror of
https://github.com/Mibew/mibew.git
synced 2025-03-05 03:13:38 +03:00
Remove $default_cron_key global variable
Use DEFAULT_CRON_KEY constant instead of global variable
This commit is contained in:
parent
1396cbc25f
commit
e53314f403
src/mibew/libs
@ -53,11 +53,8 @@ Class Settings {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Settings class constructor. Set default values and load setting from database.
|
* 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() {
|
protected function __construct() {
|
||||||
global $default_cron_key;
|
|
||||||
// Set default values
|
// Set default values
|
||||||
$this->settings = array(
|
$this->settings = array(
|
||||||
'dbversion' => 0,
|
'dbversion' => 0,
|
||||||
@ -107,7 +104,7 @@ Class Settings {
|
|||||||
'invitation_lifetime' => 60, /* Lifetime for invitation to chat */
|
'invitation_lifetime' => 60, /* Lifetime for invitation to chat */
|
||||||
'tracking_lifetime' => 600, /* Time to store tracked old visitors' data */
|
'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
|
// System values are listed below. They cannot be changed via
|
||||||
// administrative interface. Start names for these values from
|
// administrative interface. Start names for these values from
|
||||||
|
@ -40,10 +40,10 @@ define('SESSION_PREFIX', md5($mysqlhost.'##'.$mysqldb.'##'.$mysqlprefix) . '_');
|
|||||||
* Default value for cron security key.
|
* Default value for cron security key.
|
||||||
* Another value can be set at operator/settings.php page.
|
* Another value can be set at operator/settings.php page.
|
||||||
*/
|
*/
|
||||||
$default_cron_key = md5(
|
define('DEFAULT_CRON_KEY', md5(
|
||||||
$mysqlhost . '##' . $mysqldb . '##' . $mysqllogin. '##' .
|
$mysqlhost . '##' . $mysqldb . '##' . $mysqllogin. '##' .
|
||||||
$mysqlpass . '##' . $mysqlprefix . '##'
|
$mysqlpass . '##' . $mysqlprefix . '##'
|
||||||
);
|
));
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name for cookie to track visitor
|
* Name for cookie to track visitor
|
||||||
|
Loading…
Reference in New Issue
Block a user