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:
Michael Kaufmann (d00p)
2013-12-15 13:05:19 +01:00
parent 558108008a
commit 52aaedd33a
15 changed files with 85 additions and 177 deletions

View File

@@ -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');

View File

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