Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
btopro committed Jan 4, 2023
1 parent 9ee37e3 commit 44b734f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions system/backend/php/lib/Operations.php
Original file line number Diff line number Diff line change
Expand Up @@ -611,8 +611,8 @@ public function saveOutline() {
// ensure that parent is valid to rescue orphan items
if ($page->parent != null && !($parentPage = $site->loadNode($page->parent))) {
$page->parent = null;
// rough math, force to bottom of things while still being in old order if lots of things got axed
$page->order = $page->order + 100;
// force to bottom of things while still being in old order if lots of things got axed
$page->order = (int)$page->order + count($site->manifest->items) - 1;
$site->updateNode($page);
}
}
Expand Down Expand Up @@ -1148,8 +1148,8 @@ public function deleteNode() {
// ensure that parent is valid to rescue orphan items
if ($page->parent != null && !($parentPage = $site->loadNode($page->parent))) {
$page->parent = null;
// rough math, force to bottom of things while still being in old order if lots of things got axed
$page->order = $page->order + 100;
// force to bottom of things while still being in old order if lots of things got axed
$page->order = (int)$page->order + count($site->manifest->items) - 1;
$site->updateNode($page);
}
}
Expand Down

0 comments on commit 44b734f

Please sign in to comment.