CliEdit.php:

- make help text (slightly) different for add vs. update


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1528 a1433add-5e2c-0410-b055-b7f2511e0802
pull/2/head
Christian Boltz 11 years ago
parent 1c27ab9074
commit 6ea8b370c0

@ -205,26 +205,29 @@ echo "*** value of $key is NULL - this should not happen! ***";
* Displays help contents * Displays help contents
*/ */
public function help() { public function help() {
$cmd = 'edit'; if ($this->new) {
if ($this->new) $cmd = 'add'; $cmd = 'add';
$cmdtext = 'Adds';
} else {
$cmd = 'update';
$cmdtext = 'Changes';
}
$module = preg_replace('/Handler$/', '', $this->handler_to_use); $module = preg_replace('/Handler$/', '', $this->handler_to_use);
$module = strtolower($module); $module = strtolower($module);
# TODO: generate from $struct
# $this->hr();
$this->out( $this->out(
"Usage: "Usage:
postfixadmin-cli $module $cmd postfixadmin-cli $module $cmd
Adds $module in interactive mode. $cmdtext $module in interactive mode.
- or - - or -
postfixadmin-cli $module $cmd <address> --option value --option2 value [...] postfixadmin-cli $module $cmd <address> --option value --option2 value [...]
Adds $module in non-interactive mode. $cmdtext $module in non-interactive mode.
Available options are: Available options are:
"); ");

Loading…
Cancel
Save