mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
BUGFIX: Removed use of deprecated join function from RemoveOrphanedPagesTask
This commit is contained in:
parent
5addb0054e
commit
fc400d9971
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user