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

This commit is contained in:
Regis Houssin 2009-10-21 09:42:47 +00:00
parent 8090f62623
commit 8b452fefa8
4 changed files with 8 additions and 8 deletions

View File

@ -200,7 +200,7 @@ foreach($fulltree as $key => $val)
{
$var=false;
//$fullpathparent=eregi_replace('_[^_]+$','',$val['fullpath']);
//$fullpathparent=preg_replace('/_[^_]+$/i','',$val['fullpath']);
// Define showline
$showline=0;
@ -241,7 +241,7 @@ foreach($fulltree as $key => $val)
else $ref=img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/minustop'.$n.'.gif','',1);
if ($option == 'indexexpanded') $lien = '<a href="'.$_SERVER["PHP_SELF"].'?section='.$val['id'].'&amp;type='.$type.'&amp;sectionexpand=false">';
if ($option == 'indexnotexpanded') $lien = '<a href="'.$_SERVER["PHP_SELF"].'?section='.$val['id'].'&amp;type='.$type.'&amp;sectionexpand=true">';
$newref=eregi_replace('_',' ',$ref);
$newref=str_replace('_',' ',$ref);
$lienfin='</a>';
print $lien.$newref.$lienfin;
if (! in_array($val['id'],$expandedsectionarray)) print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);

View File

@ -426,7 +426,7 @@ if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), arr
// Add link to show birthdays
$link='<a href="'.$_SERVER['PHP_SELF'];
$newparam=eregi_replace('showbirthday=[0-1]','showbirthday='.(empty($showbirthday)?1:0),$param);
$newparam=preg_replace('/showbirthday=[0-1]/i','showbirthday='.(empty($showbirthday)?1:0),$param);
if (! eregi('showbirthday=',$newparam)) $newparam.='&showbirthday=1';
if ($_REQUEST['action']) $newparam.='&action='.$_REQUEST['action'];
$link.='?'.$newparam;

View File

@ -162,7 +162,7 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
$obj = $db->fetch_object($resql);
// sendto en RFC2822
$sendto = eregi_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
$sendto = str_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
// Make subtsitutions on topic and body
$other=explode(';',$obj->other);

View File

@ -677,8 +677,8 @@ if ($_POST['action'] == "addline" && $user->rights->propale->creer)
else
{
$pu_ht=$_POST['np_price'];
$tva_tx=eregi_replace('\*','',$_POST['np_tva_tx']);
$tva_npr=eregi('\*',$_POST['np_tva_tx'])?1:0;
$tva_tx=str_replace('*','',$_POST['np_tva_tx']);
$tva_npr=preg_match('/\*/',$_POST['np_tva_tx'])?1:0;
$desc=$_POST['dp_desc'];
$type=$_POST["type"];
}
@ -745,11 +745,11 @@ if ($_POST['action'] == 'updateligne' && $user->rights->propale->creer && $_POST
// Define info_bits
$info_bits=0;
if (eregi('\*',$_POST['tva_tx'])) $info_bits |= 0x01;
if (preg_match('/\*/',$_POST['tva_tx'])) $info_bits |= 0x01;
// Define vat_rate
$vat_rate=$_POST['tva_tx'];
$vat_rate=eregi_replace('\*','',$vat_rate);
$vat_rate=str_replace('*','',$vat_rate);
// On verifie que le prix minimum est respecte
$productid = $_POST['productid'] ;