diff options
Diffstat (limited to 'remote.php')
-rw-r--r-- | remote.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/remote.php b/remote.php index a91742b0475..7993566afec 100644 --- a/remote.php +++ b/remote.php @@ -43,7 +43,9 @@ try { $file = OC::$SERVERROOT .'/'. $file; break; default: - OC_Util::checkAppEnabled($app); + if (!\OC::$server->getAppManager()->isInstalled($app)) { + throw new Exception('App not installed: ' . $app); + } OC_App::loadApp($app); $file = OC_App::getAppPath($app) .'/'. $parts[1]; break; @@ -51,6 +53,10 @@ try { $baseuri = OC::$WEBROOT . '/remote.php/'.$service.'/'; require_once $file; +} catch (\OC\ServiceUnavailableException $ex) { + OC_Response::setStatus(OC_Response::STATUS_SERVICE_UNAVAILABLE); + \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); + OC_Template::printExceptionErrorPage($ex); } catch (Exception $ex) { OC_Response::setStatus(OC_Response::STATUS_INTERNAL_SERVER_ERROR); \OCP\Util::writeLog('remote', $ex->getMessage(), \OCP\Util::FATAL); |