- improved last-guid sanity check on update to 0.9.1, fixes #34
- replacing deprecated functions in PHP-5.3 (no external libraries for now like phpmailer), refs #35
This commit is contained in:
@@ -138,22 +138,22 @@ function showUpdateStep($task = null, $needs_status = true)
|
||||
*
|
||||
* @return string formatted output and log-entry
|
||||
*/
|
||||
function lastStepStatus($status = -1)
|
||||
function lastStepStatus($status = -1, $message = '')
|
||||
{
|
||||
global $updatelog;
|
||||
|
||||
switch($status)
|
||||
{
|
||||
case 0:
|
||||
$status_sign = '[OK]';
|
||||
$status_sign = ($message != '') ? '['.$message.']' : '[OK]';
|
||||
$status_color = '1dcd00';
|
||||
break;
|
||||
case 1:
|
||||
$status_sign = '[??]';
|
||||
$status_sign = ($message != '') ? '['.$message.']' : '[??]';
|
||||
$status_color = 'db7100';
|
||||
break;
|
||||
case 2:
|
||||
$status_sign = '[!!]';
|
||||
$status_sign = ($message != '') ? '['.$message.']' : '[!!]';
|
||||
$status_color = 'ff0000';
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -64,7 +64,7 @@ function checkLastGuid($froxlor_guid = 0)
|
||||
continue;
|
||||
}
|
||||
|
||||
$guid = (int)$group[2];
|
||||
$guid = isset($group[2]) ? (int)$group[2] : 0;
|
||||
|
||||
if($guid > $froxlor_guid)
|
||||
{
|
||||
@@ -76,6 +76,7 @@ function checkLastGuid($froxlor_guid = 0)
|
||||
{
|
||||
$cronlog->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;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user