From 5b97369b00afbdf55eed145be9ac981dca06d2a9 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Wed, 4 Jun 2014 16:40:53 +0200 Subject: Simulate apps database schema update on upgrade When upgrade, also simulate the database schema update for apps before doing the actual upgrade. --- core/ajax/update.php | 3 +++ core/command/upgrade.php | 3 +++ core/js/update.js | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'core') diff --git a/core/ajax/update.php b/core/ajax/update.php index 84d7a21209e..698614c975f 100644 --- a/core/ajax/update.php +++ b/core/ajax/update.php @@ -15,6 +15,9 @@ if (OC::checkUpgrade(false)) { $updater->listen('\OC\Updater', 'dbUpgrade', function () use ($eventSource, $l) { $eventSource->send('success', (string)$l->t('Updated database')); }); + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use ($eventSource, $l) { + $eventSource->send('success', (string)$l->t('Checked database schema update')); + }); $updater->listen('\OC\Updater', 'disabledApps', function ($appList) use ($eventSource, $l) { $list = array(); foreach ($appList as $appId) { diff --git a/core/command/upgrade.php b/core/command/upgrade.php index 8ce8ef9b6e5..c3946d2aab5 100644 --- a/core/command/upgrade.php +++ b/core/command/upgrade.php @@ -56,6 +56,9 @@ class Upgrade extends Command { $updater->listen('\OC\Updater', 'dbUpgrade', function () use($output) { $output->writeln('Updated database'); }); + $updater->listen('\OC\Updater', 'dbSimulateUpgrade', function () use($output) { + $output->writeln('Checked database schema update'); + }); $updater->listen('\OC\Updater', 'disabledApps', function ($appList) use($output) { $output->writeln('Disabled incompatible apps: ' . implode(', ', $appList) . ''); }); diff --git a/core/js/update.js b/core/js/update.js index cc0f541bd79..e5ce322df95 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -28,7 +28,7 @@ this.addMessage(t( 'core', 'Updating {productName} to version {version}, this may take a while.', { - productName: OC.theme.name, + productName: OC.theme.name || 'ownCloud', version: OC.config.versionstring }), 'bold' -- cgit v1.2.3