Permalink
Browse files

BUGFIX: Removed use of deprecated join function from RemoveOrphanedPa…

…gesTask
  • Loading branch information...
1 parent 5addb00 commit fc400d99711a2b78327fe534d8d9edc6bb683e6e @sminnee sminnee committed Nov 7, 2011
Showing with 2 additions and 7 deletions.
  1. +2 −7 tasks/RemoveOrphanedPagesTask.php
@@ -330,19 +330,14 @@ function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join
$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);
}

0 comments on commit fc400d9

Please sign in to comment.