functions.inc.php:

- db_delete(): revert table_by_key() call - otherwise I would have to merge the
  changes from r977 to delete.php which is the only file calling db_delete in
  2.3.x and expects that db_delete does not run table_by_key().
  That's a risk we can avoid because (interesting math follows...)
      buggy db_delete() + buggy delete.php = working code :-)


git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/branches/postfixadmin-2.3@980 a1433add-5e2c-0410-b055-b7f2511e0802
postfixadmin-2.3
Christian Boltz 13 years ago
parent c2071fc7a0
commit 386ca66f88

@ -28,8 +28,6 @@ Version 2.3.3 - 2011/**/** - SVN r*** (postfixadmin-2.3 branch)
- POSTFIX_CONF.txt: fixed filename for quota map
- config.inc.php: removed double $CONF['database_prefix']
- config.inc.php: fixed comments about domain_post* script parameters
- fixed db_delete() to use table_by_key() so that it works with non-default
table names
- updated INSTALL.TXT and UPGRADE.TXT
- sk translation update
- some more minor fixes

@ -1660,7 +1660,8 @@ function db_assoc ($result)
//
function db_delete ($table,$where,$delete)
{
$table = table_by_key($table);
# $table = table_by_key($table); # intentionally disabled to avoid breaking delete.php in 2.3.x
# This makes the behaviour of this function incorrect, but delete.php is the only file in 2.3.x calling db_delete and expects this (wrong) behaviour.
$query = "DELETE FROM $table WHERE " . escape_string($where) . "='" . escape_string($delete) . "'";
$result = db_query ($query);
if ($result['rows'] >= 1)

Loading…
Cancel
Save