mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 00:06:55 +02:00
Attempt fix for processwire/processwire-issues#1459 and processwire/processwire-issues#1297 by rewriting code that builds pages_parents table and requires fewer changes to the table. This is called on page parent changes and clone operations. Needs further testing on installation with 1+ million pages to compare with previous and confirm performance improvement while maintaining same accuracy.
This commit is contained in:
@@ -1280,11 +1280,13 @@ class PagesEditor extends Wire {
|
||||
|
||||
if($options['recursionLevel'] === 0) {
|
||||
// update pages_parents table, only when at recursionLevel 0 since parents()->rebuild() already descends
|
||||
/*
|
||||
if($copy->numChildren) {
|
||||
$copy->setIsNew(true);
|
||||
$this->pages->parents()->rebuild($copy);
|
||||
$copy->setIsNew(false);
|
||||
}
|
||||
*/
|
||||
// update sort
|
||||
if($copy->parent()->sortfield() == 'sort') {
|
||||
$this->sortPage($copy, $copy->sort, true);
|
||||
|
Reference in New Issue
Block a user