migrate update/preconfig to a more OOP way and remove unnecessary file/dir complexity

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-05-01 16:48:43 +02:00
parent 1557482d17
commit c59c5efc11
14 changed files with 219 additions and 168 deletions

View File

@@ -25,6 +25,7 @@
namespace Froxlor\Install;
use Froxlor\Froxlor;
use Froxlor\FroxlorLogger;
class Update
@@ -96,4 +97,13 @@ class Update
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::ADM_ACTION, LOG_WARNING, 'Success');
}
}
public static function versionInUpdate($current_version, $version_to_check)
{
if (!Froxlor::isFroxlor()) {
return true;
}
return Froxlor::versionCompare2($current_version, $version_to_check) == -1;
}
}