Replace unneded OC::needUpgrade with OCP method
This commit is contained in:
parent
e0998c27ff
commit
0864851001
10
lib/base.php
10
lib/base.php
|
@ -338,16 +338,6 @@ class OC {
|
||||||
die();
|
die();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* check if the instance needs to perform an upgrade
|
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
* @deprecated use \OCP\Util::needUpgrade() instead
|
|
||||||
*/
|
|
||||||
public static function needUpgrade() {
|
|
||||||
return \OCP\Util::needUpgrade();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if the version requires an update and shows
|
* Checks if the version requires an update and shows
|
||||||
* @param bool $showTemplate Whether an update screen should get shown
|
* @param bool $showTemplate Whether an update screen should get shown
|
||||||
|
|
|
@ -99,7 +99,7 @@ class BackgroundJob {
|
||||||
* @since 4.5.0
|
* @since 4.5.0
|
||||||
*/
|
*/
|
||||||
public static function addRegularTask($klass, $method) {
|
public static function addRegularTask($klass, $method) {
|
||||||
if (!\OC::needUpgrade()) {
|
if (!\OCP\Util::needUpgrade()) {
|
||||||
self::registerJob('OC\BackgroundJob\Legacy\RegularJob', array($klass, $method));
|
self::registerJob('OC\BackgroundJob\Legacy\RegularJob', array($klass, $method));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue