Commit Graph

194 Commits (63fd0345326ddb8f4ff11255d4a1fd65f1696d1a)
 

Author SHA1 Message Date
Christian Boltz 63fd034532 - removed forgotten debugging code
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@194 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin e2b0f09692 search.php: remove dead code, fix for pgsql
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@193 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
David Goodwin 87c97df788 list-virtual.php: fix logic for display of vacation stuff
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@191 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 69dce35307 list-virtual.php: remove unnecessary todo
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@190 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 0f357e7c97 list-virtual.php: fix unnecessary clause for psql query, that is not needed
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@189 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin ade09f577c debian: adding - initial support for creating .debs; run dpkg-buildpakcage -rfakeroot within the trunk dir
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@188 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5bf5f470a3 edit-vacation.php:
- changed redirect targets to list-virtual.php


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@187 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 61713c260b OOps. Removed forgotten debugging code again.
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@186 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 06537afdbd - fix: password was always changed when editing a mailbox.
Thanks to Ryan Wagoner for pointing this out.
- first usage of db_update function ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@185 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5acd24515f functions.php:
- new function db_update ($table, $where, $values, $timestamp = array())
  to update a database entry with the values given as array
- added optional $timestamp parameter to db_insert()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@184 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz ae74e7a70c - list all domains for superadmins (instead of none)
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@183 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 096a5ffbe6 - upgrade_90(): replace spaces with underscore in log.action
(change was caused by translatable logging)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@182 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz c51b27a9c9 merged overview.php into list-domain.php and list-virtual.php
list-domain.php:
- added several admin/superadmin switches and permission checks
- merged GET and POST code
- Note: still different templates for superadmins (admin_list-domain.tpl)
  and admins (overview-get.tpl) because of large layout difference

list-virtual.php:
- added several admin/superadmin switches and permission checks
- added check for admins without any domains (redirects to domain list,
  which can handle this situation)
- migrated FIXME from overview.php 
  -> David, please review the query and remove the FIXME afterwards

overview.php:
- DELETED - no longer needed

overview.tpl:
- RENAMED overview.tpl to list-virtual.tpl
- removed admin/superadmin filename switch
- removed $incpath switch for images

menu.tpl:
- menu for domain admins now has "domain list" and "virtual list"
  instead of "overview"

delete.php, edit-active.php, edit-alias.php, edit-mailbox.php, search.php:
- changed redirect to list-virtual.php

overview-get.tpl:
- changed link to list-virtual.php

main.tpl:
- changed overview link to list-domain.php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@181 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin ef7b6f0925 setup.php: try and make sure the "ALL" domain exists to start with when creating the super admin user; fix html so li elements are closed
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@180 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin f909eb53a2 functions.inc.php: change doc block formatting
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@179 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 7e76c24df3 SUPERADMIN.TXT: updating docs
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@178 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin a6e0e9e9cc SUPERADMIN.TXT: updating docs
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@177 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 1b0ab9c874 DATABASE_PGSQL.TXT: schema typo fix; thanks to http://sourceforge.net/forum/forum.php?thread_id=1843123&forum_id=676076 and jpalmer on irc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@176 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 29e2d63422 - fixed some SQL syntax errors
- debug output now includes the query


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@175 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 16178cab58 - next try to expand $Revision$ in upgrade.php :-/
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@174 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 7b14ea1b73 fetchmail.php:
- cancel button did not work on $new


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@173 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz ce2689dd4f upgrade.php:
- create config table at startup (not nice, but works)
- changed _do_upgrade to use "for ($i = $current_version +1; 
  $i <= $target_version; $i++)" loop and function_exists()
- added support for upgrade_<number>>_mysql() and 
  upgrade_<number>_pgsql() functions for database-specific changes
