some changes after using perlcritic.org - in detail:
- removed unused variable $spam
- use ':encoding(UTF-8)' instead of ':utf8' to validate input against
invalid utf8 sequences
- foreach creates its own instance of $item - marking it with "my $item"
- replaced lots of "..." with '...'
BTW: Thanks to the nice guy who recommended perlcritic.org at the
openSUSE conference!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@881 a1433add-5e2c-0410-b055-b7f2511e0802
- fix displaying of 'modified' column for aliases when using postgres
(bugreport mailed by Dominic, neocoretech @SF)
- drop MySQL variant of the alias query, the fixed postgres variant works for
both
- fixed wrong position of $sql_where (search string) - must be outside
the sub-query
- escape search string in page browser - even if it is unlikely that enough
mail adresses contain funny chars to let the pagebrowser appear ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@874 a1433add-5e2c-0410-b055-b7f2511e0802
- store language in session variable
(BTW: storing it only at login instead of calling check_language() on
every page would save some processor cycles ;-)
templates/header.tpl:
- add class="lang-XY" (where XY is the language to the body tag.
This allows language-specific CSS code: .lang-XY table {...}
This commit implements the feature request from J.Kruis (jan-kruis)
https://sourceforge.net/tracker/?func=detail&aid=2903088&group_id=191583&atid=937967
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@872 a1433add-5e2c-0410-b055-b7f2511e0802
- change edit form to XHTML
(and BTW: the whole form is produced by fetchmail_edit_row() and
handed over to smarty in a single variable. Should be converted to
a generic "edit form" smarty template...)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@871 a1433add-5e2c-0410-b055-b7f2511e0802
list-virtual.php. We now have two file less to maintain without loosing
functionality :-)
Only remaining bug: in search mode, no page browser is displayed.
This means that you'll only see the first $CONF['page_size'] search results
*without* the possibility to see the next page of results.
(BTW: search.php simply ignored $CONF['page_size'] ;-)
search.php, templates/search.tpl:
- deleted, RIP ;-)
configs/menu.conf:
- change search form to use list-virtual.php instead of search.php
list-virtual.php:
- added TODO note about the "no page browser in search mode" bug
templates/list-virtual.tpl:
- hand over $search to all tabs
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@869 a1433add-5e2c-0410-b055-b7f2511e0802
- 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
- function upgrade_1_mysql(): change default charset of vacation table to
latin1. Otherwise table creation breaks with MySQL 6.
Fields that need to be utf-8 are changed to utf-8 later anyways.
(Found by mechno on #postfixadmin)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@790 a1433add-5e2c-0410-b055-b7f2511e0802
- fix delete link for alias domains (when on target domain - delete link
must contain the "from" domain)
Reported by roe_ on #postfixadmin, also affects 2.3
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@789 a1433add-5e2c-0410-b055-b7f2511e0802
- add in_array check to avoid that superadmins can enter invalid domains
- the check_owner check is probably obsolete after this change. I left it
in (with a clear message) until I'm 100% sure that it's really unneeded.
- move sticky domain code below error checking - the session should only
include valid domains ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@779 a1433add-5e2c-0410-b055-b7f2511e0802
functions.inc.php:
- added error message if the check_owner query returns more than one result.
This can happen with old databases (pre-2.3) where the domain_admins table
contains "ALL" _and_ a domain for a superadmin - which results in the
superadmin not able to edit mailboxes etc. for this domain.
(Error message not translatable - this is a corner case.)
list-virtual.php:
- add "invalid parameter" error message before redirecting to list-domain
if the user doesn't have permissions for a domain
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@778 a1433add-5e2c-0410-b055-b7f2511e0802