To participate you must create an account on apostrophenow.org. If you have already done so, click Login.

Show
Ignore:
Timestamp:
07/21/10 16:35:10 (22 months ago)
Author:
johnnyoffline
Message:

merged the latest changes in the trunk into my branch including any new CSS since revision 1717. The new CSS introduced was moved to the new locations in the split files. I am keeping this feature branch alive ladies and gents :)

Location:
plugins/apostrophePlugin/branches/features/css
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • plugins/apostrophePlugin/branches/features/css

  • plugins/apostrophePlugin/branches/features/css/lib/model/doctrine/PluginaPage.class.php

    r1681 r1818  
    400400 
    401401  // 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 
    405408    if (!isset($this->ancestorsInfo)) 
    406409    { 
     
    415418                        $ancestorsInfo = $this->ancestorsInfo; 
    416419                        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; 
    417432                } 
    418433                return $ancestorsInfo; 
     
    572587    // an accordion contro. in the first place 
    573588    $ancestors = $this->getAncestorsInfo(); 
    574      
    575589    // Dump ancestors we don't care about 
    576590    $found = false; 
     
    592606    foreach ($ancestors as $ancestor) 
    593607    { 
     608      if ($livingOnly && ($ancestor['archived'])) 
     609      { 
     610        continue; 
     611      } 
    594612      $lineage[] = $ancestor['id']; 
    595613      if ($ancestor['level'] == 0)