diff options
Diffstat (limited to 'lib/private/legacy/OC_App.php')
-rw-r--r-- | lib/private/legacy/OC_App.php | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 482fc4e88e7..a5eb26d0d4b 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -50,18 +50,19 @@ declare(strict_types=1); * along with this program. If not, see <http://www.gnu.org/licenses/> * */ +use OCP\AppFramework\QueryException; +use OCP\App\ManagerEvent; +use OCP\Authentication\IAlternativeLogin; +use OCP\ILogger; +use OCP\Settings\IManager as ISettingsManager; +use OC\AppFramework\Bootstrap\Coordinator; use OC\App\DependencyAnalyzer; use OC\App\Platform; -use OC\AppFramework\Bootstrap\Coordinator; use OC\DB\MigrationService; use OC\Installer; use OC\Repair; +use OC\Repair\Events\RepairErrorEvent; use OC\ServerNotAvailableException; -use OCP\App\ManagerEvent; -use OCP\AppFramework\QueryException; -use OCP\Authentication\IAlternativeLogin; -use OCP\ILogger; -use OCP\Settings\IManager as ISettingsManager; use Psr\Log\LoggerInterface; /** @@ -1047,7 +1048,7 @@ class OC_App { // load the app self::loadApp($appId); - $dispatcher = OC::$server->getEventDispatcher(); + $dispatcher = \OC::$server->get(\OCP\EventDispatcher\IEventDispatcher::class); // load the steps $r = new Repair([], $dispatcher, \OC::$server->get(LoggerInterface::class)); @@ -1055,7 +1056,7 @@ class OC_App { try { $r->addStep($step); } catch (Exception $ex) { - $r->emit('\OC\Repair', 'error', [$ex->getMessage()]); + $dispatcher->dispatchTyped(new RepairErrorEvent($ex->getMessage())); \OC::$server->getLogger()->logException($ex); } } |