Commit Graph

960 Commits (b9798456f3d9da592ba0c846478605124080c4dc)
 

Author SHA1 Message Date
Valkum f98dfda9ed added some comments
missed in the previous commit


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@918 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Valkum 02868eb680 Added some TODOs and MARKs
Some lines in the shells are duplicate



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@917 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 9c5084af04 model/UserHandler.php: fix verifying old password in change_pw()
- if you want to verify the old password, you should compare it against 
  the OLD and not the NEW password ;-)
- fix database calls

In other words: changing the password in users/password.php works again ;-)

users/password.php:
- switch from obsolete change_pass() to change_pw()



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@916 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 8e62ef1630 AliasHandler.php proofreading results: various fixes and changes
- pass $username through strtolower()
- get(): error check first for better readability (avoids long if block)
- get(): fixed a forgotten return behaviour change
- get(): renamed $new_list to $filtered_list (self-explaining code)
- update(): migrated to new return behaviour of get()
- update(): use db_update etc.
- some minor changes
- added various TODO notes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@915 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz f6cb87eb6e users/edit-alias.php:
- another fix for fForward_and_store on validation errors


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@914 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz da3ef2e1c0 shells/alias.php:
- changed AliasHandler->get call - it does not need the address as parameter
- adopted to true/false return values
- some minor changes and TODO notes

models-ext/AliasHandler.php
- deleted, replaced with a redirect to ../model/AliasHandler.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@913 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 42573d3e4e model/AliasHandler.php:
changed behaviour of get()

- get() now returns only true (success) / false (failure) instead of
  the alias list
  (result of partly merging in scripts/models-ext/AliasHandler.php)
- new method result() to get the real result (alias targets)
- added TODO on if(sizeof($addresses) == 0) - this should never happen

model/VacationHandler.php:
- updated for new AliasHandler bevaviour

xmlrpc.php:
- updated for new AliasHandler bevaviour
- switched from obsolete change_pass to change_pw method


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@912 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 5381f96426 users/edit-alias.php: prepared for updated AliasHandler, small fixes
- prepared for updated AliasHandler from scripts/
- user could cause an empty alias with a trick (or form manipulation).
  Checking forward_and_store for != YES instead of == NO fixes this.
- don't replace spaces in the middle of an (BTW: invalid) alias target
- preserve user input on validation error
- allowed displaying of multiple error messages
- removed unused $_POST[fVacation] variable
- some whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@911 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 93d80797ea functions.inc.php: last commit missed some changes to db_log():
- sorted $action_list to make it more readable
- cleanup


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@910 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz f963cc33f1 scripts/shells/user.php:
- adopted return value checks to true/false instead of shell-like 0/1
- fixed some messages in interactive mode
- various minor fixes
- added some TODO notes, but didn't do a full proofreading

scripts/models-ext/UserHandler.php:
- deleted, replaced with a redirect to /model/UserHandler.php

