You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-09 05:02:44 +03:00
scripts/shells/shell.php:
- disable some unused code git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1531 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
@@ -137,14 +137,14 @@ class Shell {
|
||||
|
||||
$shellKey = Inflector::underscore($this->className);
|
||||
|
||||
if (!PHP5 && isset($this->args[0])) {
|
||||
if(strpos($this->className, strtolower(Inflector::camelize($this->args[0]))) !== false) {
|
||||
$dispatch->shiftArgs();
|
||||
}
|
||||
if (strtolower($this->command) == strtolower(Inflector::variable($this->args[0])) && method_exists($this, $this->command)) {
|
||||
$dispatch->shiftArgs();
|
||||
}
|
||||
}
|
||||
# if (!PHP5 && isset($this->args[0])) {
|
||||
# if(strpos($this->className, strtolower(Inflector::camelize($this->args[0]))) !== false) {
|
||||
# $dispatch->shiftArgs();
|
||||
# }
|
||||
# if (strtolower($this->command) == strtolower(Inflector::variable($this->args[0])) && method_exists($this, $this->command)) {
|
||||
# $dispatch->shiftArgs();
|
||||
# }
|
||||
# }
|
||||
|
||||
$this->Dispatch =& $dispatch;
|
||||
}
|
||||
@@ -210,22 +210,23 @@ if ( empty($this->params['q'] ) ) {
|
||||
if ($taskName == 'Add' || $taskName == 'Update') {
|
||||
$taskClass = 'CliEdit';
|
||||
|
||||
} elseif (!class_exists($taskClass)) {
|
||||
foreach ($this->Dispatch->shellPaths as $path) {
|
||||
$taskPath = $path . 'tasks' . DS . $task.'.php';
|
||||
if (file_exists($taskPath)) {
|
||||
require_once $taskPath;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
# elseif (!class_exists($taskClass)) {
|
||||
# foreach ($this->Dispatch->shellPaths as $path) {
|
||||
# $taskPath = $path . 'tasks' . DS . $task.'.php';
|
||||
# if (file_exists($taskPath)) {
|
||||
# require_once $taskPath;
|
||||
# break;
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
|
||||
$this->taskNames[] = $taskName;
|
||||
if (!PHP5) {
|
||||
# if (!PHP5) {
|
||||
# $this->{$taskName} = new $taskClass($this->Dispatch);
|
||||
# } else {
|
||||
$this->{$taskName} = new $taskClass($this->Dispatch);
|
||||
} else {
|
||||
$this->{$taskName} = new $taskClass($this->Dispatch);
|
||||
}
|
||||
# }
|
||||
|
||||
if ($taskName == 'Add') {
|
||||
$this->{$taskName}->handler_to_use = ucfirst($this->shell) . 'Handler';
|
||||
|
Reference in New Issue
Block a user