- added function db_query_parsed(), idea taken from serendipity's 
  include/db/*.php serendipity_db_schema_import()
- added function _drop_index() - MySQL and PgSQL syntax differs too 
  much on this
- added pre-2.1 database updates (DOCUMENTS/TABLE_BACKUP_MX.TXT and
  DOCUMENTS/TABLE_CHANGES.TXT)
- added all database changes between 2.1 and current SVN.
  Everything since the move to sourceforge has the revision number in 
  the function name.

(still several TODOs left)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@172 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz e6e0e37a5c - added function db_insert()
- added optional $ignore_errors parameter to db_query()
- db_query() now returns 'error' as additional key in the result array
- renamed $setup to $ignore_errors in db_connect()
- added fallback to $table_key to table_by_key()


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@171 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin aa919e242d upgrade.php: test edition of a db upgrade script, based loosely around what Drupal uses
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@170 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 81195c56cc DATABASE_MYSQL.TXT: use bigints for quota - as suggested by xpoint on irc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@169 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 1132b958e5 Finally got rid of admin/ :-)
- moved admin-only scripts from admin/ to /
- removed all merged files ("require('../$file')") from admin/
- changed include paths - no more admin/superadmin switching needed
- admin_menu.tpl is also gone
- removed all menu.tpl / admin_menu.tpl switches - no more needed
- admin/index.php still exists and redirects to /



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@168 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz eb7d2d5a9b stylesheet.css
- added styles for CSS-based dropdown menu, based on "Son of Suckerfish"
  http://www.htmldog.com/articles/suckerfish/dropdowns/

menu.tpl
- merged admin_menu.tpl into menu.tpl
- changed menu layout: the "create ..." items are now submenu items

Notes:
- superadmins still see the old menu
- dropdowns don't work in IE yet (requires some JS)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@167 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 39ed97329f - merged admin/delete.php into /delete.php
- the WHERE fieldname is now hardcoded instead of being a $_GET parameter
  This fixes a possible security hole in admin/delete.php (only vulnerabe
  when logged in as global-admin)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@166 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin 30e72a6931 ADDITIONS/fetchmail.pl: typo fix for field name - use poll_time, not pool_time - thanks to xpoint on irc who reported this
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@165 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 8fa1a46a2f - replaced tabs with spaces in fetchmail.php and fetchmail.tpl
- whitespace changes only, no other difference


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@164 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 2f25e8bd42 The work of two nights causes a long changelog. Here we go:
fetchmail.php:
- IMPORTANT: fixed typo in database column name. If you have created the
  fetchmail database already, you have to rename the "pool_time" column
  to "poll_time"
- fixed adding of new entries
- don't display status fields (last poll date and result) in edit mode
- validate and quote the GET and POST variables
- show POSTed data again if invalid values were entered (data to display
  in the edit form is passed to fetchmail.tpl in $formvars)
- check results of database operations and display error/success
  messages
- check owner of target mailbox on all operations
- changed password handling: empty means no change (instead of sending
  "******" around)
- reworked and moved around large code portions
- added some TODO notes

fetchmail.tpl:
- use data from $formvars in edit mode instead of parsing the full array
- moved "new entry" below the table
- replaced delete button with delete links
- Note: the boolean fields need testing with PgSQL. Especially test if
  they are displayed as active correctly in list and edit mode!

*.lang:
- added several fetchmail-related strings, more to follow
- added $PALANG['please_keep_this_as_last_entry'] which always has to be
  the last entry in the language files. This solves the problem that
  language-check.sh mixes up the string order when adding strings at the
  end of the language files.
- added vim:ft=php



git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@163 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
David Goodwin c3ae9dd9db functions.inc.php: code cleanups / documentation fixes etc
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@162 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz dc73789c56 - reverted most changes from r151 in fetchmail.tpl, especially:
- removed $display_fields array again after understanding how $fm_struct
  in fetchmail.php works
- added workaround for undefined index warnings in $fm_struct (line 47)
  (for whatever reasons, there seem to be both numeric and named keys)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@161 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 1e5b4c31c0 fetchmail.php
- changed editable and display flags of some columns in $fm_struct
  (this array is pretty useful once you understand how to use it ;-)
- completed support for $CONF['fetchmail_extra_options'] = 'NO'
- added several escape_string() calls
- fixed several $_GET/$_POST undefined index warnings
- fixed some MySQL vs. PgSQL issues
- some small fixes

fetchmail.tpl
- changed layout to separate list and edit view
- fixed an undefined index warning
- replaced ID column with edit link


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@160 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 4a35f02765 - new functions safeget, safepost, safeserver
Action: get value from $_GET/$_POST/$_SERVER[$param], otherwise $default
  Call: $param = safeget('param')   # instead of $param = $_GET['param']   - or -
        $param = safeget('param', 'default')
  useful to avoid "undefined index" warnings ;-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@159 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 57589b0442 - updated ru.lang - thanks to Pavel Usischev (pusischev)
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1815063&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@158 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 0615e645c7 - fix a MySQL vs. PgSQL problem (True vs. 1) in vacation.pl
https://sourceforge.net/forum/forum.php?thread_id=1845361&forum_id=676076


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@157 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz faa1de78b1 - language-check.sh: add check for duplicated strings
- remove duplicated strings in bg.lang


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@156 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 60b76320e7 - added language-update.sh
Script to update the language files, with lots of tricky bash code ;-)

  MUST be run everytime you add a string to en.lang.

      ./language-update.sh --patch
  should do the job, unless something goes wrong.

      ./language-update.sh --help
  prints all available options.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@155 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 194ae6842d - included missing strings into every language file (in english, with
a '# XXX' comment for translators). This makes translation easier.
- added vim: comment to all language files
- this obsoletes default.lang - removed


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@154 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 5352a5cd49 - fr.lang translation update by Francois Grange - thanks!
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1811005&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@153 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz de0f81c0b4 - fix: remove spurious comma from goto when removing vacation alias
reported by inle in https://sourceforge.net/forum/message.php?msg_id=4564628


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@152 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz b424d39574 - added fetchmail.php to menu.tpl (only displayed if $CONF['fetchmail'] == 'YES')
- shortened german menu text for fetchmail
- config.inc.php:
  - added $CONF['fetchmail'] and $CONF['fetchmail_extra_options'], including
    a big warning for the latter one.
  - include config.inc.php at the end if it exists. This can make future
    updates easier because you don't have to edit config.inc.php itsself.
    It should also make development easier because you don't need to undo
    local changes before commiting config.inc.php
- fetchmail.tpl:
  - new array display_fields, contains the list of fields to display in the
    table. This also solves most "undefined index" warnings.

Note: editing fetchmail does not honor $CONF['fetchmail_extra_options'] = 'NO' yet.


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@151 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz ba6ae2a311 - vacation.pl: replace DBD::MySQL with DBD::mysql in a comment.
Reported in the forum by jlbrown1:
  https://sourceforge.net/forum/message.php?msg_id=4563099


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@150 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 430643b4dd - another hu.lang translation by Levente Farkas - thanks again!
git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@149 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 31fa1b6001 - updated hu.lang. Thanks to Levente Farkas <lfarkas at lfarkas dot org>
https://sourceforge.net/tracker/?func=detail&atid=937964&aid=1810646&group_id=191583


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@148 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz a48a7909ba - initial version of fetchmail support (by Viktor Gotwig,info AT symateam.de)
(see postfixadmin-devel mailinglist for detailed description and known
  problems, subject "fetchmail support").
  This commit adds fetchmail.pl which was missing in r140


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@147 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz 456fd9a372 - replaced admin creation code with a call to create_admin(),
see commit message of r135 for details


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@146 a1433add-5e2c-0410-b055-b7f2511e0802
17 years ago
Christian Boltz fdf00fe4c4 - added several german translations
- fixed a typo in fr.lang
- removed some no longer used translations from en.lang, cs.lang and es.lang


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