mirror of
https://github.com/processwire/processwire.git
synced 2025-08-14 10:45:54 +02:00
Update Config class to auto-generate a tableSalt when one is not available from the static configuration
This commit is contained in:
@@ -205,7 +205,13 @@ class Config extends WireData {
|
|||||||
$value = parent::get($key);
|
$value = parent::get($key);
|
||||||
if($value === null) {
|
if($value === null) {
|
||||||
// runtime properties
|
// runtime properties
|
||||||
if($key === 'serverProtocol') $value = $this->serverProtocol();
|
if($key === 'serverProtocol') {
|
||||||
|
$value = $this->serverProtocol();
|
||||||
|
} else if($key === 'tableSalt') {
|
||||||
|
$value = parent::get('installed');
|
||||||
|
if(!$value) $value = @filemtime($this->paths->assets . 'active.php');
|
||||||
|
$this->data['tableSalt'] = $value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return $value;
|
return $value;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user