SF.net SVN: postfixadmin:[980] branches/postfixadmin-2.3
Brought to you by:
christian_boltz,
gingerdog
From: <chr...@us...> - 2011-03-03 20:57:14
|
Revision: 980 http://postfixadmin.svn.sourceforge.net/postfixadmin/?rev=980&view=rev Author: christian_boltz Date: 2011-03-03 20:57:08 +0000 (Thu, 03 Mar 2011) Log Message: ----------- 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 :-) Modified Paths: -------------- branches/postfixadmin-2.3/CHANGELOG.TXT branches/postfixadmin-2.3/functions.inc.php Modified: branches/postfixadmin-2.3/CHANGELOG.TXT =================================================================== --- branches/postfixadmin-2.3/CHANGELOG.TXT 2011-03-02 22:47:14 UTC (rev 979) +++ branches/postfixadmin-2.3/CHANGELOG.TXT 2011-03-03 20:57:08 UTC (rev 980) @@ -28,8 +28,6 @@ - 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 Modified: branches/postfixadmin-2.3/functions.inc.php =================================================================== --- branches/postfixadmin-2.3/functions.inc.php 2011-03-02 22:47:14 UTC (rev 979) +++ branches/postfixadmin-2.3/functions.inc.php 2011-03-03 20:57:08 UTC (rev 980) @@ -1660,7 +1660,8 @@ // 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) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |