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

32 Commits

Author SHA1 Message Date
David Goodwin
f01274ec94
try relaxing composer dependencies to allow php8.2 dev support, reformat so composer format passes 2024-04-22 21:02:01 +01:00
David Goodwin
2d6ded2786 PSR2 -> PSR12 formatting 2022-06-28 13:46:11 +01:00
Valery Kartel
d54754097f
Update AliasdomainHandler.php 2021-06-02 13:24:11 +03: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
3c7da4f3b8 Refactor some methods
PFAHandler::store() -> PFAHandler::save();
 PFAHandler::storemore() -> PFAHandler::postSave();
 PFAHandler::beforestore() -> PFAHandler::preSave();
2020-09-25 21:29:45 +01:00
David Goodwin
e8f27969a3 psalm fixes 2020-06-21 16:44:43 +01:00
Christian Boltz
d2588a4de2
Fix phpcs whitespace breakage in initStruct etc. 2018-04-22 18:24:41 +02:00
Adrien Crivelli
15df6c1d7b
Reformat everything with PHP-Cs-Fixer 2018-01-26 23:54:37 +09:00
Christian Boltz
31006928b4 AliasdomainHandler:
- initStruct(): Adjust columns to match list-virtual.php layout:
  - make 'alias_domain' a link
  - move 'active' after 'modified'
  - don't display 'created'



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1771 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-06 13:29:28 +00:00
Christian Boltz
4ce0a57e83 PFAHandler:
- add protected $searchfields = array(); - list of fields to search by
  default, if just a search term is given. This will be done with
  $search['_'], but that code is not implemented yet.
- add $this->msg['show_simple_search'] (true if $searchfields is non-empty)

list.tpl:
- display search input box and search overview only if $searchfields is
  not empty

AliasdomainHandler:
- add 'alias_domain' and 'target_domain' to $searchfields

MailboxHandler:
- add 'username' to $searchfields

AliasHandler:
- add 'address' and 'goto' to $searchfields

This effectively means that the search input box is no longer displayed
in list.php for admin, domain and fetchmail listings.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1770 a1433add-5e2c-0410-b055-b7f2511e0802
2015-04-05 20:23:38 +00:00
Christian Boltz
cc2b157d59 *Handler:
- add $msg['confirm'] (confirmation message when attemping to delete an
  item, displayed by list.php)

*.lang:
- add various confirm_delete_* texts needed by *Handler
- rename confirm_domain to confirm_delete_domain


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1749 a1433add-5e2c-0410-b055-b7f2511e0802
2015-03-17 21:07:59 +00:00
Christian Boltz
4e489df526 AliasdomainHandler:
- better error messages

