From 8559cdb5b6bfa87864941f726521660023779fa7 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Wed, 4 Aug 2010 21:30:48 -0700 Subject: Add docs reflecting that we may skip some items that have invalid parent_ids --- modules/gallery/helpers/gallery_task.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_task.php b/modules/gallery/helpers/gallery_task.php index abfa9e8f..bf1355b8 100644 --- a/modules/gallery/helpers/gallery_task.php +++ b/modules/gallery/helpers/gallery_task.php @@ -357,6 +357,10 @@ class gallery_task_Core { // We'll do a depth-first tree walk over our hierarchy using only the adjacency data because // we don't trust MPTT here (that might be what we're here to fix!). Avoid avoid using ORM // calls as much as possible since they're expensive. + // + // NOTE: the MPTT check will only traverse items that have valid parents. It's possible that + // we have some tree corruption where there are items with parent ids to non-existent items. + // We should probably do something about that. while ($state != self::FIX_STATE_DONE && microtime(true) - $start < 1.5) { switch ($state) { case self::FIX_STATE_START_MPTT: -- cgit v1.2.3