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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
d8864d4f
Commit
d8864d4f
authored
13 years ago
by
Robin Appelman
Browse files
Options
Downloads
Patches
Plain Diff
show error when installing an app has failed
parent
d3bf0137
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
lib/app.php
+8
-3
8 additions, 3 deletions
lib/app.php
settings/ajax/disableapp.php
+1
-1
1 addition, 1 deletion
settings/ajax/disableapp.php
settings/ajax/enableapp.php
+5
-3
5 additions, 3 deletions
settings/ajax/enableapp.php
settings/js/apps.js
+10
-2
10 additions, 2 deletions
settings/js/apps.js
with
24 additions
and
9 deletions
lib/app.php
+
8
−
3
View file @
d8864d4f
...
@@ -140,12 +140,17 @@ class OC_App{
...
@@ -140,12 +140,17 @@ class OC_App{
OC_Installer
::
installShippedApp
(
$app
);
OC_Installer
::
installShippedApp
(
$app
);
}
else
{
}
else
{
$download
=
OC_OCSClient
::
getApplicationDownload
(
$app
,
1
);
$download
=
OC_OCSClient
::
getApplicationDownload
(
$app
,
1
);
if
(
isset
(
$download
[
'downloadlink'
])
and
$download
[
'downloadlink'
]
<>
''
)
{
if
(
isset
(
$download
[
'downloadlink'
])
and
$download
[
'downloadlink'
]
!=
''
)
{
$app
=
OC_Installer
::
installApp
(
array
(
'source'
=>
'http'
,
'href'
=>
$download
[
'downloadlink'
]));
$app
=
OC_Installer
::
installApp
(
array
(
'source'
=>
'http'
,
'href'
=>
$download
[
'downloadlink'
]));
}
}
}
}
}
}
if
(
$app
!==
false
){
OC_Appconfig
::
setValue
(
$app
,
'enabled'
,
'yes'
);
OC_Appconfig
::
setValue
(
$app
,
'enabled'
,
'yes'
);
return
true
;
}
else
{
return
false
;
}
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
settings/ajax/disableapp.php
+
1
−
1
View file @
d8864d4f
...
@@ -6,4 +6,4 @@ OC_JSON::setContentTypeHeader();
...
@@ -6,4 +6,4 @@ OC_JSON::setContentTypeHeader();
OC_App
::
disable
(
$_POST
[
'appid'
]);
OC_App
::
disable
(
$_POST
[
'appid'
]);
?>
OC_JSON
::
success
();
This diff is collapsed.
Click to expand it.
settings/ajax/enableapp.php
+
5
−
3
View file @
d8864d4f
...
@@ -5,6 +5,8 @@ require_once('../../lib/base.php');
...
@@ -5,6 +5,8 @@ require_once('../../lib/base.php');
OC_JSON
::
checkAdminUser
();
OC_JSON
::
checkAdminUser
();
OC_JSON
::
setContentTypeHeader
();
OC_JSON
::
setContentTypeHeader
();
OC_App
::
enable
(
$_POST
[
'appid'
]);
if
(
OC_App
::
enable
(
$_POST
[
'appid'
])){
OC_JSON
::
success
();
?>
}
else
{
OC_JSON
::
error
();
}
This diff is collapsed.
Click to expand it.
settings/js/apps.js
+
10
−
2
View file @
d8864d4f
...
@@ -28,10 +28,18 @@ $(document).ready(function(){
...
@@ -28,10 +28,18 @@ $(document).ready(function(){
var
active
=
$
(
this
).
data
(
'
active
'
);
var
active
=
$
(
this
).
data
(
'
active
'
);
if
(
app
){
if
(
app
){
if
(
active
){
if
(
active
){
$
.
post
(
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
disableapp.php
'
),{
appid
:
app
});
$
.
post
(
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
disableapp.php
'
),{
appid
:
app
},
function
(
result
){
if
(
!
result
||
result
.
status
!=
'
succes
'
){
OC
.
dialogs
.
alert
(
'
Error
'
,
'
Error while enabling app
'
);
}
},
'
json
'
);
$
(
'
#leftcontent li[data-id="
'
+
app
+
'
"]
'
).
removeClass
(
'
active
'
);
$
(
'
#leftcontent li[data-id="
'
+
app
+
'
"]
'
).
removeClass
(
'
active
'
);
}
else
{
}
else
{
$
.
post
(
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
enableapp.php
'
),{
appid
:
app
});
$
.
post
(
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
enableapp.php
'
),{
appid
:
app
},
function
(
result
){
if
(
!
result
||
result
.
status
!=
'
succes
'
){
OC
.
dialogs
.
alert
(
'
Error
'
,
'
Error while disabling app
'
);
}
},
'
json
'
);
$
(
'
#leftcontent li[data-id="
'
+
app
+
'
"]
'
).
addClass
(
'
active
'
);
$
(
'
#leftcontent li[data-id="
'
+
app
+
'
"]
'
).
addClass
(
'
active
'
);
}
}
active
=!
active
;
active
=!
active
;
...
...
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