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

17 Commits

Author SHA1 Message Date
David Goodwin
2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
David Goodwin
2edabc3e03 phpcs insists on some brace changes 2021-04-13 21:19:16 +01:00
David Goodwin
823f27b29d phpcs wants to change ... 2021-03-22 09:28:28 +00:00
David Goodwin
efb1897a4f fix for CLI not behaving - see #411 2021-01-10 10:58:16 +00:00
David Goodwin
1ad184641d php7.4 / psalm fixes 2020-01-31 16:30:46 +00:00
David Goodwin
f7c7e35b34 fix formatting 2019-09-15 11:42:21 +01:00
David Goodwin
9cd7dac187 initial attempt at trying to return an exit value within the cli 2019-09-14 20:09:56 +01:00
David Goodwin
4fcdba9cf4 run php-cs-fixer (code reforamt) 2018-12-28 19:31:43 +00:00
David Goodwin
19cda31849 remove psalm warnings from code; fix password_expiry behaviour when enabled/disabled on MySQL 2018-12-28 19:27:33 +00:00
David Goodwin
74002bbf57 psalm fixes 2018-12-27 21:43:11 +00:00
Adrien Crivelli
15df6c1d7b
Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
Christian Boltz
22839d3695 Cli*.php:
- add SVN $Id header


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1709 a1433add-5e2c-0410-b055-b7f2511e0802
2014-11-01 18:05:39 +00:00
Christian Boltz
bbd7c3af77 CliEdit.php:
- execute(): call __handle_params() also if empty args[0] is given
- __interactive(): only ask for id if $id_field is editable

This fixes two issues with a non-editable auto_increment id field


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1661 a1433add-5e2c-0410-b055-b7f2511e0802
2014-04-27 13:41:41 +00:00
Christian Boltz
6ea8b370c0 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
2013-10-06 22:35:02 +00:00
Christian Boltz
1e0225e2c2 model/CliEdit.php:
- help(): generate help output based on $handler->struct
  It shows all available options/fields, but might need some finetuning
  to look better



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1441 a1433add-5e2c-0410-b055-b7f2511e0802
2013-03-03 01:23:50 +00:00
Christian Boltz
f240e20831 model/CliEdit.php:
- add __handle_params() to implement non-interactive mode. It
  reads, checks and handles the various --* commandline parameters
- __handle():
  - replace $this->error() calls with $this->err()
  - add missing return on failure



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1440 a1433add-5e2c-0410-b055-b7f2511e0802
2013-03-03 00:57:07 +00:00
Christian Boltz
eafc2b6222 model/CliEdit.php:
- 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
2013-02-25 23:43:08 +00:00