Skip to content
This repository
Browse code

BUGFIX: Removed use of deprecated join function from RemoveOrphanedPa…

…gesTask
  • Loading branch information...
commit fc400d99711a2b78327fe534d8d9edc6bb683e6e 1 parent 5addb00
Sam Minnée sminnee authored

Showing 1 changed file with 2 additions and 7 deletions. Show diff stats Hide diff stats

  1. +2 7 tasks/RemoveOrphanedPagesTask.php
9 tasks/RemoveOrphanedPagesTask.php
@@ -330,19 +330,14 @@ function getOrphanedPages($class = 'SiteTree', $filter = '', $sort = null, $join
330 330 $joinByStage = $join;
331 331 $table = $class;
332 332 $table .= ($stage == 'Live') ? '_Live' : '';
333   - $joinByStage .= sprintf(
334   - "LEFT JOIN \"%s\" AS \"Parents\" ON \"%s\".\"ParentID\" = \"Parents\".\"ID\"",
335   - $table,
336   - $table
337   - );
338 333 $stageOrphans = Versioned::get_by_stage(
339 334 $class,
340 335 $stage,
341 336 $filter,
342 337 $sort,
343   - $joinByStage,
  338 + null,
344 339 $limit
345   - );
  340 + )->leftJoin($table, "\"$table\".\"ParentID\" = \"Parents\".\"ID\"", "Parents");
346 341 $orphans->merge($stageOrphans);
347 342 }
348 343

0 comments on commit fc400d9

Please sign in to comment.
Something went wrong with that request. Please try again.