summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-03-11 09:59:56 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-03-11 09:59:56 +0100
commitffe06ac5c727913e5bff225a1c485e504a287e64 (patch)
tree01fb3e616ac4e7988d91723dcfae822c087d5c2b
parentcfaee93552b519b8e017e63fd5a82b1e5c9f951b (diff)
downloadnextcloud-server-ffe06ac5c727913e5bff225a1c485e504a287e64.tar.gz
nextcloud-server-ffe06ac5c727913e5bff225a1c485e504a287e64.zip
display app update error messages - fixes #14611
-rw-r--r--lib/private/installer.php13
-rw-r--r--settings/js/apps.js6
2 files changed, 12 insertions, 7 deletions
diff --git a/lib/private/installer.php b/lib/private/installer.php
index 087bc6c1edb..3956e503767 100644
--- a/lib/private/installer.php
+++ b/lib/private/installer.php
@@ -202,20 +202,21 @@ class OC_Installer{
/**
* update an app by it's id
- * @param integer $ocsid
+ *
+ * @param integer $ocsId
* @return bool
* @throws Exception
*/
- public static function updateAppByOCSId($ocsid) {
- $appdata = OCSClient::getApplication($ocsid);
- $download = OCSClient::getApplicationDownload($ocsid, 1);
+ public static function updateAppByOCSId($ocsId) {
+ $appData = OCSClient::getApplication($ocsId);
+ $download = OCSClient::getApplicationDownload($ocsId, 1);
if (isset($download['downloadlink']) && trim($download['downloadlink']) !== '') {
$download['downloadlink'] = str_replace(' ', '%20', $download['downloadlink']);
$info = array(
'source' => 'http',
'href' => $download['downloadlink'],
- 'appdata' => $appdata
+ 'appdata' => $appData
);
} else {
throw new \Exception('Could not fetch app info!');
@@ -285,7 +286,7 @@ class OC_Installer{
* @return array
* @throws \Exception
*/
- public static function checkAppsIntegrity($data = array(), $extractDir, $path, $isShipped=false) {
+ public static function checkAppsIntegrity($data, $extractDir, $path, $isShipped=false) {
$l = \OC::$server->getL10N('lib');
//load the info.xml file of the app
if(!is_file($extractDir.'/appinfo/info.xml')) {
diff --git a/settings/js/apps.js b/settings/js/apps.js
index c15d6a0f74d..7330f426af7 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -235,7 +235,11 @@ OC.Settings.Apps = OC.Settings.Apps || {
OC.Settings.Apps.hideErrorMessage(appId);
$.post(OC.filePath('settings','ajax','updateapp.php'),{appid:appId},function(result) {
if(!result || result.status !== 'success') {
- OC.Settings.Apps.showErrorMessage(appId, t('settings','Error while updating app'));
+ if (result.data && result.data.message) {
+ OC.Settings.Apps.showErrorMessage(appId, result.data.message);
+ } else {
+ OC.Settings.Apps.showErrorMessage(appId, t('settings','Error while updating app'));
+ }
element.val(oldButtonText);
}
else {