languages/*.lang
- rename pCreate_alias_domain_error3 to alias_domain_create_failed
- add new texts needed for AliasdomainHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1586 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-16 20:02:14 +00:00
Christian Boltz
bcb38c9664 AliasdomainHandler:
- implement delete()
- rename _field_target_domain() to _validate_target_domain()
  (follow-up for r1555)



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1561 a1433add-5e2c-0410-b055-b7f2511e0802
2013-11-10 18:55:23 +00:00
Christian Boltz
8ea4fd6c82 AliasdomainHandler.php:
- better error/success messages
- cleanup TODO notes

*.lang:
- new texts for alias domains: alias_domain_change_failed, 
  alias_domain_changed, alias_domain_to_itsself


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1541 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-19 18:45:41 +00:00
Christian Boltz
4d9a338eb2 After hunting an "undefined index transport" error in list-domain, I
found out that the 'Config' class is too static - it shares its static
data with the 'Lang' child class. 

This caused a conflict because we have $CONF[transport] and 
$PALANG[transport], and Config::read('transport') returned the $PALANG 
text.

To fix this, all texts are now stored as $CONF[__LANG].
I also dropped the 'Lang' class.


model/Config.php:
- mark the 'Config' class as final to ensure we don't trap into the 
  "too static" problem again.
- bool(): display and log an error message if a $CONF option does not
  contain YES or NO (that would have uncovered this bug much earlier)
- add lang() and lang_f() wrapper functions to get $PALANG texts
- remove unused $__cache and $__objects

model/Lang.php:
- deleted

common.php:
- store $PALANG as $CONF[__LANG]

lots of files:
- replace Lang::read() and Lang::read_f() calls with Config::lang()
  and Config::lang_f()




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1536 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-13 18:11:18 +00:00
Christian Boltz
bb7a3ff04d model/*Handler.php and various other files
- rename $this->return to $this->result


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1534 a1433add-5e2c-0410-b055-b7f2511e0802
2013-10-13 15:26:37 +00:00
Christian Boltz
76f66ac8db *.lang:
- rename some $PALANG variables once more because smarty breaks when
  using "-"
  - add-alias => add_alias
  - add-alias-domain => add_alias_domain
  - add-mailbox => add_mailbox
  - email-address-already-exists => email_address_already_exists
  - change-password => change_password
  - password-again => password_again

model/*, setup.php, templates/*
- update to use the changed $PALANG variables


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1511 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 22:51:28 +00:00
Christian Boltz
9c0004a431 *.lang:
- rename various $PALANG texts:
  - pMenu_create_alias => add-alias
  - pMenu_create_alias_domain => add-alias-domain
  - pMenu_create_mailbox => add-mailbox
  - pOverview_get_mailboxes => mailboxes
  - pPassword_button => change-password
  - pAdminList_domain_description => description
  - pAdminList_domain_aliases => aliases
  - pAdminEdit_domain_transport => transport
  - pAdminEdit_admin_password2 => password-again
- remove duplicate or unused $PALANG texts:
  - pOverview_alias_alias_count
  - pOverview_alias_mailbox_count
  - pOverview_get_aliases
  - pCreate_alias_domain_button
  - pCreate_alias_welcome
  - pCreate_alias_button
  - pCreate_mailbox_password2
  - pCreate_mailbox_quota_text_error
  - pCreate_mailbox_button
  - pAdminMenu_viewlog
  - pAdminMenu_create_alias
  - pAdminMenu_create_mailbox
  - pAdminList_domain_mailboxes
  - pAdminList_domain_transport
  - pAdminList_virtual_welcome
  - pAdminList_virtual_alias_alias_count
  - pAdminList_virtual_alias_mailbox_count
  - pAdminList_virtual_mailbox_username
  - pAdminList_virtual_mailbox_quota
  - pAdminEdit_domain_description
  - pAdminEdit_domain_aliases
  - pAdminEdit_domain_mailboxes
  - pAdminEdit_domain_mailboxes_text
  - pUsersMenu_password

model/*, seetup.php, templates/*
- use changed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1510 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 22:33:35 +00:00
Christian Boltz
a1646f84b6 *.lang:
- add $PALANG['active'] = 'Active' to replace various duplicates:
  -$PALANG['pOverview_alias_active']
  -$PALANG['pOverview_alias_domain_active']
  -$PALANG['pOverview_mailbox_active']
  -$PALANG['pCreate_alias_active']
  -$PALANG['pEdit_alias_active']
  -$PALANG['pCreate_mailbox_active']
  -$PALANG['pAdminList_admin_active']
  -$PALANG['pAdminList_domain_active']
  -$PALANG['pAdminList_virtual_mailbox_active']
  -$PALANG['pAdminEdit_domain_active']
  -$PALANG['pAdminEdit_admin_active']

model/*, templates/*:
- use $PALANG['active'] everywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1503 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-28 19:24:00 +00:00
Christian Boltz
fcee414740 *.lang and various other files:
- rename $PALANG['pAdminList_domain_modified'] to $PALANG['last_modified']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1500 a1433add-5e2c-0410-b055-b7f2511e0802
2013-07-27 21:52:52 +00:00
Christian Boltz
9af5a5cc03 *Handler.php:
- set $db_table and $id_field in the class, not inside initStruct()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1483 a1433add-5e2c-0410-b055-b7f2511e0802
2013-06-23 15:04:05 +00:00
Christian Boltz
ea7036ae62 AliasdomainHandler:
- delete(): return error message if db_delete fails


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1460 a1433add-5e2c-0410-b055-b7f2511e0802
2013-05-01 19:01:18 +00:00
Christian Boltz
227eca6faf PFAHandler.php:
- introduce public array $infomsg[] (for success messages)
- store(): write successmessage to $this->infomsg[]

edit.php:
- display $handler->infomsg instead of hardcoded success message

AdminHandler.php, AliasHandler.php, AliasdomainHandler.php,
DomainHandler.php, MailboxHandler.php:
- move successmsg from webformConfig() to initMsg()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1428 a1433add-5e2c-0410-b055-b7f2511e0802
2013-02-16 20:42:17 +00:00
Christian Boltz
a46bcc955c edit.php:
- prefill all $formconf['prefill'] fields from URL parameters (typically
  used for the domain)

model/AliasdomainHandler.php:
- allow to prefill alias_domain and target_domain from URL parameters
 
model/AliasHandler.php:
- allow to prefill domain from URL parameters
- some whitespace changes
- add storemore() with a TODO note

model/MailboxHandler.php:
- allow to prefill domain from URL parameters
- some whitespace changes
- add some TODO notes



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1422 a1433add-5e2c-0410-b055-b7f2511e0802
2013-01-27 19:52:19 +00:00
Christian Boltz
232cee9d5f PFAHandler:
- make PFAHandler an "abstract class"
- add functions that must be implemented by every *Handler class
  as abstract functions:
  - abstract protected function initStruct();
  - abstract protected function initMsg();
  - abstract public function webformConfig();
  - abstract protected function validate_new_id();
- lots of additional comments

AdminHandler, AliasdomainHandler, DomainHandler, MailboxHandler:
- remove comments that are now in PFAHandler


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1385 a1433add-5e2c-0410-b055-b7f2511e0802
2012-05-06 20:01:32 +00:00
Christian Boltz
b8812686aa AliasdomainHandler.php, PFAHandler.php:
- move empty storemore() function from AliasdomainHandler to PFAHandler



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1309 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-26 18:27:25 +00:00
Christian Boltz
18b8564b64 Make $struct in the *Handler classes customizeable
config.inc.php:
- add $CONF['*_struct_hook'] to modify $struct in the *Handler classes

PFAHandler.php:
- call $CONF['*_struct_hook'] hook

AdminHandler.php, AliasdomainHandler.php, DomainHandler.php:
- remove now outdated TODO notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1303 a1433add-5e2c-0410-b055-b7f2511e0802
2011-12-20 23:07:34 +00:00
Christian Boltz
9cf7c7799a Use edit.php to edit/create for alias domains
(yes, we get edit mode "for free")

model/AliasdomainHandler.php:
- add webformConfig()

configs/menu.conf:
- change url_create_alias_domain to edit.php?table=aliasdomain

templates/list-virtual_alias_domain.tpl
- change ?target_domain to &target_domain 
  (TODO: this is currently ignored by edit.php)
- add edit link (TODO: add log action to avoid the error message)

create-alias-domain.php:
- deleted :-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1275 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 22:48:22 +00:00
Christian Boltz
63f20c28da AliasdomainHandler.php - initStruct():
- if only one alias_domain available, filter it out from target_domain list


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1271 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-13 16:19:53 +00:00
Christian Boltz
06ffffae7d AliasdomainHandler.php:
- set $domain_field to enable permission handling (and to get a list of
  allowed/available domains)
- fill $this->struct['alias_domain']['options'] and 
  $this->struct['target_domain']['options'] with available domains that
  are not yet used as alias domain
- override init() to get "All domains are already aliased" error message
  out as early as possible (and let init() fail in this case)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1269 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-12 23:41:17 +00:00
Christian Boltz
398ce70132 model/AliasdomainHandler.php:
- new file
- handler class for alias domains
- completely working (except delete)
- some TODOs included


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1261 a1433add-5e2c-0410-b055-b7f2511e0802
2011-11-01 00:00:13 +00:00