0
0
mirror of https://github.com/postfixadmin/postfixadmin.git synced 2024-09-20 03:36:20 +02:00
Commit Graph

30 Commits

Author SHA1 Message Date
Christian Boltz
af6a1b6626 Add support for domain-level quota (total quota for a domain)
Based on a patch from W. Rossmann (W. Rossmann@SF),
https://sourceforge.net/tracker/index.php?func=detail&aid=2974928&group_id=191583&atid=937966
with some modifications, cleanup and adoptions to trunk (especially templates)

config.inc.php:
- new config option $CONF['domain_quota'] to enable/disable domain-level
  quota (default: enabled)
- new config option $CONF['domain_quota_default'] (default: 2 GB)

functions.inc.php - check_quota():
- add code to check the quota sum on a domain
- add optional parameter $username (to exclude that username from quota
  calculation, used by edit-mailbox)

edit-domain.php, create-domain.php,
admin_edit-domain.tpl, admin_create-domain.tpl:
- add input field and handling for domain-level quota

list-domain.php, overview-get.tpl, adminlistdomain.tpl:
- display allocated and allowed domain quota
- beautify quota and max_quota fields - display "unlimited" instead of "-1"

edit-mailbox.php:
- hand over username to check_quota()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1042 a1433add-5e2c-0410-b055-b7f2511e0802
2011-04-19 20:18:46 +00:00
Christian Boltz
4a29c75938 edit-mailbox.php:
- drop superfluous "modified" field (it's default anyway)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@998 a1433add-5e2c-0410-b055-b7f2511e0802
2011-03-09 20:50:13 +00:00
Christian Boltz
c97e5224dc Remove $username parameter from db_log()
functions.inc.php:
- remove $username parameter from function db_log()
  (now auto-detected with authentication_get_username())

various files:
- remove hardcoded username ('CONSOLE', $username etc.) in db_log() calls


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@966 a1433add-5e2c-0410-b055-b7f2511e0802
2011-02-15 22:20:27 +00:00
Christian Boltz
4a2b40e100 changed db_update parameters for the most common usecase "WHERE col=value" -
column and value are separate parameters now

functions.inc.php:
- changed function db_update() parameters - column name and value for the WHERE
  condition are now two separate parameters. This means we don't need to
  escape_string(), add quotes etc. for most UPDATE queries.
  Example call: db_update('alias', 'address', $this->username, $values_array)
- the previous db_update() is now called db_update_q()

model/UserHandler.php:
- changed db_update call to the new parameters
- removed now unused variables
- renamed $username to $E_username
- call pacrypt directly when setting the $set array, no need for $new_db_password

model/AliasHandler.php
- changed db_update call to the new parameters

edit-mailbox.php
- switched to db_update_q()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@931 a1433add-5e2c-0410-b055-b7f2511e0802
2010-12-31 20:13:53 +00:00
Christian Boltz
4c912f1da8 list-virtual.php:
- 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
2010-09-26 23:14:42 +00:00
Sebastian
9ddf15439f - fix some display errors after rev. 788, found and patch supplied by Jan-Kruis, thx.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@791 a1433add-5e2c-0410-b055-b7f2511e0802
2009-12-24 14:58:01 +00:00
Sebastian
b1287d97e2 - big merge of Postfixadmin smarty into trunk
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@757 a1433add-5e2c-0410-b055-b7f2511e0802
2009-11-05 14:55:39 +00:00
David Goodwin
81059ddbdd allow local_part to change (in theory this code serves no purpose, as the username cannot be changed.. but perhaps it will be in the future (part 2 of operation shut-up-libertytek-charles :) )
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@496 a1433add-5e2c-0410-b055-b7f2511e0802
2008-12-12 19:40:39 +00:00
Christian Boltz
2a555bcd75 edit-mailbox.php, templates/edit-mailbox.php:
- revert r482 (show password when editing mailboxes) because it does more
  harm than good (see mailinglist for details).
  Also opened a feature request to bring this back in a way that works for
  everybody:
  https://sourceforge.net/tracker/index.php?func=detail&aid=2332595&group_id=191583&atid=937967


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@485 a1433add-5e2c-0410-b055-b7f2511e0802
2008-11-23 12:18:20 +00:00
Christian Boltz
29070cfd59 edit-mailbox:
- password change is now recognized even if only the "new password (again)" 
  field was changed/filled


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@484 a1433add-5e2c-0410-b055-b7f2511e0802
2008-11-22 10:23:36 +00:00
David Goodwin
8cc2b74a64 patch from int on irc - if $CONF[show_passwords] then do so
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@482 a1433add-5e2c-0410-b055-b7f2511e0802
2008-11-13 11:56:52 +00:00
David Goodwin
a29800924e edit-mailbox.php: merge of patch from https://sourceforge.net/tracker/index.php?func=detail&aid=1996052&group_id=191583&atid=937966 ; thanks Sylvain BEUCLER - beuc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@386 a1433add-5e2c-0410-b055-b7f2511e0802
2008-06-17 21:19:44 +00:00
Christian Boltz
add0c86cad Applied patch from Michiel van Baak (mvanbaak)
https://sourceforge.net/tracker/index.php?func=detail&aid=1923030&group_id=191583&atid=937966
- added quota parameter in mailbox_postcreation() hook
- new hook to update the quota after editing a mailbox

Modifications to the patch:
- made $quota an required parameter in the mailbox_postedit and 
  mailbox_postcreation functions
- the scripts always get the quota as 4th parameter. In case $quota 
  is <= 0, it is set to 0.


config.inc.php:
- new option $CONF['mailbox_postedit_script']

edit-mailbox.php:
- call mailbox_postedit() after editing the mailbox

functions.inc.php:
- added $quota parameter to mailbox_postcreation()
- new function mailbox_postedit()

create-mailbox.php:
- added $quota parameter on mailbox_postcreation() call


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@373 a1433add-5e2c-0410-b055-b7f2511e0802
2008-05-25 21:19:58 +00:00
David Goodwin
a2c909b6e9 edit-mailbox.php- if the user clicks on cancel, forward them to somewhere else, and not save stuff - see https://sourceforge.net/tracker/index.php?func=detail&aid=1888847&group_id=191583&atid=937964
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@304 a1433add-5e2c-0410-b055-b7f2511e0802
2008-02-28 11:58:52 +00:00
Christian Boltz
f2c56c9203 edit-mailbox.php
- fix: put the values the user entered in the form again if an error was
  detected (instead of showing the form completely empty)
- fix: do not check for password length when password is not going to be 
  changed (empty password field).
  Thanks to Danilo Montagna (dmontagna) for pointing this out!
  https://sourceforge.net/forum/message.php?msg_id=4709926


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@291 a1433add-5e2c-0410-b055-b7f2511e0802
2008-01-09 21:47:28 +00:00
David Goodwin
07a823ef6a edit-mailbox.php: Closes #1865124 - too short error was not telling the user the minimum size
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@287 a1433add-5e2c-0410-b055-b7f2511e0802
2008-01-06 17:12:10 +00:00
David Goodwin
269c70d330 edit-mailbox.php: random edits - I thought password length check was already in... </confusion>
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@285 a1433add-5e2c-0410-b055-b7f2511e0802
2008-01-03 21:51:08 +00:00
David Goodwin
70dea6ca05 edit-mailbox.php; indentation fix
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@272 a1433add-5e2c-0410-b055-b7f2511e0802
2007-12-17 07:03:54 +00:00
David Goodwin
39953d029d rename templates to .php instead of .tpl
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@250 a1433add-5e2c-0410-b055-b7f2511e0802
2007-12-02 13:59:33 +00:00
Christian Boltz
1df4b68ac8 several *.php files:
- no longer use $incpath - merging admin/ is done
  http://sourceforge.net/tracker/index.php?func=detail&aid=1838327&group_id=191583&atid=937964

Note that $incpath is still used by common.php - removing it would break users/


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@243 a1433add-5e2c-0410-b055-b7f2511e0802
2007-11-26 23:30:16 +00:00
Christian Boltz
06537afdbd - fix: password was always changed when editing a mailbox.
Thanks to Ryan Wagoner for pointing this out.
- first usage of db_update function ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@185 a1433add-5e2c-0410-b055-b7f2511e0802
2007-11-04 00:53:13 +00:00
Christian Boltz
c51b27a9c9 merged overview.php into list-domain.php and list-virtual.php
list-domain.php:
- added several admin/superadmin switches and permission checks
- merged GET and POST code
- Note: still different templates for superadmins (admin_list-domain.tpl)
  and admins (overview-get.tpl) because of large layout difference

list-virtual.php:
- added several admin/superadmin switches and permission checks
- added check for admins without any domains (redirects to domain list,
  which can handle this situation)
- migrated FIXME from overview.php 
  -> David, please review the query and remove the FIXME afterwards

overview.php:
- DELETED - no longer needed

overview.tpl:
- RENAMED overview.tpl to list-virtual.tpl
- removed admin/superadmin filename switch
- removed $incpath switch for images

menu.tpl:
- menu for domain admins now has "domain list" and "virtual list"
  instead of "overview"

delete.php, edit-active.php, edit-alias.php, edit-mailbox.php, search.php:
- changed redirect to list-virtual.php

overview-get.tpl:
- changed link to list-virtual.php

main.tpl:
- changed overview link to list-domain.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@181 a1433add-5e2c-0410-b055-b7f2511e0802
2007-11-03 22:24:34 +00:00
Christian Boltz
1132b958e5 Finally got rid of admin/ :-)
- moved admin-only scripts from admin/ to /
- removed all merged files ("require('../$file')") from admin/
- changed include paths - no more admin/superadmin switching needed
- admin_menu.tpl is also gone
- removed all menu.tpl / admin_menu.tpl switches - no more needed
- admin/index.php still exists and redirects to /



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@168 a1433add-5e2c-0410-b055-b7f2511e0802
2007-10-31 18:24:40 +00:00
Christian Boltz
f91a6641c3 - Fix HTML (<span> is opened inside the error message, close it again)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@119 a1433add-5e2c-0410-b055-b7f2511e0802
2007-10-02 23:17:07 +00:00
David Goodwin
e4f2e45039 edit-mailbox.php; try and make it work properly
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@117 a1433add-5e2c-0410-b055-b7f2511e0802
2007-10-02 13:37:42 +00:00
David Goodwin
dc51d62e15 update license headers
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@107 a1433add-5e2c-0410-b055-b7f2511e0802
2007-09-30 15:53:54 +00:00
David Goodwin
075d15b4b1 db_log patch from amsys - make db logging translatable
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@90 a1433add-5e2c-0410-b055-b7f2511e0802
2007-09-24 09:24:11 +00:00
David Goodwin
3e70f276c2 final set of refactoring patches (and the rest)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@71 a1433add-5e2c-0410-b055-b7f2511e0802
2007-09-22 10:59:41 +00:00
Christian Boltz
0281911724 - merge admin/edit-mailbox.php and edit-mailbox.php
- merge identical parts of GET and POST code
- fix uninitalized variable (was only visible in case of validation errors)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@42 a1433add-5e2c-0410-b055-b7f2511e0802
2007-08-21 22:37:26 +00:00
Mischa Peters
85dc57beee Initial Import in SourceForge
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1 a1433add-5e2c-0410-b055-b7f2511e0802
2007-03-24 07:27:00 +00:00