MINOR Fixed TrackbackURL->isDuplicate() with ANSI compliant SQL (see r106984 and r107129)

This commit is contained in:
Ingo Schommer 2010-06-28 01:10:17 +00:00
parent 3bf8ebc49c
commit d75c402999
1 changed files with 1 additions and 1 deletions

View File

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