make cronjobs also classes and began to refactor the whole cronjob stuff
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -53,4 +53,46 @@ final class Froxlor
|
||||
{
|
||||
return self::getFullVersion() . ' (' . self::DBVERSION . ')';
|
||||
}
|
||||
|
||||
/**
|
||||
* Function hasUpdates
|
||||
*
|
||||
* checks if a given version is not equal the current one
|
||||
*
|
||||
* @param string $to_check
|
||||
* version to check, if empty current version is used
|
||||
*
|
||||
* @return bool true if version to check does not match, else false
|
||||
*/
|
||||
public static function hasUpdates($to_check = null)
|
||||
{
|
||||
if (empty($to_check)) {
|
||||
$to_check = self::VERSION;
|
||||
}
|
||||
if (Settings::Get('panel.version') == null || Settings::Get('panel.version') != $to_check) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function hasUpdates
|
||||
*
|
||||
* checks if a given database-version is not equal the current one
|
||||
*
|
||||
* @param int $to_check
|
||||
* version to check, if empty current dbversion is used
|
||||
*
|
||||
* @return bool true if version to check does not match, else false
|
||||
*/
|
||||
public static function hasDbUpdates($to_check = null)
|
||||
{
|
||||
if (empty($to_check)) {
|
||||
$to_check = self::DBVERSION;
|
||||
}
|
||||
if (Settings::Get('panel.db_version') == null || Settings::Get('panel.db_version') != $to_check) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user