diff --git a/scripts/shells/alias.php b/scripts/shells/alias.php index 1c821f11..04e00b36 100644 --- a/scripts/shells/alias.php +++ b/scripts/shells/alias.php @@ -12,28 +12,8 @@ class PostfixAdminAlias extends Shell { var $tasks = array('Add', 'Update', 'Delete', 'View'); -/** - * Starts up the the Shell - * allows for checking and configuring prior to command or main execution - * can be overriden in subclasses - * - * @access public - */ - function startup() { - $this->_welcome(); - $CONF = Config::read('all'); - } -/** - * Displays a header for the shell - * - * @access protected - */ - function _welcome() { - $this->out("\nWelcome to Postfixadmin-CLI v" . $this->Dispatch->version); - $this->out("---------------------------------------------------------------"); - $this->out('Path: '. PATH); - $this->hr(); - } + + /** * Show help for this shell. diff --git a/scripts/shells/domain.php b/scripts/shells/domain.php index d4cac8aa..cabebc8a 100644 --- a/scripts/shells/domain.php +++ b/scripts/shells/domain.php @@ -12,28 +12,8 @@ class PostfixAdminDomain extends Shell { var $tasks = array('Add', 'Update', 'Delete', 'View'); -/** - * Starts up the the Shell - * allows for checking and configuring prior to command or main execution - * can be overriden in subclasses - * - * @access public - */ - function startup() { - $this->_welcome(); - $CONF = Config::read('all'); - } -/** - * Displays a header for the shell - * - * @access protected - */ - function _welcome() { - $this->out("\nWelcome to Postfixadmin-CLI v" . $this->Dispatch->version); - $this->out("---------------------------------------------------------------"); - $this->out('Path: '. PATH); - $this->hr(); - } + + /** * Show help for this shell. diff --git a/scripts/shells/shell.php b/scripts/shells/shell.php index 9f7a854e..85b96d9c 100644 --- a/scripts/shells/shell.php +++ b/scripts/shells/shell.php @@ -167,6 +167,7 @@ class Shell { */ function startup() { $this->_welcome(); + $CONF = Config::read('all'); } /** * Displays a header for the shell diff --git a/scripts/shells/user.php b/scripts/shells/user.php index 6ae99fd8..57cbf7de 100644 --- a/scripts/shells/user.php +++ b/scripts/shells/user.php @@ -12,28 +12,7 @@ class PostfixAdminUser extends Shell { var $tasks = array('Add', 'Update', 'Delete', 'Password', 'View'); -/** - * Starts up the the Shell - * allows for checking and configuring prior to command or main execution - * can be overriden in subclasses - * - * @access public - */ - function startup() { - $this->_welcome(); - $CONF = Config::read('all'); - } -/** - * Displays a header for the shell - * - * @access protected - */ - function _welcome() { - $this->out("\nWelcome to Postfixadmin-CLI v" . $this->Dispatch->version); - $this->out("---------------------------------------------------------------"); - $this->out('Path: '. PATH); - $this->hr(); - } + /** * Show help for this shell. @@ -157,7 +136,7 @@ class AddTask extends Shell { $handler = new UserHandler($address); $return = $handler->add($pw, $name, $quota, true, true ); - if( ! $return) { + if( $return == false ) { $this->err(join("\n", $handler->errormsg)); } else { $this->out("");