Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
abb726c9
Commit
abb726c9
authored
10 years ago
by
Bernhard Posselt
Browse files
Options
Downloads
Plain Diff
Merge pull request #14789 from owncloud/better-app-install-error-messages
display app update error messages
parents
3df1d933
ffe06ac5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/private/installer.php
+7
-6
7 additions, 6 deletions
lib/private/installer.php
settings/js/apps.js
+5
-1
5 additions, 1 deletion
settings/js/apps.js
with
12 additions
and
7 deletions
lib/private/installer.php
+
7
−
6
View file @
abb726c9
...
...
@@ -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
(
$ocs
i
d
)
{
$app
d
ata
=
OCSClient
::
getApplication
(
$ocs
i
d
);
$download
=
OCSClient
::
getApplicationDownload
(
$ocs
i
d
,
1
);
public
static
function
updateAppByOCSId
(
$ocs
I
d
)
{
$app
D
ata
=
OCSClient
::
getApplication
(
$ocs
I
d
);
$download
=
OCSClient
::
getApplicationDownload
(
$ocs
I
d
,
1
);
if
(
isset
(
$download
[
'downloadlink'
])
&&
trim
(
$download
[
'downloadlink'
])
!==
''
)
{
$download
[
'downloadlink'
]
=
str_replace
(
' '
,
'%20'
,
$download
[
'downloadlink'
]);
$info
=
array
(
'source'
=>
'http'
,
'href'
=>
$download
[
'downloadlink'
],
'appdata'
=>
$app
d
ata
'appdata'
=>
$app
D
ata
);
}
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'
))
{
...
...
This diff is collapsed.
Click to expand it.
settings/js/apps.js
+
5
−
1
View file @
abb726c9
...
...
@@ -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
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment