aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/legacy
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2022-12-08 10:55:19 +0100
committerThomas Citharel <tcit@tcit.fr>2023-03-13 11:52:57 +0100
commitf1751c44286930ea4ef41b046cdc4570330ee301 (patch)
treed5e403dfc0ab94bcf73a0490edba8de0e5365150 /lib/private/legacy
parentade49e0b15e408bf00dd24f5641bd9a29a18f05c (diff)
downloadnextcloud-server-f1751c44286930ea4ef41b046cdc4570330ee301.tar.gz
nextcloud-server-f1751c44286930ea4ef41b046cdc4570330ee301.zip
Introduced app enable/disable/update typed events
OCP\App\ManagerEvent is depreciated since 22 without a replacement Signed-off-by: Thomas Citharel <tcit@tcit.fr>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r--lib/private/legacy/OC_App.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php
index 7f51d81d21b..a7887d2bed7 100644
--- a/lib/private/legacy/OC_App.php
+++ b/lib/private/legacy/OC_App.php
@@ -50,9 +50,12 @@ declare(strict_types=1);
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
*/
+
+use OCP\App\Events\AppUpdateEvent;
use OCP\AppFramework\QueryException;
use OCP\App\ManagerEvent;
use OCP\Authentication\IAlternativeLogin;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\ILogger;
use OCP\Settings\IManager as ISettingsManager;
use OC\AppFramework\Bootstrap\Coordinator;
@@ -1042,6 +1045,7 @@ class OC_App {
$version = \OC_App::getAppVersion($appId);
\OC::$server->getConfig()->setAppValue($appId, 'installed_version', $version);
+ \OC::$server->get(IEventDispatcher::class)->dispatchTyped(new AppUpdateEvent($appId));
\OC::$server->getEventDispatcher()->dispatch(ManagerEvent::EVENT_APP_UPDATE, new ManagerEvent(
ManagerEvent::EVENT_APP_UPDATE, $appId
));
@@ -1061,7 +1065,7 @@ class OC_App {
// load the app
self::loadApp($appId);
- $dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class);
+ $dispatcher = \OC::$server->get(IEventDispatcher::class);
// load the steps
$r = new Repair([], $dispatcher, \OC::$server->get(LoggerInterface::class));