Subversion Repositories Applications.projet

Rev

Rev 309 | Rev 389 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 309 Rev 330
Line 17... Line 17...
17
// |                                                                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU General Public                                            |
18
// | You should have received a copy of the GNU General Public                                            |
19
// | License along with this library; if not, write to the Free Software                                  |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: document.class.php,v 1.9 2008-08-25 15:18:10 alexandre_tb Exp $
22
// CVS : $Id: document.class.php,v 1.10 2008-08-26 12:41:10 alexandre_tb Exp $
23
/**
23
/**
24
* Application projet
24
* Application projet
25
*
25
*
26
* La classe document
26
* La classe document
27
*
27
*
Line 29... Line 29...
29
//Auteur original :
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
31
//Autres auteurs :
32
*@author        Aucun
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.9 $
34
*@version       $Revision: 1.10 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
Line 343... Line 343...
343
        }
343
        }
344
        $ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
344
        $ligne = $resultat->fetchRow (DB_FETCHMODE_OBJECT) ;
345
        $chemin_rep_id_nom = array() ;
345
        $chemin_rep_id_nom = array() ;
346
        if ($resultat->numRows()>0) {
346
        if ($resultat->numRows()>0) {
347
    	    if ($ligne->pd_pere == 0) {
347
    	    if ($ligne->pd_pere == 0) {
348
        	    return ; //array ($ligne->pd_pere);
348
        	    return array ($ligne->pd_id);
349
        	}
349
        	}
350
            array_push ($chemin_rep_id_nom, $ligne->pd_pere) ;
350
            array_push ($chemin_rep_id_nom, $ligne->pd_id) ;
351
            $tab = document::getCheminIdRepertoire($ligne->pd_pere, $objetDB) ;
351
            $tab = document::getCheminIdRepertoire($ligne->pd_pere, $objetDB) ;
352
            $chemin_rep_id_nom = array_merge ($tab, $chemin_rep_id_nom) ;
352
            $chemin_rep_id_nom = array_merge ($tab, $chemin_rep_id_nom) ;
353
        }
353
        }
354
        return array_reverse($chemin_rep_id_nom);
354
        return ($chemin_rep_id_nom);
355
    }
355
    }
356
	function getPath( $id_doc)
356
	function getPath( $id_doc)
357
    {
357
    {
358
        if ($id_doc == "") $id_doc = 0;
358
        if ($id_doc == "") $id_doc = 0;
359
        // on commence par rechercher le répertoire père, dans la base de donnée
359
        // on commence par rechercher le répertoire père, dans la base de donnée