From c2e1ca093887be48c0218a87d15822cf002657b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Schro=CC=88der?= Date: Thu, 15 May 2014 15:13:58 +0200 Subject: [PATCH] only show commands in help that have a description --- application/core/Commands/CommandManager.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/application/core/Commands/CommandManager.php b/application/core/Commands/CommandManager.php index 8b50a47c..0af4a443 100644 --- a/application/core/Commands/CommandManager.php +++ b/application/core/Commands/CommandManager.php @@ -48,7 +48,7 @@ class CommandManager implements CallbackListener { * @param string $description * @return bool */ - public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = '') { + public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = null) { if (is_array($commandName)) { $success = true; foreach ($commandName as $command) { @@ -74,8 +74,10 @@ class CommandManager implements CallbackListener { $this->addListenerCallback($this->commandListeners, $listenerCallback, $command); } - //TODO description - $this->helpManager->registerCommand($command, $adminCommand, $description, get_class($listener) . '\\' . $method); + // TODO: description(?) + if ($description) { + $this->helpManager->registerCommand($command, $adminCommand, $description, get_class($listener) . '\\' . $method); + } return true; }