From 386ca66f88a51b5955e89b5923e000a09526070f Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 3 Mar 2011 20:57:08 +0000 Subject: [PATCH] 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 --- CHANGELOG.TXT | 2 -- functions.inc.php | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.TXT b/CHANGELOG.TXT index 0459b913..52fccdfa 100644 --- a/CHANGELOG.TXT +++ b/CHANGELOG.TXT @@ -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 diff --git a/functions.inc.php b/functions.inc.php index 2662a355..98710d8e 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -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)