scripts/common.php, scripts/shells/shell.php:
- replaced obsolete "... =& new ..." with "... = new ..."


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@909 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 1a0d584bf9 model/UserHandler.php: proofreading, lots of changes and added TODO comments
- change_pass() now returns the return value of change_pw()
- made most variables un-escaped (as expected by db_insert/db_update/
  db_delete). This means they HAVE TO BE ESCAPED when using them in a
  hand-written query. (Error messages also need escaping - the
  backslashes from escape_string wouldn't help there anyways.)
- escaped variables renamed to $E_whatever
- changed all return values to true (success) and false (failure)
  instead of shell-like 0 (success) and 1 (failure)
- removed unused global $config at various places
- removed timestamp columns from db_insert and db_update call where they
  match the default
- added db_log() for some (but not all) failures
- honor $CONF[maildir_name_hook] when creating a mailbox
- splitting a mail address is now done with list(...) = explode(...)
- switched to db_begin(), db_commit(), db_rollback()
- let smtp_mail create the mail header
- added missing db_commit in delete()
- various minor fixes, code cleanup, comments and TODO notes

To sum it up: all code in UserHandler.php that does not have a TODO
attached should be fine :-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@908 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 900615a5ec functions.inc.php: various improvements while working on UserHandler.php
- smtp_mail(): added another (currently optional) parameter.
  It can now be called with subject and body, no need to build the mail
  header in every script that needs to send a mail.
- db_delete() did not use table_by_key. Fixed, backport queued for 
  2.3 branch
- db_insert() now has array(created,modified) as default for timestamp 
  columns so that most calls can be done without that parameter
- db_update() now has array(modified) as default for timestamp column
  so that most calls can be done without that parameter
- new functions db_begin / db_commit / db_rollback - BEGIN / COMMIT / 
  ROLLBACK wrapped in a check for $CONF['database_type'] == "pgsql".
  One more step to get rid of database-specific code in all files.
- db_log(): 
  - migrated to db_insert. This should also fix some missing quoting.
  - sorted $action_list to make it more readable
  - backport queued for 2.3 branch for both changes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@907 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 36bdb2fbd0 postfixadmin-cli:
- don't clear the screen at startup


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@906 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz bf17e00daf templates_c:
- updated svn:ignore - the new smarty version seems to use different filenames


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@905 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 623d992091 functions.inc.php:
- check_domain(): don't trim() the domain - whitespace is an error.
  This catches "foo@ domain.com" that wasn't catched before.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@902 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz f4957b8bb2 edit-alias.php:
some small fixes that came up while integrating the multiple alias
target patch from anexius (r898 [2.3]/r900 [trunk]):

- replace spaces only at the start and end of a line, not in the
  middle of an (BTW: invalid) mail address
- prevent input data loss on validation errors
- allow multiple error messages (separated by <br />)
- removed some obsolete comments


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@901 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz a0fbff5377 create-alias: support multiple alias targets
- support multiple alias targets, patch by anexius@SF,
  http://sourceforge.net/projects/postfixadmin/forums/forum/676076/topic/4004442
  The patch fixes
  https://sourceforge.net/tracker/?func=detail&aid=2706290&group_id=191583&atid=937964

additional small fixes:
- replace spaces only at the start and end of a line, not in the
  middle of an (BTW: invalid) mail address
- allow multiple error messages (separated by <br />)
- prevent input data loss on validation errors




git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@900 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 48af3c856e UserHandler.php: merge in changes from scripts/models-ext/UserHandler.php
- merged in all new functions and changes (by valkum + some bugfixes 
  and notes from me) - for details see r831, r888 and r891 of 
  scripts/models-ext/UserHandler.php
- re-added change_pass() function (was removed/renamed by valkum) for 
  backward compatibility. 
  IMPORTANT: change_pass will only exist temporarily and is deprecated.
  Besides that, the new implementation has different return values etc.
  so existing code might break already.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@896 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 2f259742f5 upgrade.php:
- replaced deprecated split() with explode()
- added SVN $Id header


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@894 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 512c9bfb44 functions.inc.php:
- replaced deprecated split() call with preg_split()
  https://sourceforge.net/tracker/?func=detail&aid=3060495&group_id=191583&atid=937964
- added hint about probably missing php5-* packages in error messages if 
  database functions don't exist



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@892 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz c6425f695d UserHandler.php, DomainHandler.php
- db_insert and db_delete need the default table name as parameter
  ('alias', not $table_alias aka table_by_key('alias') )

DomainHandler.php
- removed now unused $table_domain and $table_alias



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@891 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz d0a3cd62e8 overview-get.tpl:
- removed a space that caused a smarty syntax error


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@890 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz c1d5b7da0e nb.lang:
- translation update by Odd Henriksen (oddhenriksen @SF)
  https://sourceforge.net/tracker/?func=detail&atid=937966&aid=3121434&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@889 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz fb6ed610fa UserHandler.php:
- add some FIXME and TODO notes

UserHandler.php, AliasHandler.php:
- whitespace fixes


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@888 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Sebastian 1ad8eafdff - add missing Smarty plugin
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@887 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Sebastian cc3972a3c5 - Smarty 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@886 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Sebastian 07714cd3c7 git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@885 a1433add-5e2c-0410-b055-b7f2511e0802 14 years ago
Sebastian 6ad87e2b7a - prepare for Smarty Update 2.6 -> 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@884 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Sebastian a057830b84 - make template Smarty >= 3.x compatible. Tested with Smarty 3.0.5
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@883 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz e986ba2daa vacation.pl:
whitespace fixes only:
- remove spaces at the end of the line
- replace some tabs with spaces


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@882 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 70db729373 vacation.pl:
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
14 years ago
David Goodwin 648cf52972 updating with build deps
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@880 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
David Goodwin cc713d8c63 debian/patches/: fix patch which was broken by a previous change to config.inc.php
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@879 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
David Goodwin e6224e47ad fix dpkg-buildpackage command
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@878 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
David Goodwin d257fc53d1 README.txt: added as per cboltzs subtle irc hint
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@877 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 31821dd69b POSTFIX_CONF.TXT:
- fixed filename for quota


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@876 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 3e69b1d0dc vacation.pl:
- drop unneeded backslashes. The first one caused logging of "$email" 
  instead of the variable content, the others are just cosmetical.
  Reported by Johan Meiring (jmeiring)
  https://sourceforge.net/tracker/?func=detail&atid=937964&aid=3086899&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@875 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz e99547a06c list-virtual.php:
- 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
14 years ago
Christian Boltz dc4667a4cb config.inc.php:
- fixed parameter description of $CONF['domain_postcreation_script']
  and $CONF['domain_postdeletion_script']
  reported by Aleksey Chudov (alekseyc)
  https://sourceforge.net/tracker/?func=detail&aid=3075955&group_id=191583&atid=937964


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@873 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz 98c0252a08 common.php:
- 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
14 years ago
Christian Boltz 06d65a32b3 fetchmail.php:
- 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
14 years ago
Christian Boltz d404b8e531 list-virtual.php:
- include $search in pagebrowser navigation links
- replace deprecated split() with explode()
- fix typo - $GLOABLS instead of $GLOBALS


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@870 a1433add-5e2c-0410-b055-b7f2511e0802
14 years ago
Christian Boltz a46d0c5278 Another step in code cleanup: replaced search.php with search mode in
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
14 years ago
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
14 years ago
Sebastian e85c0ab2b4 - fix encoding problem in menu.tpl which prevented adding Mailbox from menu.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@799 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian 852397d285 - small fixes for Smarty 3.0 compatibility
- Postfixadmin now works with Smarty >= 3.0b7

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@798 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian b73839b123 - remove unused motd text files. They are now within the templates directory.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@797 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian 610009cb50 - fix bug that no admins and domains can be edited.
- workaround for filename problem.

git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@796 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Sebastian 39172bcac7 - small change. Needed to get PFA running with Smarty 3.0
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@795 a1433add-5e2c-0410-b055-b7f2511e0802
15 years ago
Christian Boltz 70d09e17ab upgrade.php:
- fix typo in _drop_index and _add_index ($tabe -> $table) that broke 
  changing table names via $CONF


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