- cleanup: move some vars to password.php and users/password.php
- drop $pPassword_admin_text - was always empty
password.php, users/password.php:
- init $pPassword_password_text and $pPassword_password_current_text
(previously in variables.inc.php)
templates/password.tpl, templates/users_password.tpl:
- drop $pPassword_admin_text - was always empty
These changes should also fix some undefined variable warnings reported
by makomi on IRC.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1004 a1433add-5e2c-0410-b055-b7f2511e0802
- set_away() killed the existing aliases and replaced them with the vacation
alias instead of adding it. Fixed.
- remove array() from db_update calls for vacation table (introduced by valkum
in r981) - the vacation table has created/modified columns since r945
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@988 a1433add-5e2c-0410-b055-b7f2511e0802
*fixed VacationHandler.php
*changed edit-vacation to us VacationHandler
*added todopoint to upgrade.php
*fixed problem in AliasHandler
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@981 a1433add-5e2c-0410-b055-b7f2511e0802
+ implementation of fetchmail with this class.
Note that those files were last edited on Aug 14 2008, so they probably
contain some outdated stuff ;-) Nevertheless the baseclass implementation
and the comments it contains are still useful IMHO.
Feedback welcome ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@979 a1433add-5e2c-0410-b055-b7f2511e0802
easy-to-edit field lists. With lots of inspiration from fetchmail.php
and a base class I started 2.5 years ago.
model/DomainHandler.php
- base on PFAHandler (see below)
- new protected variables
- $id_field (column that contains $username)
- $struct (field list)
- $defaults (default values, option lists)
- $new (switch between new and edit mode)
- change $username to protected (preparation for move to PFAHandler)
- add optional $new parameter to __construct. Targets (not yet implemented):
- early validation of $username (domain name in this case)
- if $new == 1, check that item does NOT exist and is a valid domain
- else: check if item exists. error out if not.
- new function initStruct to fill $id_field, $struct, $defaults
- add():
- use an array as parameter instead of single parameters
Advantage: this makes it easy to add another field
- use _inp_* base validation
- create default aliases only in create mode, not in edit mode
- view(): fix error message
- added various TODO notes. Some affect design questions - feedback welcome ;-)
scripts/shells/domain.php:
- change $handler->add call to array usage
- add some TODO notes
- some whitespace fixes in execute()
model/PFAHandler.php:
- new base class for *Handler classes
- contains only some generic input validation for now
- more code will be moved from DomainHandler to PFAHandler later
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@978 a1433add-5e2c-0410-b055-b7f2511e0802
- set $this->template->allow_php_tag = true instead of editing
smarty/libs/Smarty.class.php after every smarty upgrade
added smarty/smarty_version with:
- a note about the current smarty version
- a note about additional files not part of the smarty package
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@973 a1433add-5e2c-0410-b055-b7f2511e0802
(will be detected by authentication_get_username() instead)
scripts/postfixadmin-cli.php:
- define ("POSTFIXADMIN_CLI", 1) (we have no session running and need a
way to tell authentication_get_username() that this is a CLI access)
functions.inc.php:
- authentication_get_username(): check for POSTFIXADMIN_CLI constant,
return 'CLI' if set
(hmmm, do we need a similar thing for XMLRPC?)
- db_log(): override $username parameter with authentication_get_username()
(removing it from function parameters will be my next big commit)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@965 a1433add-5e2c-0410-b055-b7f2511e0802
- use correct variable name instead of $smarty in __construct()
- everything else in this commit: whitespace changes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@964 a1433add-5e2c-0410-b055-b7f2511e0802
- fix undefined variables (by using $PALANG.* instead)
footer.tpl:
- remove undefined variable because the correct one is already included
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@963 a1433add-5e2c-0410-b055-b7f2511e0802
- implement delete()
Note that this is a dummy function at the moment. It doesn't work,
it just errors out with "not implemented yet" ;-)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@961 a1433add-5e2c-0410-b055-b7f2511e0802
- use $this->username for the domain name (I know the variable name is
confusing, but I'd like to be consistent with the other classes)
- remove $domain parameter in add() and view(), use $this->username instead
- escape domain in view() for select query
- removed unused "global $config" in view()
- remove superfluous created/modified arrays in db_insert calls
- added some TODO notes
- changed db_log to 'CONSOLE' instead of $this-username for consistency
with other classes. Long-term fix is to remove the first parameter of
db_log and let it detect the username automatically.
- various whitespace fixes
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@958 a1433add-5e2c-0410-b055-b7f2511e0802
- move initialisation of $smarty->template_dir, compile_dir and
config_dir into __construct() of PFASmarty class
- remove usage of /tmp/postfixadmin_templates_c/ to avoid security
risks (symlink attacks etc.)
- remove __set, __get and __call from PFASmarty class to ensure we
have a clearly documented interface to the template layer
- whitespace changes (mostly in select_options())
- added vim: line
See also the discussion about the r949 commit in postfixadmin-devel
for details.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@957 a1433add-5e2c-0410-b055-b7f2511e0802
- MySQL only allows one column with DEFAULT CURRENT_TIMESTAMP per table
-> introduce {DATE} with DEFAULT 2000-01-01 as workaround
-> GingerDog, please check if the PostgreSQL variant of {DATE} is valid
- disable upgrade_727_mysql because
- function number is too small for upgrades from 2.3.x
- MySQL only
- it creates some tables PostfixAdmin doesn't use
- new function upgrade_946 to add activefrom/activeuntil fields to the
vacation table (previously done in upgrade_727_mysql)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@946 a1433add-5e2c-0410-b055-b7f2511e0802
- fix _pgsql_field_exists and _mysql_field_exists to work with
non-default table names
- new function _db_field_exists as database-independent wrapper for
_*_field_exists
- new function _db_add_field to add a field to a table
- new function printdebug for debug output (grey text)
- define {DATECURRENT} for timestamp fields (avoids lots of duplication)
-> @GingerDog: please check if the PostgreSQL statement is correct!
- upgrade_945: add a 'modified' column to the vacation table
- various small changes (whitespace, comments, TODO notes etc.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@945 a1433add-5e2c-0410-b055-b7f2511e0802
- added several TODO notes
- use db_insert/db_update/db_delete instead of raw queries
- get_details(): error check first (for better readable code),
whitespace fix
- getVacationAlias: str_replace is enough
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@938 a1433add-5e2c-0410-b055-b7f2511e0802
INSTALL.TXT:
- added a note to read the official PostfixAdmin documentation first,
and that "external" HOWTOs on the web are often outdated or incomplete.
That might sound selfish, but would already have saved several users
some time.
- updated some links
- added link to the wiki
- added hint about config.local.php
- added note about write access for templates_c directory for www-data
UPGRADE.txt
- added note about setup.php?debug=1
- added note about postfix config update (alias domains)
- added note about templates_c permissions
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@937 a1433add-5e2c-0410-b055-b7f2511e0802