Fix: functions "ereg", "ereg_replace", "eregi", "eregi_replace" is deprecated since php 5.3.0

This commit is contained in:
Regis Houssin
2009-10-23 19:03:01 +00:00
parent ced0248111
commit a33a015eb4
26 changed files with 70 additions and 70 deletions

View File

@@ -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);
}
}