diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-01-14 11:31:42 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-01-14 11:31:42 +0100 |
commit | 99304be4ef4c34e60c1b2f2d1589a9678a893181 (patch) | |
tree | f4280ac305d38ac62821d9b7aaab5917362c9ae3 /core/js/update.js | |
parent | 65ee2b1de88e490672067257a6a704a697d71e1e (diff) | |
download | nextcloud-server-99304be4ef4c34e60c1b2f2d1589a9678a893181.tar.gz nextcloud-server-99304be4ef4c34e60c1b2f2d1589a9678a893181.zip |
Read version and product name from update template
During upgrade, the config settings aren't always available due to
base.php changes. This fix makes the update info page read the product
name and version from the update template, which already had them.
Diffstat (limited to 'core/js/update.js')
-rw-r--r-- | core/js/update.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/update.js b/core/js/update.js index 4899335f0ec..f63808f65be 100644 --- a/core/js/update.js +++ b/core/js/update.js @@ -17,7 +17,7 @@ * * @param $el progress list element */ - start: function($el) { + start: function($el, options) { if (this._started) { return; } @@ -28,8 +28,8 @@ this.addMessage(t( 'core', 'Updating {productName} to version {version}, this may take a while.', { - productName: OC.theme.name || 'ownCloud', - version: OC.config.versionstring + productName: options.productName || 'ownCloud', + version: options.version }), 'bold' ).append('<br />'); // FIXME: these should be ul/li with CSS paddings! @@ -76,10 +76,14 @@ $(document).ready(function() { $('.updateButton').on('click', function() { + var $updateEl = $('.update'); var $progressEl = $('.updateProgress'); $progressEl.removeClass('hidden'); $('.updateOverview').addClass('hidden'); - OC.Update.start($progressEl); + OC.Update.start($progressEl, { + productName: $updateEl.attr('data-productname'), + version: $updateEl.attr('data-version'), + }); return false; }); }); |