0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-19 19:22:14 +02:00

scripts/shells/shell.php:

- implement "update" for all *Handler classes by using CliEdit class
  (yes, it's really that easy ;-)

This gives us a working *) CLI for "update" in interactive and
non-interactive mode.   

*) TODO: test if everything works ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1447 a1433add-5e2c-0410-b055-b7f2511e0802
This commit is contained in:
Christian Boltz 2013-04-01 16:50:18 +00:00
parent dd2dc60ebf
commit 7276276ba2

View File

@ -207,7 +207,7 @@ if ( empty($this->params['q'] ) ) {
$taskClass = Inflector::camelize($taskName.'Task');
$taskKey = Inflector::underscore($taskClass);
if ($taskName == 'Add') {
if ($taskName == 'Add' || $taskName == 'Update') {
$taskClass = 'CliEdit';
} elseif (!class_exists($taskClass)) {
@ -230,6 +230,9 @@ if ( empty($this->params['q'] ) ) {
if ($taskName == 'Add') {
$this->{$taskName}->handler_to_use = ucfirst($this->shell) . 'Handler';
$this->{$taskName}->new = 1;
} elseif ($taskName == 'Update') {
$this->{$taskName}->handler_to_use = ucfirst($this->shell) . 'Handler';
$this->{$taskName}->new = 0;
}
if (!isset($this->{$taskName})) {