- replace usage of Inflector::camelize() with ucfirst() - for our usage,
it gives the same result with easier understandable code
- remove unused PHP5 define
shells/shell.php:
- remove definition of unused variable $shellKey, which also removes
the last usage of Inflector::underscore
- remove code that was commented out since a while
scripts/inflector.php:
- delete file, no longer needed
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1577 a1433add-5e2c-0410-b055-b7f2511e0802
model/CliHelp.php:
- new class, used for "postfixadmin-cli $module help"
- replaces the PostfixAdmin* classes in scripts/shells/*.php
model/PFAHandler.php
- add public $taskNames with the list of supported CLI commands
scripts/postfixadmin-cli.php - dispatch():
- directly set the classes to load instead of using shell->loadTasks()
- when "postfixadmin-cli $module" is called, display help instead of
error message about "invalid command ''"
- make it more readable by moving error checks to the beginning
(replaces deeply nested if's with return statements)
- remove unused code parts
scripts/shells/*.php:
- remove PostfixAdmin* classes (obsoleted by CliHelp)
- remove $tasks (now in PFAHandler)
- delete alias.php and domain.php because nothing is left
- mailbox.php still contains PasswordTask
scripts/shells/shell.php:
- remove $taskNames (moved to PFAHandler)
- remove loadTasks() (integrated in postfixadmin-cli.php's dispatch())
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1575 a1433add-5e2c-0410-b055-b7f2511e0802
- new file for CLI 'view'
- based on the ViewTask classes in scripts/shells/*.php
- introduces usage of *Handler->_formatted_$field() to get "pretty"
output for a field
(not sure if this is the final solution, but it works ;-)
scripts/shells/*.php
- remove ViewTask, obsoleted by model/CliView.php
scripts/shells/shell.php:
- use CliView instead of ViewTask
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1572 a1433add-5e2c-0410-b055-b7f2511e0802
- new file, handles deleting something with the CLI
(based on DeleteTask in scripts/shells/*.php)
scripts/shells/*.php
- remove DeleteTask, obsoleted by model/CliDelete.php
scripts/shells/shell.php:
- use CliDelete instead of DeleteTask
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1570 a1433add-5e2c-0410-b055-b7f2511e0802
- 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
- new class for CLI add and edit
- based on AddTask, but big parts of __interactive()) are rewritten to:
- use $struct for the user interface (which means it will automatically
adopt to changes in the *Handler classes)
- check all entered data instantly. If an invalid value was entered,
ask again to give the user a chance to enter valid data.
- CliEdit already replaces all AddTask classes (interactive mode works,
commandline parameter mode not implementated yet)
- will also replace all EditTask classes in the future
scripts/shells/shell.php
- loadTasks(): for add, use new CliEdit instead of AddTask class
- in():
- print additional empty line if $prompt is not empty
- print error message when invalid option is chosen
- always return raw $in to avoid '0' vs. ''. vs NULL problems
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1437 a1433add-5e2c-0410-b055-b7f2511e0802
- use strtolower()/strtoupper() instead of low()/up() shortnames.
This makes the code slightly longer, but easier to understand because
strtolower()/strtoupper() are well-known function names
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1213 a1433add-5e2c-0410-b055-b7f2511e0802
-added alias delete function
-remove silly password function in domain and alias
-changed some $this->err to $this->error
-error ends with stop(1) which returns 1 in *unix shells
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@920 a1433add-5e2c-0410-b055-b7f2511e0802
- adopted return value checks to true/false instead of shell-like 0/1
- fixed some messages in interactive mode
- various minor fixes
- added some TODO notes, but didn't do a full proofreading
scripts/models-ext/UserHandler.php:
- deleted, replaced with a redirect to /model/UserHandler.php
scripts/common.php, scripts/shells/shell.php:
- replaced obsolete "... =& new ..." with "... = new ..."
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@909 a1433add-5e2c-0410-b055-b7f2511e0802
- hand over $search to smarty templates
templates/list-virtual_alias.tpl, templates/list-virtual_alias_domain.tpl:
- add search result highlighting
templates/list-virtual_mailbox.tpl:
- add search result highlighting
- move output of "Mailbox" / "Forward only" outside the foreach loop
(was displayed once per mailbox alias target)
css/default.css:
- add style for ".searchresult"
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@868 a1433add-5e2c-0410-b055-b7f2511e0802