From fa937208f2e1c7b270ceb60fa13b4a0f21c39fac Mon Sep 17 00:00:00 2001 From: Geoff Munn Date: Thu, 17 Sep 2009 00:02:04 +0000 Subject: [PATCH] MINOR FIX: backticks converted to quotes git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86501 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- tasks/RemoveOrphanedPagesTask.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tasks/RemoveOrphanedPagesTask.php b/tasks/RemoveOrphanedPagesTask.php index 12cf93569..952c457e1 100644 --- a/tasks/RemoveOrphanedPagesTask.php +++ b/tasks/RemoveOrphanedPagesTask.php @@ -88,7 +88,7 @@ in the other stage:
$stageRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Stage', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $orphan->ID ) @@ -96,7 +96,7 @@ in the other stage:
$liveRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Live', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $orphan->ID ) @@ -222,7 +222,7 @@ in the other stage:
$stageRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Stage', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $id ) @@ -236,7 +236,7 @@ in the other stage:
$liveRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Live', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $id ) @@ -269,7 +269,7 @@ in the other stage:
$stageRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Stage', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $id ) @@ -287,7 +287,7 @@ in the other stage:
$liveRecord = Versioned::get_one_by_stage( $this->orphanedSearchClass, 'Live', - sprintf('`%s`.`ID` = %d', + sprintf("\"%s\".\"ID\" = %d", ClassInfo::baseDataClass($this->orphanedSearchClass), $id ) @@ -323,7 +323,7 @@ in the other stage:
*/ function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join = null, $limit = null) { $filter .= ($filter) ? ' AND ' : ''; - $filter .= sprintf('`%s`.`ParentID` != 0 AND `Parents`.`ID` IS NULL', $class); + $filter .= sprintf("\"%s\".\"ParentID\" != 0 AND \"Parents\".\"ID\" IS NULL", $class); $orphans = new DataObjectSet(); foreach(array('Stage', 'Live') as $stage) { @@ -331,7 +331,7 @@ in the other stage:
$table = $class; $table .= ($stage == 'Live') ? '_Live' : ''; $joinByStage .= sprintf( - 'LEFT JOIN `%s` AS `Parents` ON `%s`.`ParentID` = `Parents`.`ID`', + "LEFT JOIN \"%s\" AS \"Parents\" ON \"%s\".\"ParentID\" = \"Parents\".\"ID\"", $table, $table );