MINOR: fixed malformed sql query

This commit is contained in:
Andreas Piening 2010-06-28 00:30:10 +00:00
parent 20ad8dfbbc
commit 3bf8ebc49c
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ class TrackBackURL extends DataObject {
*/
function isDuplicate($onPung = false) {
$where = "\"BlogEntryID\" = {$this->BlogEntryID} AND \"URL\" = '{$this->URL}' AND TrackBackURL.ID <> {$this->ID}";
if($onPung) $where .= " AND Pung IS TRUE";
if($onPung) $where .= " AND \"Pung\" = 1";
if(DataObject::get_one($this->ClassName, $where)) {
return true;