summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-04 21:30:48 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-04 21:30:48 -0700
commit8559cdb5b6bfa87864941f726521660023779fa7 (patch)
tree4a536ab5d6247c2e7cf28efbe520d7f1206fb992
parentaa40bdd8e058b475c8da8c2c4608aa6ac9da1354 (diff)
Add docs reflecting that we may skip some items that have invalid parent_ids
-rw-r--r--modules/gallery/helpers/gallery_task.php4
1 files changed, 4 insertions, 0 deletions
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: