Commit Graph

91 Commits (98d9d0e525d96788aade59a06b8d20f1dae9491d)

Author SHA1 Message Date
David Goodwin 6f653b1697 fix boolean handling for postgres - see https://sourceforge.net/tracker/?func=detail&aid=2830001&group_id=191583&atid=937964
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@701 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz b23620cd8a templates/search.php, templates/list-virtual.php:
- replaced the remaining ereg_* calls with preg_* calls


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@688 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin dfe10bf036 try and be a bit more intelligent over which domain is selected by default in list-virtual & the menu
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@687 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz de447795da templates/list-virtual.php:
- fix mixed up unlimited vs. disabled
  https://sourceforge.net/tracker/?func=detail&aid=2790969&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@656 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 84a5203fe1 list-domain.php:
- replace get_domain_properties() calls with two SQL queries that fetch
  the domain data and count the number of mailboxes and aliases per domain.
  This change speeds up list-domain extremely on setups with lots of domains,
  mailboxes and aliases. The old code took several minutes on my test data
  (that's about 55000 mailboxes and their aliases), the new code only needs
  some seconds.
- $domain_properties now uses the domain name as index key instead of a
  serial number

templates/admin_list-domain.php:
- replace usage of $list_domains with $domain_properties
- change main loop to use the domain name as $domain_properties array key 
  instead of a serial number

upgrade.php:
- upgrade_655(): add index on domain column in mailbox and alias table.
  This speeds up list-domain from 14s to about 1s on my test data in MySQL
  (the 14s were _after_ the changes in list_domain.php)
- added _add_index() function to hide the database specific details in 
  upgrade functions

This commit should fix the performance problems reported on
http://sourceforge.net/forum/forum.php?thread_id=2343349&forum_id=676076



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@655 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz ab1162ca84 templates/list-virtual.php:
- fixed boolconf() call
  "if (boolconf('used_quotas') == 'YES')" will never match, because 
  boolconf() returns boolean TRUE or FALSE


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@651 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 13aa17f463 templates/search.php:
- fix several "stristr(): Empty delimiter" warnings when empty search field is submitted


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@647 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin 15632ea274 alias editing - ensure template uses correct list of aliases
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@645 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 6bd6c99835 templates/search.php:
- fix displaying of vacation status in search results - was broken for
  a) super admins (wrong nesting of if statements)
  b) mailboxes with vacation switched off (empty and therefore invisible link)

templates/admin_search.php:
- deleted unused file


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@622 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 1bb29c849c templates/users_password.php:
- fix undefined variable $USERID_USERNAME by using $username instead


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@621 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
David Goodwin f335850e8f remove logic from users template
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@578 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 11c39af699 - added/fixed vim: lines to nearly all *.php files (exception: templates/*)
(ts=3 or ts=4 depending on the file content)
- several whitespace fixes
- (no code changes)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@566 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 69034b38c9 see https://sourceforge.net/tracker/index.php?func=detail&aid=2567397&group_id=191583&atid=937966 - correct link to delete alias
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@563 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 8a9b6cb310 templates/list-virtual.php:
- switch to boolconf() to avoid "undefined variable" warning


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@552 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 049a9ecc96 merge patch for dovecot quota viewing - see https://sourceforge.net/tracker/index.php?func=detail&aid=2060309&group_id=191583&atid=937966 - thank you shario; sorry it took so long to merge!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@518 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 826ec87d83 checked=checked is more proper, right?
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@503 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 514d2df060 create-domain.php: try and remove code duplication, expand use of $form_fields (defaults etc); only allow valid transport values through
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@502 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 4df62240fd add table defintion to the delete url - see https://sourceforge.net/forum/forum.php?thread_id=2283853&forum_id=676076
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@494 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
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
16 years ago
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
16 years ago
Christian Boltz 75c5c62ed0 config.inc.php, functions.inc.php, templates/list-virtual.php:
- dropped $CONF['show_custom_count'], it can easily be calculated with
  count($CONF['show_custom_domains']). This fixes part (6) of
  https://sourceforge.net/tracker2/?func=detail&aid=1951926&group_id=191583&atid=937967

config.inc.php:
- added some comments explaining $CONF['show_undeliverable_exceptions'] 
  and $CONF['show_custom_domains']


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@471 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 2d47ca4764 patch from https://sourceforge.net/tracker/index.php?func=detail&aid=2049843&group_id=191583&atid=937964 ; thanks
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@445 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin e7ed314f50 list-virtual.php: fix from https://sourceforge.net/tracker/index.php?func=detail&aid=2050952&group_id=191583&atid=937964
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@443 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 41d5ee4ecb create-alias-domain.php:
- filter available alias and target domains (and print an error message
  if none is available)
- print success message via flash_info, not inside the form and do a
  redirect afterwards. We would have to update the list of domains
  available for aliasing otherwise.
- added vim: settings
 
templates/create-alias-domain.php:
- hide form if no domains are available for aliasing
- move logic of skipping non-available domains to /create-alias-domain.php
- added vim: settings

templates/list-virtual.php:
- show "create alias domain" link (only) if it makes sence (not perfect
  yet, but better than before)
- don't create empty <div> etc. if domain has no mailboxes
- intentionally skipped most whitespace fixes (added a comment instead),
  they would make the patch unreadable

languages/*:
- additional error message for alias domains: 'All domains are already 
  aliased.'


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@422 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 5fa76d73d9 config.inc.php + all files related to alias domains
- added $CONF['alias_domain'] switch to disable alias domains
  (includes lots of whitespace changes in list-virtual.php)

functions.php:
- added some comments to boolconf()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@419 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin b4ae6473d6 templates/edit-vacation.php: unquote ' before display - see https://sourceforge.net/tracker/index.php?func=detail&aid=1995119&group_id=191583&atid=937966 - thanks (again) to Beuc; I presume subject also needs stripslashes on it
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@387 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin fe21fd84e8 templates: add @ signs to make it more obvious what the user should type in when creating aliases/mailboxes; thanks to Kurushiyama on irc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@378 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
Christian Boltz 875a65cba2 menu.php:
- add "create alias domain" to "virtual" menu


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@367 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 370e8fef6c inital merge of lenix's patch for domain aliasing; I think list-virtual.php needs some attention, but I've run out of time right now; upgrade.php has been updated to create the tables correctly (tested on pgsql and mysql); functionality or php scripts not tested yet
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@363 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 601d44bb12 templates/header.php: force UTF8 via Apache/http - as per https://sourceforge.net/tracker/index.php?func=detail&aid=1959206&group_id=191583&atid=937964 and https://sourceforge.net/forum/forum.php?thread_id=2030718&forum_id=676076 - thanks
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@359 a1433add-5e2c-0410-b055-b7f2511e0802
16 years ago
David Goodwin 99ee9f0176 applied patch from lenix - theme support for postfixadmin; see http://sourceforge.net/tracker/index.php?func=detail&aid=1898481&group_id=191583&atid=937966 - thank you
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@299 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 56968abc0c templates/menu.php:
- added JS to enable dropdowns in IE
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1859556&group_id=191583

stylesheet.css:
- dupliated the menu :hover styles as .sfhover for IE


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@281 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz f217f0c1bb Summary: Added language selector to login form
functions.inc.php:
- function check_language
  - new optional parameter $use_post (needed by login.php)
  - check for language cookie
  - check for $_POST['lang']
  - removed substr() call because it made pt-br translation unuseable
- new function language_selector
  - returns a HTML dropdown language selector
- new function safecookie
  - similar to safeget, but for cookies

templates/login.php, templates/users_login.php:
- display language selector dropdown

login.php, users/login.php:
- check for selected language
- set cookie if user selected non-default language

languages/language.php: (NEW FILE)
- list of supported languages
- language names taken from phpMyAdmin login form

common.php:
- include languages/language.php
 


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@280 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 7a914cd66a templates/users_vacation.php:
- whitespace changes to match vim: comment (ts=4)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@276 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 8c6f6fc8ee templates/search.php:
- removed superfluous and buggy superadmin check. Fixes
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1844063&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@266 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin a463f4865a templates/footer.php: change target for version check (does not exist yet)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@260 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 02195254d7 common.php
- define('POSTFIXADMIN', 1)

templates/*.php
- check if POSTFIXADMIN is defined to prevent direct access to the
  template files


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@256 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 9a33ceb628 templates/users_vacation.php: everyone knows a "tab" is 4 spaces..
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@255 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 6fa88019ab try and stop it (the browser) remembering stuff
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@252 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
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
17 years ago
Christian Boltz 8f0b75feda users_edit-alias.tpl:
- fix: mailbox not removed from alias targets
  https://sourceforge.net/tracker/index.php?func=detail&aid=1839063&group_id=191583&atid=937964
- don't list mailbox in "to" field. We have option fields for this
  below the textarea.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@246 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 024fc15d29 menu.tpl:
- make broadcast a submenu of send "Send Email"
  Thanks to Jan Örnstedt (ornstedt @sf) for the suggestion


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@235 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 18cebb5622 fetchmail.php:
- made edit form labels and descriptions translatable. This means that
  $fm_struct no longer holds the labels and descriptions
- fixed HTML error (missing > for </span>
- added some comments to document the main "if" block

fetchmail.tpl:
- changed button order and placement to make <enter> saving the entry
- made save and cancel buttons translatable
  Thanks to Johan for the reminder
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1830326&group_id=191583
- made edit form labels and descriptions translatable. This also means
  reworking of some list(...) = $fm_struct[$row] sections

*.lang:
- added translations for "Save" and "Cancel" buttons
- added translations for edit form labels and descriptions

de.lang:
- translated fetchmail-related texts


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@220 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz de82d65615 menu.tpl.orig:
- removed superfluous, unused menu.tpl.orig file


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@215 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 29b143bee9 users/password.php
- merged GET and POST code
- make cancel button working
- redirect to main page on success
- displaying success note with flash_info()

templates/users_password.tpl:
- rename cancel button to fCancel to make it work

users/vacation.php
- redirect to main page on success
- displaying success note with flash_info()
- merge GET and POST code


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@213 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5cf48d6cb5 (basically the same as in r200, this time for users/vacation.php)
users/vacation.php
- fix double-encoded special characters if language file contains
  entity-encoded strings by html_entity_decode'ing the string
  (will be encoded in template file later)

users_vacation.tpl:
- encode tSubject with htmlentities() in template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@209 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 3aa9032cd9 list-virtual.tpl
- made '[and x more...]' translatable

*.lang:
- added 'and_x_more'
- added $Id$ keyword
- enabled expansion of $Id$ and $Rev$


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@208 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 32a1e93c9f edit-vacation.php
- fix double-encoded special characters if language file contains
  entity-encoded strings by html_entity_decode'ing the string
  (will be encoded in template file later)

edit-vacation.tpl:
- encode tSubject with htmlentities() in template


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@200 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz c47222ac14 - clear float (no, motd right of the menu doesn't look good ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@198 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin a0833809df list-virtual.tpl: only display vacation stuff if vacation support is enabled
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@192 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago