diff options
Diffstat (limited to 'core/ajax/update.php')
-rw-r--r-- | core/ajax/update.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php index 4d8fe19f168..631a8a7871c 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -26,6 +26,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/> * */ +use Symfony\Component\EventDispatcher\GenericEvent; + set_time_limit(0); require_once '../../lib/base.php'; @@ -53,6 +55,18 @@ 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()])); + } + }); + $dispatcher->addListener('\OC\DB\Migrator::checkTable', function($event) use ($eventSource, $l) { + if ($event instanceof GenericEvent) { + $eventSource->send('success', (string)$l->t('[%d / %d]: Checking table %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')); }); |