Skip to content

Commit

Permalink
BUGFIX: Removed use of deprecated join function from RemoveOrphanedPa…
Browse files Browse the repository at this point in the history
…gesTask
  • Loading branch information
Sam Minnee committed Nov 7, 2011
1 parent 5addb00 commit fc400d9
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions tasks/RemoveOrphanedPagesTask.php
Expand Up @@ -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);
}

Expand Down

0 comments on commit fc400d9

Please sign in to comment.