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:51:52 +00:00
parent 8b452fefa8
commit 100607da1a
5 changed files with 12 additions and 12 deletions

View File

@ -389,8 +389,8 @@ if ($_POST['action'] == 'addline' && $user->rights->commande->creer)
else
{
$pu_ht=$_POST['pu'];
$tva_tx=eregi_replace('\*','',$_POST['tva_tx']);
$tva_npr=eregi('\*',$_POST['tva_tx'])?1:0;
$tva_tx=str_replace('*','',$_POST['tva_tx']);
$tva_npr=preg_match('/\*/',$_POST['tva_tx'])?1:0;
$desc=$_POST['dp_desc'];
$type=$_POST["type"];
}
@ -470,11 +470,11 @@ if ($_POST['action'] == 'updateligne' && $user->rights->commande->creer && $_POS
// 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);
// Check parameters
if (empty($_POST['productid']) && $_POST["type"] < 0)

View File

@ -921,8 +921,8 @@ if (($_POST['action'] == 'addline' || $_POST['action'] == 'addline_predef') && $
else
{
$pu_ht=$_POST['pu'];
$tva_tx=eregi_replace('\*','',$_POST['tva_tx']);
$tva_npr=eregi('\*',$_POST['tva_tx'])?1:0;
$tva_tx=str_replace('*','',$_POST['tva_tx']);
$tva_npr=preg_match('/\*/',$_POST['tva_tx'])?1:0;
$desc=$_POST['dp_desc'];
$type=$_POST["type"];
}
@ -1002,11 +1002,11 @@ if ($_POST['action'] == 'updateligne' && $user->rights->facture->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);
// Check parameters
if (empty($_POST['productid']) && $_POST["type"] < 0)

View File

@ -246,7 +246,7 @@ if ($result)
if ($_REQUEST["late"]) $param.='&amp;late='.urlencode($_REQUEST["search_late"]);
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
$urlsource.=eregi_replace('&amp;','&',$param);
$urlsource.=str_replace('&amp;','&',$param);
$titre=($socid?$langs->trans("BillsCustomersUnpaidForCompany",$soc->nom):$langs->trans("BillsCustomersUnpaid"));
if ($option == 'late') $titre.=' ('.$langs->trans("Late").')';

View File

@ -53,7 +53,7 @@ $offset = $limit * $page ;
if (empty($_REQUEST['typeid']))
{
$newfiltre=eregi_replace('filtre=','',$filtre);
$newfiltre=str_replace('filtre=','',$filtre);
$filterarray=explode('-',$newfiltre);
foreach($filterarray as $val)
{

View File

@ -261,8 +261,8 @@ if ($_POST["action"] == 'addligne' && $user->rights->contrat->creer)
{
$pu_ht=$_POST['pu'];
$price_base_type = 'HT';
$tva_tx=eregi_replace('\*','',$_POST['tva_tx']);
$tva_npr=eregi('\*',$_POST['tva_tx'])?1:0;
$tva_tx=str_replace('*','',$_POST['tva_tx']);
$tva_npr=preg_match('/\*/',$_POST['tva_tx'])?1:0;
$desc=$_POST['desc'];
}