From 4785426269470bca24654aa0d764ce0c4049ec31 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Sat, 19 Oct 2013 20:48:00 +0000 Subject: [PATCH] scripts/inflector.php: - remove unused function variable() scripts/postfixadmin-cli.php, scripts/shells/shell.php: - replace user-visible "cake" with "postfixadmin-cli" scripts/shells/mailbox.php: - fix/update help text git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1546 a1433add-5e2c-0410-b055-b7f2511e0802 --- scripts/inflector.php | 14 -------------- scripts/postfixadmin-cli.php | 2 +- scripts/shells/mailbox.php | 4 ++-- scripts/shells/shell.php | 2 +- 4 files changed, 4 insertions(+), 18 deletions(-) diff --git a/scripts/inflector.php b/scripts/inflector.php index eb7a1f1a..57ef6fb4 100644 --- a/scripts/inflector.php +++ b/scripts/inflector.php @@ -53,19 +53,5 @@ class Inflector { $replace = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $camelCasedWord)); return $replace; } -/** - * Returns camelBacked version of a string. - * - * @param string $string - * @return string in variable form - * @access public - * @static - */ - public static function variable($string) { - $string = Inflector::camelize(Inflector::underscore($string)); - $replace = strtolower(substr($string, 0, 1)); - $variable = preg_replace('/\\w/', $replace, $string, 1); - return $variable; - } } diff --git a/scripts/postfixadmin-cli.php b/scripts/postfixadmin-cli.php index acf167e8..82b0d31c 100644 --- a/scripts/postfixadmin-cli.php +++ b/scripts/postfixadmin-cli.php @@ -338,7 +338,7 @@ class PostfixAdmin { $shell->startup(); $shell->{$command}(); } else { - $this->stderr("Unknown {$this->shellName} command '$command'.\nFor usage, try 'cake {$this->shell} help'.\n\n"); + $this->stderr("Unknown {$this->shellName} command '$command'.\nFor usage, try 'postfixadmin-cli {$this->shell} help'.\n\n"); } } else { $this->stderr('Class '.$this->shellClass.' could not be loaded'); diff --git a/scripts/shells/mailbox.php b/scripts/shells/mailbox.php index 76c97573..ad9082c8 100644 --- a/scripts/shells/mailbox.php +++ b/scripts/shells/mailbox.php @@ -20,7 +20,7 @@ class PostfixAdminMailbox extends Shell { * @access public */ function help() { - $head = "Usage: postfixadmin-cli mailbox [
] [] [-m ]\n"; + $head = "Usage: postfixadmin-cli mailbox [
] [] [--