Commit Graph

1310 Commits (2f26624cebc8cd3fdb3938d1346395fcc169e108)
 

Author SHA1 Message Date
Christian Boltz 2f26624ceb DomainHandler.php, AdminHandler.php:
- implement delete()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1560 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 5871516b47 model/Config:
- read_f(): fix error logging - $var can be an array


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1559 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 6e2e132bac remove "postfixadmin.com" in comments in lots of files
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1558 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 3c59557a6f list-virtual.php:
- make "unknown" translateable

*.lang:
- add "unknown"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1557 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 49573da2d7 PFAHandler:
- make error messages in _inp_*() translateable
- make date format in SQL "translateable"

*.lang:
- add the texts needed for the changes listed above


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1556 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 1b74926afb PFAHandler, *Handler:
- rename _field_$field() to _validate_$field() to make the function name
  more obvious
 


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1555 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz d900835997 functions.inc.php:
- pacrypt(): fix dovecot:* to work with "old" passwords that don't have 
  the {method} prefix


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1554 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 8df6e37dcf setup.php:
- fix displaying the success message for creating a new admin


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1553 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 2dc71b6c9f templates/index.tpl:
- replace {php} usage (which is no longer allowed since switching
  from SmartyBC to Smarty) with $smarty.server

fixes https://sourceforge.net/p/postfixadmin/bugs/303/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1552 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 949d58e5c4 config.inc.php:
- remove unused $CONF['usercontol'] which leaked in with an unrelated 
  patch in r1374
- fixed some typos in comments


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1551 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 462cb6992f AdminpasswordHandler:
- initStruct(): remove description for current password - it doesn't
  exist in $PALANG and we don't really need a description here


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1550 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz f748f31137 model/Config.php:
- Config::read(): error_log() attemps to read undefined config options


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1549 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz c6ca4f9bae common.php:
- call Config::write() earlier, because check_language() uses it
- later add $PALANG with Config::write(__LANG)

