Commit Graph

  • 6eb7e9f794 PFAHandler.php: - encrypt passwords ("pass" fields) with pacrypt() Christian Boltz 2011-12-20 16:46:08 +00:00
  • ee33647232 setup.php - add rewritten function create_admin() (now using AdminHandler, which means 25 instead of 80 lines) - various follow-up changes to match the rewritten function create_admin() Christian Boltz 2011-12-20 01:06:49 +00:00
  • f6425e025b Delete the now unused files - edit-admin.php - create-admin.php - templates/admin_edit-admin.tpl Christian Boltz 2011-12-20 00:06:11 +00:00
  • 25abbafd20 configs/menu.conf, templates/adminlistadmin.tpl: - use edit.php?table=admin instead of create-admin.php and edit-admin.php Christian Boltz 2011-12-19 23:51:47 +00:00
  • b335abf02e functions.inc.php - db_log(): - allow log actions create_admin and edit_admin - add edit_admin_state and delete_admin as comment/reminder that they should also be logged Christian Boltz 2011-12-19 23:40:34 +00:00
  • 23c08bc02e PFAHandler.php: - store unchecked input values given to set() in $this->RAWvalues before running the validation functions. This is needed to make comparing password and password2 possible. (uppercase RAW intentional to make usage harder - hopefully hard enough to give everybody who wants to use it some time to think over secure programming when working with unchecked input ;-) Christian Boltz 2011-12-19 22:50:12 +00:00
  • c65c2caa7a - added missing files/dirs (smarty, *.js etc.) into the package - simplified the DB credential patch and removing ucf registrations on package purge... Norman Messtorff 2011-12-18 21:30:21 +00:00
  • b5397e595c Again some Debian stuff: - Changed source format to 3.0 (quilt) - Added watchfile Norman Messtorff 2011-12-18 20:41:40 +00:00
  • bf92cc3dc6 Updating Debian-Standards-Version: * debian/rules: added missing build Targets * debian/control: removed VCS field, not longer needed. Norman Messtorff 2011-12-18 19:19:58 +00:00
  • 3a8a738585 PFAHandler.php: - fix field type for skipping password fields (must be 'pass', not 'password') - implement validation of 'pass' fields with validate_password() Christian Boltz 2011-11-29 00:23:55 +00:00
  • 76befc69ff editform.tpl: - implement handling of password fields (type=password, and never fill the value) Christian Boltz 2011-11-28 00:37:41 +00:00
  • 300f096025 AdminHandler.php: - add empty no_domain_field() to disable default die() from PFAHandler - $struct: - changed 'superadmin' to normal bool field (+ TODO note) - changed 'password2' to be an alias of password in SELECT - init 'domains' default with array() and options with list_domains(), - storemore(): - implement storing domains in domain_admins table - implement storing ALL in domain_admins table for superadmins to keep the database backwards-compatible with 2.3.x for now - add read_from_db_postprocess() to convert the domains list to an array Christian Boltz 2011-11-28 00:36:12 +00:00
  • 9104b0652a editform.tpl: - implement handling of 'list' fields (<select> with multiple choices allowed) - also include alternative implementation with checkboxes (commented out) - change {$value_{$key}} to $value_{$key} for 'enum' to stay in sync with 'list' ('list' fails with the additional {...} because it converts the array to the string "Array") (seems to be new behaviour in Smarty 3.1.5 - IIRC 3.0.7 required the additional {...}) Christian Boltz 2011-11-28 00:11:03 +00:00
  • 06c2d414ef smarty.inc.php: some fixes after the Smarty upgrade: - use SmartyBC (Backwards Compatible) instead of Smarty class to keep {php} in templates working (do we really need this?) - remove obsolete allow_php_tag - config_dir default value is now an array Christian Boltz 2011-11-27 23:20:10 +00:00
  • 35d91d4b0c update smarty from 3.0.7 to 3.1.5 Christian Boltz 2011-11-27 23:12:52 +00:00
  • 7773c537cc PFAHandler.php - read_from_db(): - also include column in SELECT if display_in_form != 0 - call read_from_db_postprocess() hook before returning data Christian Boltz 2011-11-27 22:03:34 +00:00
  • 0f0b7d336c PFAHandler: - split code to handle domain_field == "" && admin_username != "" from __construct() to no_domain_field(). Default behaviour stays to die(), but AdminHandler will override it Christian Boltz 2011-11-27 21:29:00 +00:00
  • 3baf1a61c9 functions.inc.php: - db_delete(): allow to specify additional conditions for the WHERE clause Christian Boltz 2011-11-27 21:24:29 +00:00
  • 41d8bcaf0a upgrade.php: - upgrade_1284(): migrate the ALL domain to the superadmin column Note: The ALL domain is not (yet) deleted to stay backwards-compatible for now (will be done in a later upgrade function) Christian Boltz 2011-11-27 21:23:36 +00:00
  • 48f2a0a94b upgrade.php - upgrade_1283(): add a "superadmin" column to the admin table This is the first step to get rid of the "ALL" dummy domain. Christian Boltz 2011-11-27 20:22:31 +00:00
  • 6f9d520262 list-admin.php: - use AdminHandler - move displaying the superadmin flag to the template Christian Boltz 2011-11-26 01:09:38 +00:00
  • 36e31b9e23 AdminHandler.php (new file): - Handler for admins - list mode works - edit mode not implemented yet Christian Boltz 2011-11-26 00:50:44 +00:00
  • e95dffb55a users/edit-alias.php: - remove unused $vacation_domain and $vacation_goto Christian Boltz 2011-11-25 21:55:11 +00:00
  • 24d9d695ad edit.php: - whitespace fixes Christian Boltz 2011-11-14 22:33:34 +00:00
  • dd21f03616 functions.inc.php - db_log(): - add log action 'edit_alias_domain' - update outdated comment to point to $action_list instead of maintaining the list as comment _and_ variable Christian Boltz 2011-11-13 23:11:35 +00:00
  • 50590a5eea configs/menu.conf: - move url_edit_domain to global section to avoid warning - remove unused _txt_list_domain and [main] section Christian Boltz 2011-11-13 23:05:57 +00:00
  • 8f267c1b7f Use edit.php to create/edit domains Christian Boltz 2011-11-13 22:59:21 +00:00
  • 9cf7c7799a Use edit.php to edit/create for alias domains (yes, we get edit mode "for free") Christian Boltz 2011-11-13 22:48:22 +00:00
  • 7ed5f7e471 Several changes to make edit.php a generic edit form Christian Boltz 2011-11-13 22:34:40 +00:00
  • bfd4981433 PFAHandler.php: - fix view() to use associative array key Christian Boltz 2011-11-13 22:15:04 +00:00
  • 0730cdfc6f copy edit-domain.php to edit.php (exact copy, no changes) Christian Boltz 2011-11-13 21:42:32 +00:00
  • 63f20c28da AliasdomainHandler.php - initStruct(): - if only one alias_domain available, filter it out from target_domain list Christian Boltz 2011-11-13 16:19:53 +00:00
  • 3f0e77e6ab editform.tpl: - replace hardcoded $value_transport with {$value_{$key} Christian Boltz 2011-11-13 00:11:45 +00:00
  • 06ffffae7d AliasdomainHandler.php: - set $domain_field to enable permission handling (and to get a list of allowed/available domains) - fill $this->struct['alias_domain']['options'] and $this->struct['target_domain']['options'] with available domains that are not yet used as alias domain - override init() to get "All domains are already aliased" error message out as early as possible (and let init() fail in this case) Christian Boltz 2011-11-12 23:41:17 +00:00
  • 157034d8fe PFAHandler.php: - read_from_db(): use associative array for database content (with $this->id_field as key) Christian Boltz 2011-11-12 23:28:03 +00:00
  • a0e59f82b9 model/DomainHandler.php: - set $domain_field to enable domain permission handling Christian Boltz 2011-11-12 22:01:45 +00:00
  • 68c79b9013 PFAHandler.php: allow restriction to an admin's domain permissions Christian Boltz 2011-11-12 21:46:25 +00:00
  • 410de7229d functions.inc.php - list_domains_for_admin(): - rewrite to work for superadmins also (will list all domains now instead of "ALL"), which means we can drop the admin vs. superadmin check at various places - escape_string $username Christian Boltz 2011-11-12 20:44:35 +00:00
  • a4e2e9101b functions.inc.php: - get_admin_properties(): escape_string $username instead of relying on the calling code to pre-escape it Christian Boltz 2011-11-12 19:48:27 +00:00
  • e21e843c8d templates/create-alias-domain.tpl: - use PALANG.pAdminEdit_domain_active instead of PALANG.pCreate_alias_domain_active Christian Boltz 2011-11-05 18:20:19 +00:00
  • d065179993 create-domain.php, templates/editform.tpl: - move handling of displaying checkboxes to editform.tpl. This means: One switch block less in create-domain.php Christian Boltz 2011-11-04 21:26:25 +00:00
  • 398ce70132 model/AliasdomainHandler.php: - new file - handler class for alias domains - completely working (except delete) - some TODOs included Christian Boltz 2011-11-01 00:00:13 +00:00
  • def9c22fb1 create-domain.php, templates/editform.tpl: - move special handling for enum fields from PHP select_options() to the template using smarty {html_options} Christian Boltz 2011-10-31 21:45:00 +00:00
  • 161c9b1ed2 scripts/shells/domain.php: - AddTask: - use $values[$field] instead of a short variable name for input - hand over $values array to __handle as array instead of dozens of variables - ViewTask: use $struct for printing the output Christian Boltz 2011-10-31 20:57:43 +00:00
  • 4010127bf7 language-update.sh: - delete *.orig files on cleanup Christian Boltz 2011-10-31 20:53:19 +00:00
  • 46a475a75f *.lang: - new text $PALANG['created'] = 'Created'; Christian Boltz 2011-10-31 20:49:23 +00:00
  • 8dda511cd5 scripts/shells/domain.php / AddTask: - read transport options from $handler->getStruct (instead of $handler->getTransports()) - convert selected transport to to transport name directly (instead of using $handler->getTransport) Christian Boltz 2011-10-30 21:25:57 +00:00
  • e4fc3623cc PFAHandler.php: - add/update several comments Christian Boltz 2011-10-30 21:21:39 +00:00
  • ae52f243e5 PFAHandler.php, DomainHandler.php: - move definition of public and protected variables to DomainHandler.php - move lots of functions from DomainHandler.php to PFAHandler.php: - __construct() - init() - set() - store() - read_from_db() - view() - getList() - getStruct() - getId_field() All functions and comments were moved without any modification. See the history of DomainHandler.php if you need to find out something about the history of the functions listed above. Christian Boltz 2011-10-30 20:58:00 +00:00
  • 7a236d401c DomainHandler.php: - rename $this->username to $this->id - rename function validate_id() to validate_new_id() Christian Boltz 2011-10-30 20:39:14 +00:00
  • 7ac37cfbff templates/editform.tpl: - new file - generic edit form template that uses $struct to render the form Christian Boltz 2011-10-30 20:27:08 +00:00
  • 5ba826b067 create-domain.php, templates/admin_edit-domain.tpl: - move some logic to select the correct labels to create-domain.php Christian Boltz 2011-10-30 18:56:11 +00:00
  • 102d4c8c32 DomainHandler.php: - whitespace fixes Christian Boltz 2011-10-29 23:48:18 +00:00
  • eac2564c40 DomainHandler.php: - initStruct(): fix alias_count ("something - NULL" is always NULL, now enforces integer 0 for each JOINt in field with NULL value) - set() now checks if $this->_field_$fieldname exists and calls it as additional validator - split store() into store() (stores $this->values in the database) and storemore() (stores additional things and/or calls scripts) Christian Boltz 2011-10-29 23:44:37 +00:00
  • eba59ffd73 functions.inc.php: - get_domain_properties(): use DomainHandler (function result mostly unchanged, only difference: instead of quota_sum in bytes it now returns total_quota in MB) - allowed_quota(): adopt to slightly changed return value of get_domain_properties() Christian Boltz 2011-10-29 22:58:08 +00:00
  • a03a020095 MailboxHandler.php: - delete(): use escaped $E_domain instead of $domain in some queries Christian Boltz 2011-10-29 22:29:16 +00:00
  • ab050cb340 list-virtual.php: - display everything by default, not only mailboxes Christian Boltz 2011-10-29 22:16:16 +00:00
  • 55cf795c81 ru.lang: - translation update by Pavel Usischev (pusischev@SF), https://sourceforge.net/tracker/?func=detail&aid=3428382&group_id=191583&atid=937966 Christian Boltz 2011-10-25 21:55:28 +00:00
  • a8e626fe7f functions.inc.php: - pacol(): new parameter $dont_write_to_db - needed to skip JOINt in columns which (of course) aren't available on INSERT or UPDATE Christian Boltz 2011-10-25 21:28:55 +00:00
  • 46c7455a12 en.lang: - changed pVacation_result_removed from 'Auto response for %s has been removed!' to '... has been disabled!' Christian Boltz 2011-10-25 19:08:33 +00:00
  • a1dba20aff model/DomainHandler: - read_from_db(): provide a working $colformat['ts'] for postgresql _and_ mysql (the only mysql/pgsql-specific code in DomainHandler, everything else works with both) Christian Boltz 2011-10-24 23:32:45 +00:00
  • 3c880aa0c6 if we are going to write out an sql error message we might as well include the full query David Goodwin 2011-10-24 23:09:08 +00:00
  • 5a18a1e48b postgresql fixes for DomainHandler perhaps David Goodwin 2011-10-24 23:08:46 +00:00
  • ecf7757981 Remove getInstance calls; not needed as we use ::write David Goodwin 2011-10-24 22:25:36 +00:00
  • 25675e9377 use isset to check existance of a variable David Goodwin 2011-10-24 22:25:10 +00:00
  • 89f66053a9 fix undefined var check before login - sessid is not set etc David Goodwin 2011-10-24 22:24:49 +00:00
  • 563e401c92 make Config.php a php5 compatible object; remove strict standards warnings David Goodwin 2011-10-24 22:24:21 +00:00
  • 72441d7dd6 create-domain.php: - assign smarty values only for fields that have the display_in_form flag Christian Boltz 2011-10-24 22:17:43 +00:00
  • 7b15c4b47d functions.inc.php: - pacol(): use Lang::read instead of global $PALANG (which is undefined when called from a *Handler class) Christian Boltz 2011-10-24 22:06:44 +00:00
  • 40dfc881c2 es.lang: - updated translation for pCreate_mailbox_mail Christian Boltz 2011-10-24 00:09:31 +00:00
  • a1fdd87360 MailboxHandler.php: - add comment about forcing $CONF['domain_in_mailbox] = YES if $CONF['domain_path'] == NO. Christian Boltz 2011-10-23 14:09:39 +00:00
  • 3a419a3246 list-domain.php: - use DomainHander->getList() - line count: 126 -> 85 = 41 less :-) - preselect correct username in admin dropdown Christian Boltz 2011-10-22 22:54:48 +00:00
  • 7f9d947e8f model/DomainHandler.php: - use a new SELECT query syntax (sub-SELECTs) that gets all needed information (including alias count, mailbox count and total quota) in one query and is fast as light. Better don't ask how long it took me to write this query, and I seriously hope it works with postgresql. Otherwise...! - add alias_count, mailbox_count and total_quota (including the required SQL magic) to $struct - add support for funny[tm] query tricks in $struct: - replacement for field name in SELECT statement - additional SQL after the FROM xy clause - useful for JOINs - new function getList($condition) to get a list of domains - order SELECT results by $this->id_field (needed for getList) - add comment about the values used in $struct[*][type] Christian Boltz 2011-10-22 22:49:01 +00:00
  • 532712303a model/DomainHandler.php: - split view() into - read_from_db (with param $condition, can also be used with other conditions than "domain = $this->username") - view() - fetches one row (as preparation before implementing a function to list all domains) - read_from_db(): - replace $bool_fields with $colformat['bool'] - now the database results for bool fields are always 0/1 (by using CASE in the query), and have an additional _$field with yes/no - resultset is now an array of rows (instead of a single row) - use db_assoc() instead of db_array() - view(): use read_from_db() - store(): change a comment that confused vim autofolding Christian Boltz 2011-10-22 13:10:44 +00:00
  • 429ef27031 functions.inc.php: - new function db_where_clause($condition, $struct) to create a WHERE clause. bool values are converted with db_get_boolean() based on $struct Christian Boltz 2011-10-22 11:12:03 +00:00
  • 7ed7c67fbe functions.inc.php - smtp_mail(): - error_log() the error message if fsockopen() fails Christian Boltz 2011-10-20 12:13:39 +00:00
  • 2f52a8402d edit-domain.php: - deleted (obsoleted by create-domain.php) Christian Boltz 2011-10-19 21:26:31 +00:00
  • 24836cf3ad Add edit mode to create-domain.php Christian Boltz 2011-10-19 21:09:54 +00:00
  • 7a237c98f4 DomainHandler: - new function getId_field() Christian Boltz 2011-10-19 20:21:43 +00:00
  • c87a0b97f4 DomainHandler.php: - store() can now handle INSERT and UPDATE (depending on $this->new) :-) - store some texts in $this->msg[] (replaced several $this->variable) to make functions easier reuseable - new function initMsg to fill $this->msg[] (can depend on $this->new) - convert values to a DB-understandable format in store(), not in set() (affects only bool for now, another candidate is pacrypt()ing passwords) - check if all fields are set (on new) - unset all not_in_db fields in $db_values in foreach loop Christian Boltz 2011-10-19 17:52:26 +00:00
  • 53d720a569 functions.inc.php: - db_get_boolean(): allow 0 and 1 as parameters, not only boolean true/false Christian Boltz 2011-10-19 15:25:33 +00:00
  • 7fd57740cd create-domain.php: - assign $values to smarty in a foreach loop Christian Boltz 2011-10-18 23:25:14 +00:00
  • 95bf0161c6 Make create-domain.php even shorter (109 -> 89 lines) ;-) Christian Boltz 2011-10-18 22:56:33 +00:00
  • f8fb724dcf model/DomainHandler.php: - split __construct to - __construct($new=0) - init $struct etc. and - init($username) - validate $username This allows reading of $struct before doing any check on the username, and will also avoid problems when I implement a function to list all domains - init(): use direct return values instead of $this->return Christian Boltz 2011-10-18 22:11:22 +00:00
  • 5c5c79e8a9 Make create-domain.php shorter (164 -> 109 lines) ;-) Christian Boltz 2011-10-18 21:15:11 +00:00
  • a11d8c3dda Sometimes short commit messages are the best ones - see the message for create-domain.php... Christian Boltz 2011-10-18 00:00:26 +00:00
  • 1aeae661af DomainHandler.php: - new: public function getStruct() - make store() public explicitely - store domain_postcreation error message in $this->errormsg - use existing error message instead of "invalid domain" Christian Boltz 2011-10-17 23:44:40 +00:00
  • 646c790371 common.php, scripts/postfixadmin-cli.php: - init Lang and Config classes in common.php instead of postfixadmin-cli.php - they need to be available in the web interface also Christian Boltz 2011-10-17 23:37:52 +00:00
  • 4611b111e3 common.php: - merge with scripts/common.php - don't start/use session in CLI mode - don't load smarty.inc.php in CLI mode - hardcode language to 'en' in CLI mode (was done in postfixadmin-cli.php before) Christian Boltz 2011-10-17 23:19:57 +00:00
  • 7bcd041d45 scripts/shells/*.php: - use strtolower()/strtoupper() instead of low()/up() shortnames. This makes the code slightly longer, but easier to understand because strtolower()/strtoupper() are well-known function names Christian Boltz 2011-10-17 23:15:10 +00:00
  • 1a4bd35e08 Move the classes "Config" and "Lang" to scripts/common.php to model/ Christian Boltz 2011-10-17 21:47:58 +00:00
  • 23e6dee1b2 shells/domain.php: - *Task / __handle(): check $handler->result after calling "new" - AddTask / __handle(): - don't set domain in $values - it's already included in the "new" call - hardcode "active" to 1 - before, it accidently got the value of "aliases" - use $handler->set() and $handler->store instead of $handler->add() Christian Boltz 2011-10-16 23:41:38 +00:00
  • 78d15b084d DomainHandler.php: - split add() function to - set() (validate values) and - store() (write to database) - set(): - replace $checked with $this->values - store validation summary in $this->values_valid Christian Boltz 2011-10-16 23:37:11 +00:00
  • 8ed7747a81 DomainHandler.php: - view(): - auto-generate field list based on $this->struct - use date_format() for timestamp fields in the sql query - convert bool fields to integer 0/1 (postgresql uses t/f internally) to make the result database independent - enable "display in list" for "created" column to avoid error in CLI view domain Christian Boltz 2011-10-16 22:32:22 +00:00
  • da21a4cae2 functions.inc.php: - new function db_boolean_to_int() to convert boolean values from the database to integer (0 or 1) - db_get_boolean(): error out on unknown $CONF[database_type] Christian Boltz 2011-10-16 22:19:55 +00:00
  • bf2d5e0f4b DomainHandler.php: - validate $username (domain name in this case) in __construct (using the new function validate_id) - make initStruct protected (was private) - additional parameter for view() to supress error messages Christian Boltz 2011-10-16 21:41:27 +00:00
  • e88a7afdc2 *.lang: - new error message: $PALANG['domain_does_not_exist'] = 'This domain does not exist!'; Christian Boltz 2011-10-16 21:17:20 +00:00
  • 7a9a993083 PFAHandler, AliasHandler: - move result() from AliasHandler to PFAHandler - AliasHandler now extends PFAHandler Christian Boltz 2011-10-16 20:31:46 +00:00
  • 14c5433faf DomainHandler: - use ' instead of " for $struct keys - whitespace changes Christian Boltz 2011-10-16 19:33:31 +00:00
  • 1e601ce4d4 DomainHandler.php: various fixes, implemented some TODOs Christian Boltz 2011-10-16 18:50:33 +00:00