summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/api.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-08-01 18:57:00 +0200
committerMorris Jobke <hey@morrisjobke.de>2017-08-01 18:57:00 +0200
commitcd02b2205e5148e79698f60d0209cf10391e30c8 (patch)
treec60d4682ea87427ae9c5d4ccd964671ebdbee222 /lib/private/legacy/api.php
parent84c22fdeef6986f9038d8563937cc234751d5147 (diff)
downloadnextcloud-server-cd02b2205e5148e79698f60d0209cf10391e30c8.tar.gz
nextcloud-server-cd02b2205e5148e79698f60d0209cf10391e30c8.zip
Use public methods for OC_App::isShipped
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'lib/private/legacy/api.php')
-rw-r--r--lib/private/legacy/api.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/private/legacy/api.php b/lib/private/legacy/api.php
index 894aee28560..f65275bf1da 100644
--- a/lib/private/legacy/api.php
+++ b/lib/private/legacy/api.php
@@ -123,13 +123,14 @@ class OC_API {
$name = $parameters['_route'];
// Foreach registered action
$responses = array();
+ $appManager = \OC::$server->getAppManager();
foreach(self::$actions[$name] as $action) {
// Check authentication and availability
if(!self::isAuthorised($action)) {
$responses[] = array(
'app' => $action['app'],
'response' => new OC_OCS_Result(null, API::RESPOND_UNAUTHORISED, 'Unauthorised'),
- 'shipped' => OC_App::isShipped($action['app']),
+ 'shipped' => $appManager->isShipped($action['app']),
);
continue;
}
@@ -137,7 +138,7 @@ class OC_API {
$responses[] = array(
'app' => $action['app'],
'response' => new OC_OCS_Result(null, API::RESPOND_NOT_FOUND, 'Api method not found'),
- 'shipped' => OC_App::isShipped($action['app']),
+ 'shipped' => $appManager->isShipped($action['app']),
);
continue;
}
@@ -145,7 +146,7 @@ class OC_API {
$responses[] = array(
'app' => $action['app'],
'response' => call_user_func($action['action'], $parameters),
- 'shipped' => OC_App::isShipped($action['app']),
+ 'shipped' => $appManager->isShipped($action['app']),
);
}
$response = self::mergeResponses($responses);