mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
MINOR Fixed TrackbackURL->isDuplicate() with ANSI compliant SQL (see r106984 and r107129)
This commit is contained in:
parent
3bf8ebc49c
commit
d75c402999
@ -42,7 +42,7 @@ class TrackBackURL extends DataObject {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
function isDuplicate($onPung = false) {
|
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($onPung) $where .= " AND \"Pung\" = 1";
|
||||||
|
|
||||||
if(DataObject::get_one($this->ClassName, $where)) {
|
if(DataObject::get_one($this->ClassName, $where)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user