From fc400d99711a2b78327fe534d8d9edc6bb683e6e Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 8 Nov 2011 11:27:48 +1300 Subject: [PATCH] BUGFIX: Removed use of deprecated join function from RemoveOrphanedPagesTask --- tasks/RemoveOrphanedPagesTask.php | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tasks/RemoveOrphanedPagesTask.php b/tasks/RemoveOrphanedPagesTask.php index b172b3f3..848900bc 100644 --- a/tasks/RemoveOrphanedPagesTask.php +++ b/tasks/RemoveOrphanedPagesTask.php @@ -330,19 +330,14 @@ in the other stage:
$joinByStage = $join; $table = $class; $table .= ($stage == 'Live') ? '_Live' : ''; - $joinByStage .= sprintf( - "LEFT JOIN \"%s\" AS \"Parents\" ON \"%s\".\"ParentID\" = \"Parents\".\"ID\"", - $table, - $table - ); $stageOrphans = Versioned::get_by_stage( $class, $stage, $filter, $sort, - $joinByStage, + null, $limit - ); + )->leftJoin($table, "\"$table\".\"ParentID\" = \"Parents\".\"ID\"", "Parents"); $orphans->merge($stageOrphans); }