diff options
Diffstat (limited to 'apps/provisioning_api/lib/Apps.php')
-rw-r--r-- | apps/provisioning_api/lib/Apps.php | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/apps/provisioning_api/lib/Apps.php b/apps/provisioning_api/lib/Apps.php index 9c73d8e701c..c23591a684a 100644 --- a/apps/provisioning_api/lib/Apps.php +++ b/apps/provisioning_api/lib/Apps.php @@ -26,7 +26,6 @@ namespace OCA\Provisioning_API; use OC\OCSClient; -use \OC_OCS_Result; use \OC_App; class Apps { @@ -46,7 +45,7 @@ class Apps { /** * @param array $parameters - * @return OC_OCS_Result + * @return \OC\OCS\Result */ public function getApps($parameters) { $apps = OC_App::listAllApps(false, true, $this->ocsClient); @@ -58,55 +57,55 @@ class Apps { if($filter){ switch($filter){ case 'enabled': - return new OC_OCS_Result(array('apps' => \OC_App::getEnabledApps())); + return new \OC\OCS\Result(array('apps' => \OC_App::getEnabledApps())); break; case 'disabled': $enabled = OC_App::getEnabledApps(); - return new OC_OCS_Result(array('apps' => array_diff($list, $enabled))); + return new \OC\OCS\Result(array('apps' => array_diff($list, $enabled))); break; default: // Invalid filter variable - return new OC_OCS_Result(null, 101); + return new \OC\OCS\Result(null, 101); break; } } else { - return new OC_OCS_Result(array('apps' => $list)); + return new \OC\OCS\Result(array('apps' => $list)); } } /** * @param array $parameters - * @return OC_OCS_Result + * @return \OC\OCS\Result */ public function getAppInfo($parameters) { $app = $parameters['appid']; $info = \OCP\App::getAppInfo($app); if(!is_null($info)) { - return new OC_OCS_Result(OC_App::getAppInfo($app)); + return new \OC\OCS\Result(OC_App::getAppInfo($app)); } else { - return new OC_OCS_Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found'); + return new \OC\OCS\Result(null, \OCP\API::RESPOND_NOT_FOUND, 'The request app was not found'); } } /** * @param array $parameters - * @return OC_OCS_Result + * @return \OC\OCS\Result */ public function enable($parameters) { $app = $parameters['appid']; $this->appManager->enableApp($app); - return new OC_OCS_Result(null, 100); + return new \OC\OCS\Result(null, 100); } /** * @param array $parameters - * @return OC_OCS_Result + * @return \OC\OCS\Result */ public function disable($parameters) { $app = $parameters['appid']; $this->appManager->disableApp($app); - return new OC_OCS_Result(null, 100); + return new \OC\OCS\Result(null, 100); } } |