From 12c4a4f29e2cf6f4ff0b0cc176e609f0d4f53572 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sun, 25 Mar 2018 21:44:42 +0200 Subject: [PATCH] move shells/shell.php to model/Shell.php ... and drop a few lines in postfixadmin-cli.php that became superfluous by this move (thanks autoloader!) --- scripts/shells/shell.php => model/Shell.php | 0 scripts/postfixadmin-cli.php | 8 +------- 2 files changed, 1 insertion(+), 7 deletions(-) rename scripts/shells/shell.php => model/Shell.php (100%) diff --git a/scripts/shells/shell.php b/model/Shell.php similarity index 100% rename from scripts/shells/shell.php rename to model/Shell.php diff --git a/scripts/postfixadmin-cli.php b/scripts/postfixadmin-cli.php index be2f0c0b..e73c9490 100644 --- a/scripts/postfixadmin-cli.php +++ b/scripts/postfixadmin-cli.php @@ -125,9 +125,6 @@ class PostfixAdmin { ini_set('html_errors', false); ini_set('implicit_flush', true); ini_set('max_execution_time', 0); - - define('DS', DIRECTORY_SEPARATOR); - define('CORE_INCLUDE_PATH', dirname(__FILE__)); } /** @@ -170,10 +167,7 @@ class PostfixAdmin { $this->help(); return; } - # TODO: move shells/shell.php to model/ to enable autoloading - if (!class_exists('Shell')) { - require CORE_INCLUDE_PATH . DS . "shells" . DS . 'shell.php'; - } + $command = 'help'; # not the worst default ;-) if (isset($this->args[0])) { $command = $this->args[0];