add interval for external update-check; add parameter 'force' to Froxlor.checkUpdate() API call; fix session/language update when changing language
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -27,6 +27,7 @@ namespace Froxlor\Install;
|
||||
|
||||
use Froxlor\Froxlor;
|
||||
use Froxlor\FroxlorLogger;
|
||||
use Froxlor\Settings;
|
||||
|
||||
class Update
|
||||
{
|
||||
@@ -106,4 +107,24 @@ class Update
|
||||
|
||||
return Froxlor::versionCompare2($current_version, $version_to_check) == -1;
|
||||
}
|
||||
|
||||
public static function storeUpdateCheckData(array $response)
|
||||
{
|
||||
$data = [
|
||||
'ts' => time(),
|
||||
'channel' => Settings::Get('system.update_channel'),
|
||||
'data' => $response
|
||||
];
|
||||
Settings::Set('system.updatecheck_data', json_encode($data));
|
||||
}
|
||||
|
||||
public static function getUpdateCheckData()
|
||||
{
|
||||
$uc_data = Settings::Get('system.updatecheck_data');
|
||||
if (!empty($uc_data)) {
|
||||
$data = json_decode($uc_data, true);
|
||||
return $data;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user