diff --git a/htdocs/categories/index.php b/htdocs/categories/index.php
index f53bedcbcc0..dda3ff6a2cc 100644
--- a/htdocs/categories/index.php
+++ b/htdocs/categories/index.php
@@ -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 = '';
if ($option == 'indexnotexpanded') $lien = '';
- $newref=eregi_replace('_',' ',$ref);
+ $newref=str_replace('_',' ',$ref);
$lienfin='';
print $lien.$newref.$lienfin;
if (! in_array($val['id'],$expandedsectionarray)) print img_picto('',DOL_URL_ROOT.'/theme/common/treemenu/folder.gif','',1);
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index b93edb86263..c8742ad0872 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -426,7 +426,7 @@ if (! is_array($theme_datacolor)) $theme_datacolor=array(array(120,130,150), arr
// Add link to show birthdays
$link='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);
diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 1945596a615..08ae51d3159 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -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'] ;