Thanks to <controlcde> for reporting the results of this bug on IRC
(even if I had to hunt it down to find the reason ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1548 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz b137e774f6 functions.inc.php:
- check_language(): remove things like ";q=0.8" before checking if 
  a language exists


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1547 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 4785426269 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
11 years ago
Christian Boltz 4fb4ee264a delete some outdated and no longer needed files in snippets/ :
- snippets/baseclass.php
- snippets/fetchmail-class.php
- snippets/fetchmail-remaining.php
- snippets/model.php
- snippets/user_controller.php
- snippets/user_model.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1545 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz ee90f4a74e smarty.inc.php:
- move header() calls from index.tpl to smarty.inc.php, which means 
  we no longer need to use SmartyBC class
- use Smarty instead of SmartyBC class
- eval_size(): use Config::Lang instead of $PALANG

templates/header.tpl:
- move header() calls to smarty.inc.php, and drop {php} usage



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1544 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz d4a34b557d login.php:
- use AdminHandler to find out if the logged in user is a superadmin
- add hint about config.local.php in "unconfigured" warning
- move some lines around to match users/login.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1543 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz f02b781376 backup.php:
- move "unmaintained" warning to templates/backupwarning.tpl (that's 
  the easiest way to have working HTML tags) 
- remove <p> tag from pgsql error message

templates/backupwarning.tpl
- new file, contains the "unmaintained" warning for backup.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1542 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
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
11 years ago
Christian Boltz e96544e815 model/PFAHandler.php, setup.php:
- use Config::lang_f() for $this->msg['successmessage']

*.lang:
- add %s to all texts used for 'successmessage'


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1540 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 21aea632b7 model/PFAHandler.php:
- use Config::lang_f() for msg['store_error']

*.lang:
- add %s to all messages that are used as store_error


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1539 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz e809d2c651 MailboxHandler.php:
- _missing_maildir(): fix forgotten $CONF usage
- cleanup outdated TODO notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1538 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz ff5dbe0099 edit.php:
- fix "undefined index hardcoded_edit" message
  (only set in AdminpasswordHandler)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1537 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
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
11 years ago
Christian Boltz f2c2b554ac model/PFAHandler.php:
- getList: change return value to be always true (even if the database 
  result is an empty array), and die() if the database result is not an 
  array.
  This avoids some if blocks in various files to implement a fallback
  to array() on empty results.

functions.inc.php:
- list_admins(): simplify after the *Handler->getList() change
- get_domain_properties(): change a forgotten $handler->return to 
  $handler->result() (follow-up for r1534)

list-domain, list-virtual.php:
- simplify after the *Handler->getList() change



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1535 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
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
11 years ago
Christian Boltz f38b10cd61 PFAHandler.php:
- set(): make "field $key is missing" translateable
- store(): call db_log() even if storemore() failed


MailboxHandler.php
- storemore(): use $this->infomsg instead of flash_info
 
*.lang
- add 'missing_field' = 'Field %s is missing';
- change reate_mailbox_result_success' and
  'pCreate_mailbox_result_succes_nosubfolders'
  to "The mailbox %s ..."

en.lang, nl.lang:
- remove unused texts 'pAdminList_domain_usercontrol',
  'pAdminCreate_domain_usercontrol', 'pAdminEdit_domain_usercontrol'


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1533 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 43f2591d93 functions.inc.php:
- smtp_get_admin_email(), domain_postcreation(), domain_postdeletion(): 
  use Config::read instead of $CONF
- smtp_get_response(): whitespace fixes



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1532 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz ba7ebe7adb scripts/shells/shell.php:
- disable some unused code


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1531 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz ade5fd0c24 AliasHandler:
- initStruct(): set default for 'goto' to empty array()
  This fixes a problem with the cli when --goto was not specified				


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1530 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz f444de402b functions.inc.php:
- pacrypt(), dovecot:* method:
  - allow "." in dovecot method (to allow a suffix like ".b64")
  - blacklist SCRAM-SHA-1 (needs -u)
  - check against list of non-salted methods to be backward compatible
    with dovecot < 2.1 again
  Thanks to Szilagyi Jozsef <szjozsef AT yahoo DOT com> for providing
  the list of non-salted methods etc.

functions.inc.php, scripts/postfixadmin-cli.php:
- drop unused global variables $table_admin and $table_alias_domain



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1529 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
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
11 years ago
Christian Boltz 1c27ab9074 postfixadmin-cli.php:
- __initConstants(): substr() is a bad idea to find the parent 
  directory. Use dirname() instead.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1527 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 41a2b72e6d postfixadmin-cli.php
- remove function PostfixAdmin - __construct() is enough ;-)
  and having both caused a redefinition warning


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1526 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 5d4240ce52 functions.inc.php:
- pacrypt: digest-md5 hashes include the username - until someone 
  implements it, let's declare it as unsupported and error out


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1525 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 0d6f9ff99f functions.inc.php:
- pacrypt(): some small changes after Szilagyi Jozsef's patch:
  - comment out unused $crypt_method
  - change $dovecotpw default to "doveadm pw" (unrelated to the patch)
  - set $dovepasstest to "-t $pw_db" instead of having two similar
    command lines, and also shellescapearg() $pw_db
  - use "if (empty($dovepasstest))" instead of "if (empty($pw_db))"



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1524 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 161d387485 - pacrypt(): add support for dovecot *-CRYPT passwords
doveadmin pw now has an option "-t $hash" which allows to verify 
  salted passwords (added in dovecot 2.1 AFAIK)
  Also, the {METHOD} part is no longer removed.

  Patch by Szilagyi Jozsef <szjozsef [at] yahoo.com> - thanks!

  (The schemes which requires also the username -u option is still not supported)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1523 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz c2ccffb76c functions.inc.php:
- mailbox_postdeletion(): use Config::read instead of global $CONF


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1522 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz b985816baa fetchmail: add sslcertck, sslcertpath, sslfingerprint
ADDITIONS/fetchmail.pl
- add sslcertck, sslcertpath and sslfingerprint to fetchmail config
- some whitespace fixes

