# HG changeset patch # User peter # Date 1213816299 0 # Node ID 76a304b484edece3480b0c303774d86998f29804 # Parent e17c8536d71878ca436e8f1c5e84f8e8bde62d5b [feladat @ 289] Bugfix: In postgres an empty string ("") was is not automatically casted to 0. Because of this the use of integer is forced in the $db->quote() function. This fixes ticket:40. diff -r e17c8536d718 -r 76a304b484ed inc/record.inc.php --- a/inc/record.inc.php Thu Jun 12 22:00:46 2008 +0000 +++ b/inc/record.inc.php Wed Jun 18 19:11:39 2008 +0000 @@ -127,7 +127,7 @@ type=".$db->quote($record['type']).", content='" . $record['content'] . "', ttl=".$db->quote($record['ttl']).", - prio=".$db->quote($record['prio']).", + prio=".$db->quote($record['prio'], 'integer').", change_date=".$db->quote(time())." WHERE id=".$db->quote($record['rid']); $result = $db->Query($query); @@ -178,7 +178,7 @@ . $db->quote($type) . "," . $db->quote($content) . "," . $db->quote($ttl) . "," - . $db->quote($prio) . "," + . $db->quote($prio, 'integer') . "," . $db->quote($change) . ")"; $response = $db->query($query); if (PEAR::isError($response)) { @@ -380,7 +380,7 @@ . $db->quote($type) . "," . $db->quote($content) . "," . $db->quote($ttl) . "," - . $db->quote($prio) . "," + . $db->quote($prio, 'integer') . "," . $db->quote($now) . ")"; $response = $db->query($query); if (PEAR::isError($response)) { error($response->getMessage()); return false; }