Changeset 1818 for plugins/apostrophePlugin/branches/features/css/lib/model/doctrine/PluginaPage.class.php
- Timestamp:
- 07/21/10 16:35:10 (22 months ago)
- Location:
- plugins/apostrophePlugin/branches/features/css
- Files:
-
- 2 modified
-
. (modified) (1 prop)
-
lib/model/doctrine/PluginaPage.class.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
plugins/apostrophePlugin/branches/features/css
- Property svn:mergeinfo changed
-
plugins/apostrophePlugin/branches/features/css/lib/model/doctrine/PluginaPage.class.php
r1681 r1818 400 400 401 401 // Careful, the cache must hold the entire path including the item itself, we lop off the last element 402 // before returning in those cases where it is not wanted. 403 public function getAncestorsInfo($includeSelf = false) 404 { 402 // before returning in those cases where it is not wanted. Note that $livingOnly does NOT change the 'level' 403 // field for each returned ancestor 404 public function getAncestorsInfo($includeSelf = false, $livingOnly = false) 405 { 406 // We cache the results of one simple query that gets the whole lineage, and permute that a little 407 // for the includeSelf and livingOnly cases 405 408 if (!isset($this->ancestorsInfo)) 406 409 { … … 415 418 $ancestorsInfo = $this->ancestorsInfo; 416 419 array_pop($ancestorsInfo); 420 } 421 if ($livingOnly) 422 { 423 $newAncestorsInfo = array(); 424 foreach ($ancestorsInfo as $ancestor) 425 { 426 if (!$ancestor['archived']) 427 { 428 $newAncestorsInfo[] = $ancestor; 429 } 430 } 431 $ancestorsInfo = $newAncestorsInfo; 417 432 } 418 433 return $ancestorsInfo; … … 572 587 // an accordion contro. in the first place 573 588 $ancestors = $this->getAncestorsInfo(); 574 575 589 // Dump ancestors we don't care about 576 590 $found = false; … … 592 606 foreach ($ancestors as $ancestor) 593 607 { 608 if ($livingOnly && ($ancestor['archived'])) 609 { 610 continue; 611 } 594 612 $lineage[] = $ancestor['id']; 595 613 if ($ancestor['level'] == 0)