fetchmail.php
- add sslcertck, sslcertpath, sslfingerprint fields
  (sslcertpath and sslfingerprint require $CONF[fetchmail_extra_options]
  because they don't have input validation)

languages/*.lang
- add new texts needed for the added fields

templates/fetchmail.tpl:
- add the new fields
- also add extra_options and mda fields - they were not displayed yet

upgrade.php
- fix _db_add_field() to call _db_field_exists() with correct table name
- upgrade_1519(): add sslcertck, sslcertpath, sslfingerprint fields to the
  fetchmail table


Most parts of this commit are based on the work of Lars Engelhard
(modified files sent on the mailinglist 2013-07-30)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1519 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 5f94773ae4 MailboxHandler:
- fix syntax error :-/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1518 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 7b6f3e56cb MailboxHandler.php:
- create_mailbox_subfolders(), check_quota(): 
  use class variables instead of parameters
- create_mailbox_subfolders(): remove check for empty $this-id - this can 
  never happen because it would fail much earlier in the class
- check_quota(), allowed_quota(), mailbox_post_script(), 
  create_mailbox_subfolders(): mark as protected



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1517 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz f9506d97b1 MailboxHandler.php:
- new function mailbox_post_script()
  - result of merging mailbox_postcreation() and mailbox_postedit(),
    replaces those two functions
  - drop all parameters, read them from class variables instead
  - store warn message in $this->errormsg[] instead of using print
- changed function calls to use mailbox_post_script()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1516 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 73a793433e moved the following functions from functions.inc.php to MailboxHandler.php:
- check_quota ()
- allowed_quota()
- mailbox_postcreation()
- mailbox_postedit()
- create_mailbox_subfolders()

The code was moved without any changes, except
- added leading whitespace
- removed "TODO: move to MailboxHandler" ;-)


MailboxHandler:
- change function calls for moved functions


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1515 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz ecc84a1486 functions.inc.php:
check_quota()
  mailbox_postcreation()
  mailbox_postedit()
  create_mailbox_subfolders()
  - use Config::read() / Config::bool() instead of $CONF
  - update comment header
  - some minor changes to make the code better readable



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1514 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 08c9b4e49f *.lang:
- renamed some $PALANG texts:
  - pOverview_button => go
  - pOverview_mailbox_name => name
  - pSendmail_admin => from
  - pAdminEdit_admin_username => admin
  - pEdit_alias_goto => to 
- deleted obsolete or duplicate $PALANG texts:
  - pOverview_alias_goto
  - pCreate_alias_goto
  - pEdit_alias_button
  - pEdit_mailbox_name
  - pEdit_mailbox_button
  - pViewlog_username
  - pViewlog_button
  - pAdminList_admin_username
  - pAdminList_virtual_button
  - pAdminList_virtual_alias_address
  - pAdminList_virtual_alias_goto
  - pAdminList_virtual_mailbox_name
  - pAdminEdit_domain_button
  - pAdminEdit_admin_button
  - pBroadcast_from
  - pBroadcast_send

model/*, setup.php, templates/*, users/edit-alias.php:
- update to use the renamed $PALANG texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1513 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
Christian Boltz 1c16c52086 *.lang:
- remove unused $PALANG texts:
  - $PALANG['pCreate_dbLog_createmailbox']
  - $PALANG['pCreate_dbLog_createalias']
  - $PALANG['pDelete_dbLog_deletealias']
  - $PALANG['pDelete_dbLog_deletemailbox']
  - $PALANG['pEdit_dbLog_editalias']
  - $PALANG['pEdit_dbLog_editmailbox']



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1512 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago
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
11 years ago
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
11 years ago
Christian Boltz 61c5920c46 *.lang:
- rename $PALANG['pUsersVacation_body'] to $PALANG['message']
- remove duplicate $PALANG['pBroadcast_message']

templates/*:
- use $PALANG['message'] everywhere


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1509 a1433add-5e2c-0410-b055-b7f2511e0802
11 years ago