Changeset 2937

Show
Ignore:
Timestamp:
07/23/08 16:08:03 (1 month ago)
Author:
alexandrej
Message:

Correction mineure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/project/modules/devel/cms3/heading/classes/headingservices.class.php

    r2936 r2937  
    5353        $path = array (); 
    5454        $public_id = $pPublicId; 
    55         for (;;) { 
    56             $parameters = _daoSp ()->addCondition ('public_id_hei', '=', $public_id) 
     55        do {$parameters = _daoSp ()->addCondition ('public_id_hei', '=', $public_id) 
    5756                                   ->setLimit (0, 1); 
    5857            $results = _dao('heading')->findBy ($parameters); 
     
    6463                break; 
    6564            } 
    66         } 
     65        } while ($results[0]->parent_id_head); 
    6766        return $path; 
    6867    } 
     
    8079        $path  = array (); 
    8180        $id_head = $pId;     
    82             for (;;)
     81            do
    8382                $results = _dao('heading')->get ($id_head); 
    8483                if ($results->parent_id_head !== null) { 
     
    8887                    break; 
    8988                } 
    90             } 
     89            } while ($results->parent_id_head); 
    9190        return $path; 
    9291    }