migrated a few functions to new Settings class and removed unused function createAWStatsVhost(), refs #1325
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -28,8 +28,8 @@
|
||||
*/
|
||||
function checkLastGuid() {
|
||||
|
||||
global $log, $cronlog, $settings;
|
||||
|
||||
global $log, $cronlog;
|
||||
|
||||
$mylog = null;
|
||||
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {
|
||||
$mylog = $cronlog;
|
||||
@@ -86,10 +86,9 @@ function checkLastGuid() {
|
||||
}
|
||||
|
||||
// now check if it differs from our settings
|
||||
if ($update_to_guid != $settings['system']['lastguid']) {
|
||||
if ($update_to_guid != Settings::Get('system.lastguid')) {
|
||||
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'Updating froxlor last guid to '.$update_to_guid);
|
||||
saveSetting('system', 'lastguid', $update_to_guid);
|
||||
$settings['system']['lastguid'] = $update_to_guid;
|
||||
Settings::Set('system.lastguid', $update_to_guid);
|
||||
}
|
||||
} else {
|
||||
$mylog->logAction(CRON_ACTION, LOG_NOTICE, 'File /etc/group not readable; cannot check for latest guid');
|
||||
|
||||
@@ -34,9 +34,7 @@
|
||||
*/
|
||||
function makeCryptPassword ($password) {
|
||||
|
||||
global $settings;
|
||||
|
||||
$type = isset($settings['system']['passwordcryptfunc']) ? (int)$settings['system']['passwordcryptfunc'] : 1;
|
||||
$type = isset(Settings::Get('system.passwordcryptfunc')) ? (int)Settings::Get('system.passwordcryptfunc') : 1;
|
||||
|
||||
switch ($type) {
|
||||
case 0:
|
||||
|
||||
Reference in New Issue
Block a user