MINOR FIX: backticks converted to quotes

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86501 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Geoff Munn 2009-09-17 00:02:04 +00:00
parent 2de28f7931
commit fa937208f2

View File

@ -88,7 +88,7 @@ in the other stage:<br />
$stageRecord = Versioned::get_one_by_stage( $stageRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Stage', 'Stage',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$orphan->ID $orphan->ID
) )
@ -96,7 +96,7 @@ in the other stage:<br />
$liveRecord = Versioned::get_one_by_stage( $liveRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Live', 'Live',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$orphan->ID $orphan->ID
) )
@ -222,7 +222,7 @@ in the other stage:<br />
$stageRecord = Versioned::get_one_by_stage( $stageRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Stage', 'Stage',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$id $id
) )
@ -236,7 +236,7 @@ in the other stage:<br />
$liveRecord = Versioned::get_one_by_stage( $liveRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Live', 'Live',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$id $id
) )
@ -269,7 +269,7 @@ in the other stage:<br />
$stageRecord = Versioned::get_one_by_stage( $stageRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Stage', 'Stage',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$id $id
) )
@ -287,7 +287,7 @@ in the other stage:<br />
$liveRecord = Versioned::get_one_by_stage( $liveRecord = Versioned::get_one_by_stage(
$this->orphanedSearchClass, $this->orphanedSearchClass,
'Live', 'Live',
sprintf('`%s`.`ID` = %d', sprintf("\"%s\".\"ID\" = %d",
ClassInfo::baseDataClass($this->orphanedSearchClass), ClassInfo::baseDataClass($this->orphanedSearchClass),
$id $id
) )
@ -323,7 +323,7 @@ in the other stage:<br />
*/ */
function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join = null, $limit = null) { function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join = null, $limit = null) {
$filter .= ($filter) ? ' AND ' : ''; $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(); $orphans = new DataObjectSet();
foreach(array('Stage', 'Live') as $stage) { foreach(array('Stage', 'Live') as $stage) {
@ -331,7 +331,7 @@ in the other stage:<br />
$table = $class; $table = $class;
$table .= ($stage == 'Live') ? '_Live' : ''; $table .= ($stage == 'Live') ? '_Live' : '';
$joinByStage .= sprintf( $joinByStage .= sprintf(
'LEFT JOIN `%s` AS `Parents` ON `%s`.`ParentID` = `Parents`.`ID`', "LEFT JOIN \"%s\" AS \"Parents\" ON \"%s\".\"ParentID\" = \"Parents\".\"ID\"",
$table, $table,
$table $table
); );