mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-04 16:12:39 +01:00
Fix: functions "ereg", "ereg_replace", "eregi", "eregi_replace" is deprecated since php 5.3.0
This commit is contained in:
@@ -61,7 +61,7 @@ function is_in_subtree($fulltree,$parentid,$childid)
|
||||
if ($record['id'] == $childid)
|
||||
{
|
||||
//print $record['fullpath'].'_'.' - '.$fullpathparent.'_';
|
||||
if (eregi($fullpathparent.'_',$record['fullpath'].'_'))
|
||||
if (preg_match('/'.$fullpathparent.'_/i',$record['fullpath'].'_'))
|
||||
{
|
||||
//print 'DEL='.$childid;
|
||||
return 1;
|
||||
@@ -150,7 +150,7 @@ function tree_addjs()
|
||||
}
|
||||
|
||||
|
||||
/* cette fonction g<>re le d<>callage des <20>l<EFBFBD>ments
|
||||
/* cette fonction g<>re le d<>callage des <20>l<EFBFBD>ments
|
||||
suivant leur position dans l'arborescence
|
||||
*/
|
||||
function tree_showline($tab,$rang)
|
||||
@@ -219,10 +219,10 @@ function tree_showline($tab,$rang)
|
||||
}
|
||||
|
||||
|
||||
/*fonction r<>cursive d'affichage de l'arbre
|
||||
$tab :tableau des <20>l<EFBFBD>ments
|
||||
$pere :index de l'<27>l<EFBFBD>ment courant
|
||||
$rang :d<>callage de l'<27>l<EFBFBD>ment
|
||||
/*fonction r<>cursive d'affichage de l'arbre
|
||||
$tab :tableau des <20>l<EFBFBD>ments
|
||||
$pere :index de l'<27>l<EFBFBD>ment courant
|
||||
$rang :d<>callage de l'<27>l<EFBFBD>ment
|
||||
*/
|
||||
function tree_recur($tab,$pere,$rang)
|
||||
{
|
||||
@@ -233,15 +233,15 @@ function tree_recur($tab,$pere,$rang)
|
||||
//ballayage du tableau
|
||||
for ($x=0;$x<count($tab);$x++)
|
||||
{
|
||||
//si un <20>l<EFBFBD>ment a pour p<>re : $pere
|
||||
//si un <20>l<EFBFBD>ment a pour p<>re : $pere
|
||||
if ($tab[$x][1]==$pere)
|
||||
{
|
||||
//on l'affiche avec le d<>callage courrant
|
||||
//on l'affiche avec le d<>callage courrant
|
||||
tree_showline($tab[$x],$rang);
|
||||
|
||||
/*et on recherche ses fils
|
||||
en rappelant la fonction recur()
|
||||
(+ incr<63>mentation du d<>callage)*/
|
||||
(+ incr<63>mentation du d<>callage)*/
|
||||
tree_recur($tab,$tab[$x][0],$rang+1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user