BUGFIX: Removed use of deprecated join function from RemoveOrphanedPagesTask

This commit is contained in:
Sam Minnee 2011-11-08 11:27:48 +13:00
parent 5addb0054e
commit fc400d9971

View File

@ -330,19 +330,14 @@ in the other stage:<br />
$joinByStage = $join; $joinByStage = $join;
$table = $class; $table = $class;
$table .= ($stage == 'Live') ? '_Live' : ''; $table .= ($stage == 'Live') ? '_Live' : '';
$joinByStage .= sprintf(
"LEFT JOIN \"%s\" AS \"Parents\" ON \"%s\".\"ParentID\" = \"Parents\".\"ID\"",
$table,
$table
);
$stageOrphans = Versioned::get_by_stage( $stageOrphans = Versioned::get_by_stage(
$class, $class,
$stage, $stage,
$filter, $filter,
$sort, $sort,
$joinByStage, null,
$limit $limit
); )->leftJoin($table, "\"$table\".\"ParentID\" = \"Parents\".\"ID\"", "Parents");
$orphans->merge($stageOrphans); $orphans->merge($stageOrphans);
} }