Merge pull request #21055 from owncloud/fix-php-docs-for-console
Fix PHPDoc and check if path does exists
This commit is contained in:
commit
74e7fb1438
|
@ -48,16 +48,20 @@ class Application {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OutputInterface $output
|
* @param OutputInterface $output
|
||||||
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function loadCommands(OutputInterface $output) {
|
public function loadCommands(OutputInterface $output) {
|
||||||
// $application is required to be defined in the register_command scripts
|
// $application is required to be defined in the register_command scripts
|
||||||
$application = $this->application;
|
$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 ($this->config->getSystemValue('installed', false)) {
|
||||||
if (!\OCP\Util::needUpgrade()) {
|
if (!\OCP\Util::needUpgrade()) {
|
||||||
OC_App::loadApps();
|
OC_App::loadApps();
|
||||||
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
|
foreach (\OC::$server->getAppManager()->getInstalledApps() as $app) {
|
||||||
$appPath = \OC_App::getAppPath($app);
|
$appPath = \OC_App::getAppPath($app);
|
||||||
|
if($appPath === false) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
\OC::$loader->addValidRoot($appPath);
|
\OC::$loader->addValidRoot($appPath);
|
||||||
$file = $appPath . '/appinfo/register_command.php';
|
$file = $appPath . '/appinfo/register_command.php';
|
||||||
if (file_exists($file)) {
|
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) {
|
public function setAutoExit($boolean) {
|
||||||
$this->application->setAutoExit($boolean);
|
$this->application->setAutoExit($boolean);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue