Commit Graph

939 Commits (b065366a91781ce0d6c63bf538db3bf6061be3d7)
 

Author SHA1 Message Date
Christian Boltz 3f46cdfc13 footer.tpl:
- swapped order of "update check" and "logged in as" to be more logical
  (we now have $version | update check | logged in as | $CONF['footer_text'])
- added a </div>

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1087 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 15401040ec edit-alias.php, edit-domain.php, edit-vacation.php,
create-alias-domain.php, password.php, viewlog.php:
- replaced tMessage with flash_error() / flash_info()

edit-alias.php:
- removed now superfluous code to merge multiple tMessage with <br>
- removed a </span> that was added after $PALANG['pEdit_alias_goto_text_error2']

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1086 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz ceb24297c7 users/edit-alias.php, users/password.php, users/vacation.php, users/login.php:
- replaced tMessage with flash_error() / flash_info()

users/vacation.php:
- set today as default date if vacation start/end date are empty

users/edit-alias.php:
- removed now superfluous code to join multiple tMessage texts with <br>
- removed a </font> that was appended to $PALANG['pEdit_alias_goto_text_error2']

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1085 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 59dd7cb083 login.php:
- replaced tMessage with flash_error()

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1084 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz f2ce6d24fe list-virtual.php
- removed superfluous reference to tMessage (not used anywhere)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1083 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 903e1f9369 list-admin.php
- removed superfluous smarty tMessage assignment ($tMessage is not used
  in list-admin)

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1082 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz b610c21baf edit-active-admin.php, edit-active-domain.php, edit-active.php
- replaced $tMessage with flash_error()

edit-active.php:
- removed a </font> added after $PALANG['pEdit_mailbox_domain_error']

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1081 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz cffa61c652 delete.php:
- rename $tMessage to $deletionMessage
- replace tMessage with flash_error

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1080 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz cc0a63ce3a backup.php:
- switch from tMessage to flash_error()
- style download link as button

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1079 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 5fdb814ca4 setup.php:
- renamed $tMessage to $setupMessage

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1078 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 27ce979678 header.tpl, index.tpl, flash_error.tpl:
- move flash_error and flash_info output from header.tpl to separate 
  flash_error.tpl file
- some HTML whitespace fixing in header.tpl

This commit is part of the huge cleanup patch by Dale Blount (lnxus@SF),
https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3370510&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1077 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 058f46f1a5 users/vacation.php, edit-vacation.php, backup.php:
- supress warnings about PHP's date.timezone not set.

  The risk of doing this is low IMHO - the worst thing that can happen 
  is a wrong default date for vacation or a "wrong" tempfile name for
  backup.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1076 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 931a375255 VacationHandler:
- check_vacation() used outdated syntax $ah->get() which nowadays only
  returns true/false. Fixed to fetch $ah->result() and added at least
  basic error handling.
Indirectly ;-) reported by supa_user on IRC


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1075 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
David Goodwin 8044cb9dc1 fix as per #3086890
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1073 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz e7d230da28 dropspan:
This is a quick&dirty script to remove HTML from the language files.

It will be deleted from SVN again once this job is done.

    grep '<' en.lang
will print a TODO list ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1072 a1433add-5e2c-0410-b055-b7f2511e0802
13 years ago
Christian Boltz 43bde95b57 functions.inc.php - pacrypt():
- if dovecotpw does not give the expected output, read stderr and write
  it to error_log()

This would have made the debugging session I just had with makomi on IRC
about an hour shorter ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1071 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 7dc3d62f3d smarty.inc.php:
- replaced last usage of $CONF['postfix_admin_path'] with $incpath

config.inc.php:
- drop (now unused) $CONF['postfix_admin_path'] config variable


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1070 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 3330e20b81 functions.inc.php - gen_show_status()
- do not leave the while loop with break - this could hide some
  undeliverable alias targets from being flagged if another alias
  target points to a domain in $CONF[show_undeliverable_exceptions]
- do not add a blank $CONF[show_status_text] if 
  $CONF[show_undeliverable] is disabled - it only wastes space ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1069 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz b6cf638b4e functions.inc.php - gen_show_status():
don't show vacation_domain as undeliverable + various code cleanup

- don't show the vacation domain as undeliverable
  In theory this should already have worked already, but $stat_vacdomain
  missed the first letter of the domain ("xample.com" instead of
  "example.com") which broke it.
  Fixed by using $stat_domain, which has the same content anyway.
  This fixes part (2) of
  https://sourceforge.net/tracker/?func=detail&aid=1951926&group_id=191583&atid=937967
