summaryrefslogtreecommitdiffstats
path: root/core/js/update.js
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-01-14 11:31:42 +0100
committerJoas Schilling <nickvergessen@owncloud.com>2015-03-02 11:39:23 +0100
commitec71e0b4e6ab19ca50ebcc9714042a1be45d12a5 (patch)
tree0a6f09e839c0ae5459218e8674a06105e49a0dab /core/js/update.js
parenteb778eb2b09636c4e34739e64e43ea7a6b590d6d (diff)
downloadnextcloud-server-ec71e0b4e6ab19ca50ebcc9714042a1be45d12a5.tar.gz
nextcloud-server-ec71e0b4e6ab19ca50ebcc9714042a1be45d12a5.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.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/js/update.js b/core/js/update.js
index e5ce322df95..29397b26625 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!
@@ -77,10 +77,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;
});
});