aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-12-09 11:28:53 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-12-09 11:28:53 +0100
commit74e7fb14384f57199ac5a97e9338c0ffce77553d (patch)
tree0fba043caf606d545369fc9ae83c4c03128358fb
parent1dfa93367db9b4a91c2bd665aa1b2f14c7cc67e5 (diff)
parent11e98e2de6f0dd20c5a1b8a09d1497ce078a9392 (diff)
downloadnextcloud-server-74e7fb14384f57199ac5a97e9338c0ffce77553d.tar.gz
nextcloud-server-74e7fb14384f57199ac5a97e9338c0ffce77553d.zip
Merge pull request #21055 from owncloud/fix-php-docs-for-console
Fix PHPDoc and check if path does exists
-rw-r--r--lib/private/console/application.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/private/console/application.php b/lib/private/console/application.php
index 55c817d497f..c46e6d60de2 100644
--- a/lib/private/console/application.php
+++ b/lib/private/console/application.php
@@ -48,16 +48,20 @@ class Application {
/**
* @param OutputInterface $output
+ * @throws \Exception
*/
public function loadCommands(OutputInterface $output) {
// $application is required to be defined in the register_command scripts
$application = $this->application;
- require_once \OC::$SERVERROOT . '/core/register_command.php';
+ require_once __DIR__ . '/../../../core/register_command.php';
if ($this->config->getSystemValue('installed', false)) {
if (!\OCP\Util::needUpgrade()) {
OC_App::loadApps();
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
$appPath = \OC_App::getAppPath($app);
+ if($appPath === false) {
+ continue;
+ }
\OC::$loader->addValidRoot($appPath);
$file = $appPath . '/appinfo/register_command.php';
if (file_exists($file)) {
@@ -85,6 +89,11 @@ class Application {
}
}
+ /**
+ * Sets whether to automatically exit after a command execution or not.
+ *
+ * @param bool $boolean Whether to automatically exit after a command execution or not
+ */
public function setAutoExit($boolean) {
$this->application->setAutoExit($boolean);
}