- generate the regex for $CONF[recipient_delimiter] at the start of the
  function. Besides saving some CPU cycles, this makes the code more
  readable.
- generate $stat_domain earlier and in a regex-free way
- drop $stat_catchall - it's nothing else than @ + $stat_domain
- use in_array() to check $CONF[show_undeliverable_exceptions] instead
  of a while loop



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1068 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz b323c8d25c functions.inc.php:
- lots of whitespace changes

old:
    foo
    {

new:
	foo {


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1067 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 9a1317edc9 functions.inc.php:
- check_quota(): whitespace changes only


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1066 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 62261f54ae functions.inc.php: fix check_quota() to handle unlimited maxquota
- explicitely check for unlimited maxquota when checking if 
  $quota > $limit[maxquota]. Without this, $quota was always
  considered as being too big (not surprising, everything is >0 ;-)
  This fixes https://sourceforge.net/tracker/?func=detail&aid=3306926&group_id=191583&atid=937964
  (caused by domain quota patch, therefore not affecting 2.3.x)
- replaced setting $rval with return in some cases if the decision is
  final without needing to check domain quota
- added lots of comments to make understanding the function easier



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1065 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz bd41cf1693 edit-domain.php:
- changed UPDATE query to db_update()
  This should also fix 
  https://sourceforge.net/tracker/?func=detail&aid=3306933&group_id=191583&atid=937964
- replaced various isset($_POST[...]) with safepost() calls


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1064 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 0f49fb81b7 - text change to "Logged _in_ as %s" (the 'in' was missing)
pointed out by supa_user in #postfixadmin
- added a german translation


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1062 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
David Goodwin 78635ff88c fix patch for config.inc.php when creating .deb
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1061 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz c858a602d8 create-mailbox.php:
- pSendmail_subject_text comes from $PALANG, not $CONF

Thiss fixes 
https://sourceforge.net/tracker/?func=detail&aid=3305302&group_id=191583&atid=937964
reported by Dale Blount (lnxus @SF)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1060 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 5451b536d3 The link target of the "Main" menu item in users/ was configurable in
$CONF['user_footer_link']. This doesn't really make sense - it should
always be a link to users/main.php.

configs/menu.conf:
- added url_user_main = main.php

templates/users_menu.tpl:
- replaced $CONF.user_footer_link with #url_user_main#

config.inc.php:
- removed (now unused) $CONF['user_footer_link']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1059 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 10368edc90 LICENSE.TXT:
- update list of used licenses
- split list into "shipped/not shipped with PostfixAdmin"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1056 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 408c257659 *.lang:
- new texts 'show' and 'all' for list-virtual (see r1054)
- marked 'pOverview_alias_domain_target' as obsolete (no longer needed since r1052)

de.lang:
- added some translations

language-update.sh:
- made --obsolete working


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1055 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz bf1883ebd7 list-virtual:
new option 'all' to display domain aliases, mailboxes and aliases on
one page (like in 2.3.x)

The question is: what do we want as default?
-> feedback please!
(personally, I'd prefer "all")

templates/list-virtual.tpl:
- new submenu option "all"
- changed subnav to a more lightweight design

css/default.css:
- new style ".subnav p" for submenu
- new style "span.active"


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1054 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 3ffd496587 list-virtual.php:
- lots of whitespace fixes to use 4 spaces everywhere
  (which list-virtual.php has in its vim: comment since a long time)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1053 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 23e3330003 display alias domains less confusing (from/to instead of "is an alias domain for ...)
This fixes 
https://sourceforge.net/tracker/?func=detail&aid=2890375&group_id=191583&atid=937967

list-virtual.php:
- merge queries for from and to side of alias domains
- use a mostly common query for MySQL and PgSQL
- move "can create alias domain" logic to PHP

list-virtual_alias_domain.tpl:
- merge "from" and "to" view to one table
- add "To" column to the merged table
- do not link to $fDomain (which would lead to the currently displayed page)
- drop the second table / "is an alias domain for ..."



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1052 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz b37811d153 sendmail.php:
- hand over subject and body as separate parameters to smtp_mail()
  instead of cooking the mail headers manually


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1051 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 0247de425a upgrade_1050():
- add index on (domain,timestamp) in log table to make viewlog faster

_add_index():
- fix handling of multi-column aliases in MySQL


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1050 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz f6cb50e914 backup.php:
- add a warning that backup.php is poorly maintained and might contain bugs
- disable HTML escaping for the message - we feed it with HTML tags...


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1049 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 43d1b71d4d smarty.inc.php:
- cleanup flash messages after displaying them

This fixes
https://sourceforge.net/tracker/?func=detail&aid=3232174&group_id=191583&atid=937964
reported by john doe (johndoe64@SF)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1048 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 9f94438a78 model/DomainHandler.php:
- replace $domain with $this->username in add()
- comment cleanup


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1047 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 39fde20ccc vacation.pl:
- skip mails with a List-Unsubscribe header - that's another indication
  for a mailinglist


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1046 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz e61bffe776 scripts/shells/domain.php:
- add handling of domain-level quotas


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1045 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 19bf885fa9 model/DomainHandler.php:
- allow editing and viewing of "quota" (domain-level quota) field.
  Otherwise the CLI can't set it ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1044 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 562f1ac5b8 model/DomainHandler.php:
- get default domain quota from $CONF
- remove unused from "quota" field - it's used now ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1043 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
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
14 years ago
Christian Boltz 091d15e58f *.lang: Preparations for domain level quotas
- added $PALANG['pAdminList_domain_quota'] and
  $PALANG['pAdminEdit_domain_quota']
- mark $PALANG['pAdminList_domain_maxquota'] as obsolete

en.lang:
- added TODO for text change to pAdminCreate_domain_maxquota and
  pAdminEdit_domain_maxquota

These changed are based on the patch from W. Rossmann (W. Rossmann@SF),
https://sourceforge.net/tracker/index.php?func=detail&aid=2974928&group_id=191583&atid=937966


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1041 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 3e2b6c506f language-update.sh:
- new parameter --obsolete to mark a text as obsolete


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1040 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 1e71b525c4 css/default.css:
- merge width and margin to a single rule instead of spreading it all around the CSS

This is a small part from the patch from W. Rossmann (W. Rossmann@SF),
https://sourceforge.net/tracker/?func=detail&aid=2974928&group_id=191583&atid=937966
with some adoptions to SVN trunk


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1039 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 721ee60e8d DomainHandler.php:
- convert domain name to lowercase

This is a follow-up to
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3287965&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1038 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz d94b4a6a95 create-domain.php:
- force domain name to lowercase to avoid problems with PgSQL foreign keys

Reported by Munroe Sollog (roe1234@SF),
https://sourceforge.net/tracker/?func=detail&aid=3287965&group_id=191583&atid=937964
after some bughunting on #postfixadmin



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1037 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz a6cc2a2947 Changed delete.php to use flash_error(), removed some HTML from languages/*
delete.php: 
- replace various $tMessage=... with flash_error()
- always redirect to the relevant page, even if an error happened
- fix error check in delete admin
- removed HTML formatting (<b>, <span>) from some error messages
- replaced check for pgsql + BEGIN/COMMIT/ROLLBACK with db_begin(),
  db_commit() and db_rollback()
- the smarty message.tpl is most probably superfluous

languages/*.lang:
- removed HTML (<span>) from messages used by delete.php

fetchmail.php, scripts/snippets/baseclass.php
- remove superfluous </span>


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1036 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz f503ba1098 functions.inc.php,
- db_delete(): if no row was deleted, return 0 (not true)
  This should not affect any existing code, but makes more sense
  for future usage.
- whitespace changes in db_delete()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1035 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 736074ec12 list-virtual.php: use create_page_browser().
This will speed up pagebrowser creation by about 300 times.

This fixes 
https://sourceforge.net/tracker/?func=detail&aid=2967410&group_id=191583&atid=937964

It also brings back the pagebrowser in search mode and therefore fixes
https://sourceforge.net/tracker/?func=detail&aid=2782818&group_id=191583&atid=937964

Detailed changes:
- create separate query parts for pagebrowser creation
  (without SELECT $fieldlist and LIMIT clause)
- create pagebrowser arrays with create_page_browser()
- cNav_bar class: parameter cleanup in constructor: use count() instead of 
  relying on external counting
- change cNav_bar calls accordingly


functions.inc.php:
- remove pagebrowser generation from get_domain_properties()
  (no longer needed, obsoleted by create_page_browser)


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