From 1bf4c75e8bfd32160ee7316c492ddc436f673f37 Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Wed, 30 Mar 2016 23:38:26 +0200 Subject: Show individual sql schema migration steps during upgrade - on web as well as on the command line --- core/ajax/update.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'core/ajax') diff --git a/core/ajax/update.php b/core/ajax/update.php index 4d8fe19f168..bb4738c83a6 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -26,6 +26,8 @@ * along with this program. If not, see * */ +use Symfony\Component\EventDispatcher\GenericEvent; + set_time_limit(0); require_once '../../lib/base.php'; @@ -53,6 +55,13 @@ if (OC::checkUpgrade(false)) { $incompatibleApps = []; $disabledThirdPartyApps = []; + $dispatcher = \OC::$server->getEventDispatcher(); + $dispatcher->addListener('\OC\DB\Migrator::executeSql', function($event) use ($eventSource, $l) { + if ($event instanceof GenericEvent) { + $eventSource->send('success', (string)$l->t('[%d / %d]: %s', [$event[0], $event[1], $event->getSubject()])); + } + }); + $updater->listen('\OC\Updater', 'maintenanceEnabled', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Turned on maintenance mode')); }); @@ -132,6 +141,9 @@ if (OC::checkUpgrade(false)) { $disabledApps[$app] = (string) $l->t('%s (incompatible)', [$app]); } + $disabledApps=[ + 'Contacts Plus (incompatible)' + ]; if (!empty($disabledApps)) { $eventSource->send('notice', (string)$l->t('Following apps have been disabled: %s', implode(', ', $disabledApps))); -- cgit v1.2.3