Fix: function "split" is deprecated since php 5.3.0

This commit is contained in:
Regis Houssin 2009-10-20 13:14:44 +00:00
parent e11f56a10b
commit 01291c4a7c
74 changed files with 166 additions and 163 deletions

View File

@ -142,12 +142,12 @@ FILE_SKIP_EMPTY_LINES);
private function getLineKey($line){ private function getLineKey($line){
$arraykey = split('=',$line,2); $arraykey = explode('=',$line,2);
return trim( $arraykey[0] ); return trim( $arraykey[0] );
} }
private function getLineValue($line){ private function getLineValue($line){
$arraykey = split('=',$line,2); $arraykey = explode('=',$line,2);
return trim( $arraykey[1] ); return trim( $arraykey[1] );
} }

View File

@ -1944,7 +1944,7 @@ class Adherent extends CommonObject
$info=array(); $info=array();
// Object classes // Object classes
$info["objectclass"]=split(',',$conf->global->LDAP_MEMBER_OBJECT_CLASS); $info["objectclass"]=explode(',',$conf->global->LDAP_MEMBER_OBJECT_CLASS);
// Member // Member
if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname; if ($this->fullname && $conf->global->LDAP_MEMBER_FIELD_FULLNAME) $info[$conf->global->LDAP_MEMBER_FIELD_FULLNAME] = $this->fullname;

View File

@ -241,10 +241,10 @@ $sortorder=$_GET["sortorder"];
*/ */
if ($_POST["actionadd"] || $_POST["actionmodify"]) if ($_POST["actionadd"] || $_POST["actionmodify"])
{ {
$listfield=split(',',$tabfield[$_POST["id"]]); $listfield=explode(',',$tabfield[$_POST["id"]]);
$listfieldinsert=split(',',$tabfieldinsert[$_POST["id"]]); $listfieldinsert=explode(',',$tabfieldinsert[$_POST["id"]]);
$listfieldmodify=split(',',$tabfieldinsert[$_POST["id"]]); $listfieldmodify=explode(',',$tabfieldinsert[$_POST["id"]]);
$listfieldvalue=split(',',$tabfieldvalue[$_POST["id"]]); $listfieldvalue=explode(',',$tabfieldvalue[$_POST["id"]]);
// Check that all fields are filled // Check that all fields are filled
$ok=1; $ok=1;
@ -493,7 +493,7 @@ if ($_GET["id"])
$sql.=$tabsqlsort[$_GET["id"]]; $sql.=$tabsqlsort[$_GET["id"]];
//print $sql; //print $sql;
$fieldlist=split(',',$tabfield[$_GET["id"]]); $fieldlist=explode(',',$tabfield[$_GET["id"]]);
print '<form action="dict.php" method="post">'; print '<form action="dict.php" method="post">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
@ -505,7 +505,7 @@ if ($_GET["id"])
$alabelisused=0; $alabelisused=0;
$var=false; $var=false;
$fieldlist=split(',',$tabfield[$_GET["id"]]); $fieldlist=explode(',',$tabfield[$_GET["id"]]);
// print '<table class="noborder" width="100%">'; // print '<table class="noborder" width="100%">';
// Line for title // Line for title

View File

@ -358,7 +358,7 @@ $familylib=array(
); );
foreach ($orders as $key => $value) foreach ($orders as $key => $value)
{ {
$tab=split('_',$value); $tab=explode('_',$value);
$family=$tab[0]; $numero=$tab[1]; $family=$tab[0]; $numero=$tab[1];
$modName = $filename[$key]; $modName = $filename[$key];

View File

@ -188,7 +188,7 @@ if ($result)
$text=$langs->trans($obj->description); $text=$langs->trans($obj->description);
if (eregi('\((.*)\)',$obj->description,$reg)) if (eregi('\((.*)\)',$obj->description,$reg))
{ {
$val=split(',',$reg[1]); $val=explode(',',$reg[1]);
$text=$langs->trans($val[0], isset($val[1])?$val[1]:'', isset($val[2])?$val[2]:'', isset($val[3])?$val[3]:'', isset($val[4])?$val[4]:''); $text=$langs->trans($val[0], isset($val[1])?$val[1]:'', isset($val[2])?$val[2]:'', isset($val[3])?$val[3]:'', isset($val[4])?$val[4]:'');
} }
print $text; print $text;

View File

@ -170,7 +170,7 @@ $var=True;
// Loop on each trigger // Loop on each trigger
foreach ($orders as $key => $value) foreach ($orders as $key => $value)
{ {
$tab=split('_',$value); $tab=explode('_',$value);
$family=$tab[0]; $numero=$tab[1]; $family=$tab[0]; $numero=$tab[1];
$modName = $modules[$key]; $modName = $modules[$key];

View File

@ -203,16 +203,16 @@ class InfoBox
$result = $this->db->query($sql); $result = $this->db->query($sql);
if ($result) if ($result)
{ {
$colonnes=split('-',$boxorder); $colonnes=explode('-',$boxorder);
foreach ($colonnes as $collist) foreach ($colonnes as $collist)
{ {
$part=split(':',$collist); $part=explode(':',$collist);
$colonne=$part[0]; $colonne=$part[0];
$list=$part[1]; $list=$part[1];
dol_syslog('InfoBox::saveboxorder column='.$colonne.' list='.$list); dol_syslog('InfoBox::saveboxorder column='.$colonne.' list='.$list);
$i=0; $i=0;
$listarray=split(',',$list); $listarray=explode(',',$list);
foreach ($listarray as $id) foreach ($listarray as $id)
{ {
if (is_numeric($id)) if (is_numeric($id))

View File

@ -164,12 +164,12 @@ foreach($fulltree as $key => $val)
// Update expandedsectionarray in session // Update expandedsectionarray in session
$expandedsectionarray=array(); $expandedsectionarray=array();
if (isset($_SESSION['dol_catexpandedsectionarray'.$type])) $expandedsectionarray=split(',',$_SESSION['dol_catexpandedsectionarray'.$type]); if (isset($_SESSION['dol_catexpandedsectionarray'.$type])) $expandedsectionarray=explode(',',$_SESSION['dol_catexpandedsectionarray'.$type]);
if ($section && $_GET['sectionexpand'] == 'true') if ($section && $_GET['sectionexpand'] == 'true')
{ {
// We add all sections that are parent of opened section // We add all sections that are parent of opened section
$pathtosection=split('_',$fullpathselected); $pathtosection=explode('_',$fullpathselected);
foreach($pathtosection as $idcursor) foreach($pathtosection as $idcursor)
{ {
if ($idcursor && ! in_array($idcursor,$expandedsectionarray)) // Not already in array if ($idcursor && ! in_array($idcursor,$expandedsectionarray)) // Not already in array

View File

@ -165,7 +165,7 @@ if ($_POST["action"] == 'sendallconfirmed' && $_POST['confirm'] == 'yes')
$sendto = eregi_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">"; $sendto = eregi_replace(',',' ',$obj->prenom." ".$obj->nom)." <".$obj->email.">";
// Make subtsitutions on topic and body // Make subtsitutions on topic and body
$other=split(';',$obj->other); $other=explode(';',$obj->other);
$other1=$other[0]; $other1=$other[0];
$other2=$other[1]; $other2=$other[1];
$other3=$other[2]; $other3=$other[2];

View File

@ -147,7 +147,7 @@ if ($_GET["account"])
else else
{ {
$bankaccount=new Account($db); $bankaccount=new Account($db);
$listid=split(',',$_GET["account"]); $listid=explode(',',$_GET["account"]);
foreach($listid as $key => $id) foreach($listid as $key => $id)
{ {
$bankaccount->fetch($id); $bankaccount->fetch($id);

View File

@ -757,7 +757,7 @@ if ($account)
else else
{ {
$bankaccount=new Account($db); $bankaccount=new Account($db);
$listid=split(',',$account); $listid=explode(',',$account);
foreach($listid as $key => $id) foreach($listid as $key => $id)
{ {
$bankaccount->fetch($id); $bankaccount->fetch($id);

View File

@ -3659,10 +3659,10 @@ else
if ($socid) $sql.= ' AND s.rowid = '.$socid; if ($socid) $sql.= ' AND s.rowid = '.$socid;
if ($_GET['filtre']) if ($_GET['filtre'])
{ {
$filtrearr = split(',', $_GET['filtre']); $filtrearr = explode(',', $_GET['filtre']);
foreach ($filtrearr as $fil) foreach ($filtrearr as $fil)
{ {
$filt = split(':', $fil); $filt = explode(':', $fil);
$sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]); $sql .= ' AND ' . trim($filt[0]) . ' = ' . trim($filt[1]);
} }
} }
@ -3705,7 +3705,7 @@ else
$sql .= ' GROUP BY f.rowid'; $sql .= ' GROUP BY f.rowid';
$sql .= ' ORDER BY '; $sql .= ' ORDER BY ';
$listfield=split(',',$sortfield); $listfield=explode(',',$sortfield);
foreach ($listfield as $key => $value) foreach ($listfield as $key => $value)
$sql.= $listfield[$key].' '.$sortorder.','; $sql.= $listfield[$key].' '.$sortorder.',';
$sql .= ' f.rowid DESC '; $sql .= ' f.rowid DESC ';

View File

@ -183,10 +183,10 @@ if ($socid) $sql .= " AND s.rowid = ".$socid;
if ($_GET["filtre"]) if ($_GET["filtre"])
{ {
$filtrearr = split(",", $_GET["filtre"]); $filtrearr = explode(",", $_GET["filtre"]);
foreach ($filtrearr as $fil) foreach ($filtrearr as $fil)
{ {
$filt = split(":", $fil); $filt = explode(":", $fil);
$sql .= " AND " . $filt[0] . " = " . $filt[1]; $sql .= " AND " . $filt[0] . " = " . $filt[1];
} }
} }
@ -218,7 +218,7 @@ if (strlen($_POST["sf_ref"]) > 0)
$sql.= " GROUP BY f.facnumber"; $sql.= " GROUP BY f.facnumber";
$sql.= " ORDER BY "; $sql.= " ORDER BY ";
$listfield=split(',',$sortfield); $listfield=explode(',',$sortfield);
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.","; foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
$sql.= " f.facnumber DESC"; $sql.= " f.facnumber DESC";

View File

@ -54,10 +54,10 @@ $offset = $limit * $page ;
if (empty($_REQUEST['typeid'])) if (empty($_REQUEST['typeid']))
{ {
$newfiltre=eregi_replace('filtre=','',$filtre); $newfiltre=eregi_replace('filtre=','',$filtre);
$filterarray=split('-',$newfiltre); $filterarray=explode('-',$newfiltre);
foreach($filterarray as $val) foreach($filterarray as $val)
{ {
$part=split(':',$val); $part=explode(':',$val);
if ($part[0] == 's.fk_type') $typeid=$part[1]; if ($part[0] == 's.fk_type') $typeid=$part[1];
} }
} }

View File

@ -248,7 +248,7 @@ class Contact extends CommonObject
global $conf,$langs; global $conf,$langs;
// Object classes // Object classes
$info["objectclass"]=split(',',$conf->global->LDAP_CONTACT_OBJECT_CLASS); $info["objectclass"]=explode(',',$conf->global->LDAP_CONTACT_OBJECT_CLASS);
// Champs // Champs
if ($this->getFullName($langs) && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->getFullName($langs); if ($this->getFullName($langs) && $conf->global->LDAP_CONTACT_FIELD_FULLNAME) $info[$conf->global->LDAP_CONTACT_FIELD_FULLNAME] = $this->getFullName($langs);

View File

@ -116,7 +116,7 @@ class Conf
// If this is constant for a new tab page activated by a module // If this is constant for a new tab page activated by a module
if (eregi('^MAIN_MODULE_([A-Z_]+)_TABS_',$key) && $value) if (eregi('^MAIN_MODULE_([A-Z_]+)_TABS_',$key) && $value)
{ {
$params=split(':',$value,2); $params=explode(':',$value,2);
$this->tabs_modules[$params[0]][]=$value; $this->tabs_modules[$params[0]][]=$value;
//print 'xxx'.$params[0].'-'.$value; //print 'xxx'.$params[0].'-'.$value;
} }

View File

@ -411,12 +411,12 @@ if (empty($action) || $action == 'file_manager' || eregi('refresh',$action) || $
// Update expandedsectionarray in session // Update expandedsectionarray in session
$expandedsectionarray=array(); $expandedsectionarray=array();
if (isset($_SESSION['dol_ecmexpandedsectionarray'])) $expandedsectionarray=split(',',$_SESSION['dol_ecmexpandedsectionarray']); if (isset($_SESSION['dol_ecmexpandedsectionarray'])) $expandedsectionarray=explode(',',$_SESSION['dol_ecmexpandedsectionarray']);
if ($section && $_GET['sectionexpand'] == 'true') if ($section && $_GET['sectionexpand'] == 'true')
{ {
// We add all sections that are parent of opened section // We add all sections that are parent of opened section
$pathtosection=split('_',$fullpathselected); $pathtosection=explode('_',$fullpathselected);
foreach($pathtosection as $idcursor) foreach($pathtosection as $idcursor)
{ {
if ($idcursor && ! in_array($idcursor,$expandedsectionarray)) // Not already in array if ($idcursor && ! in_array($idcursor,$expandedsectionarray)) // Not already in array

View File

@ -231,7 +231,7 @@ if ($step == 2 && $action == 'select_model')
$result = $objexport->fetch($exportmodelid); $result = $objexport->fetch($exportmodelid);
if ($result > 0) if ($result > 0)
{ {
$fieldsarray=split(',',$objexport->hexa); $fieldsarray=explode(',',$objexport->hexa);
$i=1; $i=1;
foreach($fieldsarray as $val) foreach($fieldsarray as $val)
{ {

View File

@ -92,10 +92,10 @@ if ($user->rights->fournisseur->facture->lire)
if ($_GET["filtre"]) if ($_GET["filtre"])
{ {
$filtrearr = split(",", $_GET["filtre"]); $filtrearr = explode(",", $_GET["filtre"]);
foreach ($filtrearr as $fil) foreach ($filtrearr as $fil)
{ {
$filt = split(":", $fil); $filt = explode(":", $fil);
$sql .= " AND " . $filt[0] . " = " . $filt[1]; $sql .= " AND " . $filt[0] . " = " . $filt[1];
} }
} }
@ -131,7 +131,7 @@ if ($user->rights->fournisseur->facture->lire)
$sql.= " GROUP BY f.facnumber"; $sql.= " GROUP BY f.facnumber";
$sql.= " ORDER BY "; $sql.= " ORDER BY ";
$listfield=split(',',$sortfield); $listfield=explode(',',$sortfield);
foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.","; foreach ($listfield as $key => $value) $sql.=$listfield[$key]." ".$sortorder.",";
$sql.= " f.facnumber DESC"; $sql.= " f.facnumber DESC";

View File

@ -102,10 +102,10 @@ if ($socid)
} }
if ($_GET["filtre"]) if ($_GET["filtre"])
{ {
$filtrearr = split(",", $_GET["filtre"]); $filtrearr = explode(",", $_GET["filtre"]);
foreach ($filtrearr as $fil) foreach ($filtrearr as $fil)
{ {
$filt = split(":", $fil); $filt = explode(":", $fil);
$sql .= " AND " . $filt[0] . " = " . $filt[1]; $sql .= " AND " . $filt[0] . " = " . $filt[1];
} }
} }

View File

@ -395,7 +395,7 @@ else
$i=0; $i=0;
while ($i < $nboflines && $i < 1000) while ($i < $nboflines && $i < 1000)
{ {
$vals=split(' +',utf8_encode($buff[$i]),9); $vals=explode(' +',utf8_encode($buff[$i]),9);
$file=$vals[8]; $file=$vals[8];
if (empty($file)) if (empty($file))

View File

@ -1397,7 +1397,7 @@ class Form
$filterarray=array(); $filterarray=array();
if ($filtertype == 'CRDT') $filterarray=array(0,2); if ($filtertype == 'CRDT') $filterarray=array(0,2);
elseif ($filtertype == 'DBIT') $filterarray=array(1,2); elseif ($filtertype == 'DBIT') $filterarray=array(1,2);
elseif ($filtertype != '' && $filtertype != '-1') $filterarray=split(',',$filtertype); elseif ($filtertype != '' && $filtertype != '-1') $filterarray=explode(',',$filtertype);
$this->load_cache_types_paiements(); $this->load_cache_types_paiements();

View File

@ -47,8 +47,8 @@ class FormAdmin
/** /**
* \brief Retourne la liste déroulante des langues disponibles * \brief Retourne la liste d<EFBFBD>roulante des langues disponibles
* \param selected Langue pré-sélectionnée * \param selected Langue pr<EFBFBD>-s<EFBFBD>lectionn<EFBFBD>e
* \param htmlname Nom de la zone select * \param htmlname Nom de la zone select
* \param showauto Affiche choix auto * \param showauto Affiche choix auto
*/ */
@ -131,7 +131,7 @@ class FormAdmin
$oldprefix=''; $oldprefix='';
foreach ($menuarray as $key => $val) foreach ($menuarray as $key => $val)
{ {
$tab=split('_',$key); $tab=explode('_',$key);
$newprefix=$tab[0]; $newprefix=$tab[0];
if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators if (! empty($conf->browser->firefox) && $newprefix != $oldprefix) // Add separators
{ {
@ -179,7 +179,7 @@ class FormAdmin
$oldprefix=''; $oldprefix='';
foreach ($menuarray as $key => $val) foreach ($menuarray as $key => $val)
{ {
$tab=split('_',$key); $tab=explode('_',$key);
$newprefix=$tab[0]; $newprefix=$tab[0];
print '<option value="'.$key.'"'; print '<option value="'.$key.'"';
if ($key == $selected) if ($key == $selected)

View File

@ -122,9 +122,9 @@ class FormMail
$listofpaths=array(); $listofpaths=array();
$listofnames=array(); $listofnames=array();
$listofmimes=array(); $listofmimes=array();
if (! empty($_SESSION["listofpaths"])) $listofpaths=split(';',$_SESSION["listofpaths"]); if (! empty($_SESSION["listofpaths"])) $listofpaths=explode(';',$_SESSION["listofpaths"]);
if (! empty($_SESSION["listofnames"])) $listofnames=split(';',$_SESSION["listofnames"]); if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
if (! empty($_SESSION["listofmimes"])) $listofmimes=split(';',$_SESSION["listofmimes"]); if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
if (! in_array($file,$listofnames)) if (! in_array($file,$listofnames))
{ {
$listofpaths[]=$path; $listofpaths[]=$path;
@ -146,9 +146,9 @@ class FormMail
$listofpaths=array(); $listofpaths=array();
$listofnames=array(); $listofnames=array();
$listofmimes=array(); $listofmimes=array();
if (! empty($_SESSION["listofpaths"])) $listofpaths=split(';',$_SESSION["listofpaths"]); if (! empty($_SESSION["listofpaths"])) $listofpaths=explode(';',$_SESSION["listofpaths"]);
if (! empty($_SESSION["listofnames"])) $listofnames=split(';',$_SESSION["listofnames"]); if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
if (! empty($_SESSION["listofmimes"])) $listofmimes=split(';',$_SESSION["listofmimes"]); if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
return array('paths'=>$listofpaths, 'names'=>$listofnames, 'mimes'=>$listofmimes); return array('paths'=>$listofpaths, 'names'=>$listofnames, 'mimes'=>$listofmimes);
} }
@ -168,9 +168,9 @@ class FormMail
$listofpaths=array(); $listofpaths=array();
$listofnames=array(); $listofnames=array();
$listofmimes=array(); $listofmimes=array();
if (! empty($_SESSION["listofpaths"])) $listofpaths=split(';',$_SESSION["listofpaths"]); if (! empty($_SESSION["listofpaths"])) $listofpaths=explode(';',$_SESSION["listofpaths"]);
if (! empty($_SESSION["listofnames"])) $listofnames=split(';',$_SESSION["listofnames"]); if (! empty($_SESSION["listofnames"])) $listofnames=explode(';',$_SESSION["listofnames"]);
if (! empty($_SESSION["listofmimes"])) $listofmimes=split(';',$_SESSION["listofmimes"]); if (! empty($_SESSION["listofmimes"])) $listofmimes=explode(';',$_SESSION["listofmimes"]);
$form=new Form($DB); $form=new Form($DB);

View File

@ -2296,7 +2296,7 @@ function _enddoc()
if (eregi("rgb",$attr['style'])){ if (eregi("rgb",$attr['style'])){
//print 'style rgb '.$attr['style'].'<br>'; //print 'style rgb '.$attr['style'].'<br>';
$coul = substr($attr['style'],11,-2); $coul = substr($attr['style'],11,-2);
list($R, $G, $B) = split(', ', $coul); list($R, $G, $B) = explode(', ', $coul);
} }
else if (eregi("#",$attr['style'])){ else if (eregi("#",$attr['style'])){
//print 'style hexa '.$attr['style'].'<br>'; //print 'style hexa '.$attr['style'].'<br>';

View File

@ -483,7 +483,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
$blSocY+=3; $blSocY+=3;
//Adresse Client //Adresse Client
//Gestion des Retours chariots //Gestion des Retours chariots
$Out=split("\n",$outputlangs->convToOutputCharset($this->expediteur->adresse)); $Out=explode("\n",$outputlangs->convToOutputCharset($this->expediteur->adresse));
for ($i=0;$i<count($Out);$i++) { for ($i=0;$i<count($Out);$i++) {
$pdf->SetXY($blExpX,$Yoff+$blSocY); $pdf->SetXY($blExpX,$Yoff+$blSocY);
$pdf->MultiCell($blW,5,$Out[$i], 0, 'L'); $pdf->MultiCell($blW,5,$Out[$i], 0, 'L');

View File

@ -66,7 +66,7 @@ class ExportCsv extends ModeleExports
$this->desc='<b>Comma Separated Value</b> file format (.csv).<br>This is a text file format where fields are separated by separator [ '.$this->separator.' ]. If separator is found inside a field content, field is rounded by round character [ '.$this->enclosure.' ]. Escape character to escape round character is [ '.$this->escape.' ].'; $this->desc='<b>Comma Separated Value</b> file format (.csv).<br>This is a text file format where fields are separated by separator [ '.$this->separator.' ]. If separator is found inside a field content, field is rounded by round character [ '.$this->enclosure.' ]. Escape character to escape round character is [ '.$this->escape.' ].';
$this->extension='csv'; // Extension for generated file by this driver $this->extension='csv'; // Extension for generated file by this driver
$this->picto='mime/other'; // Picto $this->picto='mime/other'; // Picto
$ver=split(' ','$Revision$'); $ver=explode(' ','$Revision$');
$this->version=$ver[2]; // Driver version $this->version=$ver[2]; // Driver version
// If driver use an external library, put its name here // If driver use an external library, put its name here

View File

@ -65,7 +65,7 @@ class ExportExcel extends ModeleExports
$this->desc='<b>Excel</b> file format (.xls)<br>This is native Excel 95 format.'; $this->desc='<b>Excel</b> file format (.xls)<br>This is native Excel 95 format.';
$this->extension='xls'; // Extension for generated file by this driver $this->extension='xls'; // Extension for generated file by this driver
$this->picto='mime/xls'; // Picto $this->picto='mime/xls'; // Picto
$ver=split(' ','$Revision$'); $ver=explode(' ','$Revision$');
$this->version=$ver[2]; // Driver version $this->version=$ver[2]; // Driver version
// If driver use an external library, put its name here // If driver use an external library, put its name here
@ -214,14 +214,14 @@ class ExportExcel extends ModeleExports
if (eregi('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$',$newvalue)) if (eregi('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]$',$newvalue))
{ {
$arrayvalue=split('[\.,]',xl_parse_date($newvalue)); $arrayvalue=preg_split('/[.,]/',xl_parse_date($newvalue));
//print "x".$arrayvalue[0].'.'.strval($arrayvalue[1]).'<br>'; //print "x".$arrayvalue[0].'.'.strval($arrayvalue[1]).'<br>';
$newvalue=strval($arrayvalue[0]).'.'.strval($arrayvalue[1]); // $newvalue=strval(36892.521); directly does not work because . will be convert into , later $newvalue=strval($arrayvalue[0]).'.'.strval($arrayvalue[1]); // $newvalue=strval(36892.521); directly does not work because . will be convert into , later
$this->worksheet->write($this->row, $this->col, $newvalue, $formatdate); $this->worksheet->write($this->row, $this->col, $newvalue, $formatdate);
} }
elseif (eregi('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]$',$newvalue)) elseif (eregi('^[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9]$',$newvalue))
{ {
$arrayvalue=split('[\.,]',xl_parse_date($newvalue)); $arrayvalue=preg_split('/[.,]/',xl_parse_date($newvalue));
//print "x".$arrayvalue[0].'.'.strval($arrayvalue[1]).'<br>'; //print "x".$arrayvalue[0].'.'.strval($arrayvalue[1]).'<br>';
$newvalue=strval($arrayvalue[0]).'.'.strval($arrayvalue[1]); // $newvalue=strval(36892.521); directly does not work because . will be convert into , later $newvalue=strval($arrayvalue[0]).'.'.strval($arrayvalue[1]); // $newvalue=strval(36892.521); directly does not work because . will be convert into , later
$this->worksheet->write($this->row, $this->col, $newvalue, $formatdatehour); $this->worksheet->write($this->row, $this->col, $newvalue, $formatdatehour);

View File

@ -61,7 +61,7 @@ class ExportTsv extends ModeleExports
$this->desc='<b>Tab Separated Value</b> file format (.tsv)<br>This is a text file format where fields are separated by separator [tab].'; $this->desc='<b>Tab Separated Value</b> file format (.tsv)<br>This is a text file format where fields are separated by separator [tab].';
$this->extension='tsv'; // Extension for generated file by this driver $this->extension='tsv'; // Extension for generated file by this driver
$this->picto='mime/other'; // Picto $this->picto='mime/other'; // Picto
$ver=split(' ','$Revision$'); $ver=explode(' ','$Revision$');
$this->version=$ver[2]; // Driver version $this->version=$ver[2]; // Driver version
// If driver use an external library, put its name here // If driver use an external library, put its name here

View File

@ -69,7 +69,7 @@ class ImportCsv extends ModeleImports
$this->desc='<b>Comma Separated Value</b> file format (.csv).<br>This is a text file format where fields are separated by separator [ '.$this->separator.' ]. If separator is found inside a field content, field is rounded by round character [ '.$this->enclosure.' ]. Escape character to escape round character is [ '.$this->escape.' ].'; $this->desc='<b>Comma Separated Value</b> file format (.csv).<br>This is a text file format where fields are separated by separator [ '.$this->separator.' ]. If separator is found inside a field content, field is rounded by round character [ '.$this->enclosure.' ]. Escape character to escape round character is [ '.$this->escape.' ].';
$this->extension='csv'; // Extension for generated file by this driver $this->extension='csv'; // Extension for generated file by this driver
$this->picto='mime/other'; // Picto $this->picto='mime/other'; // Picto
$ver=split(' ','$Revision$'); $ver=explode(' ','$Revision$');
$this->version=$ver[2]; // Driver version $this->version=$ver[2]; // Driver version
// If driver use an external library, put its name here // If driver use an external library, put its name here

View File

@ -136,7 +136,7 @@ class mailing_peche extends MailingTargets
{ {
$cpt++; $cpt++;
$buffer = trim(fgets($handle)); $buffer = trim(fgets($handle));
$tab=split(';',$buffer,4); $tab=explode(';',$buffer,4);
$email=$tab[0]; $email=$tab[0];
$name=$tab[1]; $name=$tab[1];
$firstname=$tab[2]; $firstname=$tab[2];

View File

@ -932,7 +932,7 @@ class soap_transport_http extends nusoap_base {
*/ */
function parseCookie($cookie_str) { function parseCookie($cookie_str) {
$cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
$data = split(';', $cookie_str); $data = explode(';', $cookie_str);
$value_str = $data[0]; $value_str = $data[0];
$cookie_param = 'domain='; $cookie_param = 'domain=';

View File

@ -2924,7 +2924,7 @@ class soap_transport_http extends nusoap_base {
*/ */
function parseCookie($cookie_str) { function parseCookie($cookie_str) {
$cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
$data = split(';', $cookie_str); $data = explode(';', $cookie_str);
$value_str = $data[0]; $value_str = $data[0];
$cookie_param = 'domain='; $cookie_param = 'domain=';

View File

@ -76,7 +76,7 @@ function GetInt4d($data, $pos) {
// http://uk.php.net/manual/en/function.getdate.php // http://uk.php.net/manual/en/function.getdate.php
function gmgetdate($ts = null){ function gmgetdate($ts = null){
$k = array('seconds','minutes','hours','mday','wday','mon','year','yday','weekday','month',0); $k = array('seconds','minutes','hours','mday','wday','mon','year','yday','weekday','month',0);
return(array_comb($k,split(":",gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts)))); return(array_comb($k,explode(":",gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts))));
} }
// Added for PHP4 compatibility // Added for PHP4 compatibility
@ -841,7 +841,7 @@ class Spreadsheet_Excel_Reader {
// Custom pattern can be POSITIVE;NEGATIVE;ZERO // Custom pattern can be POSITIVE;NEGATIVE;ZERO
// The "text" option as 4th parameter is not handled // The "text" option as 4th parameter is not handled
$parts = split(";",$format); $parts = explode(";",$format);
$pattern = $parts[0]; $pattern = $parts[0];
// Negative pattern // Negative pattern
if (count($parts)>2 && $num==0) { if (count($parts)>2 && $num==0) {

View File

@ -663,10 +663,10 @@ function _convertRange2d($range)
// Split the range into 2 cell refs // Split the range into 2 cell refs
if (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\:\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) { if (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\:\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
list($cell1, $cell2) = split(':', $range); list($cell1, $cell2) = explode(':', $range);
} }
elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\.\.\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) { elseif (preg_match('/^\$?([A-Ia-i]?[A-Za-z])\$?(\d+)\.\.\$?([A-Ia-i]?[A-Za-z])\$?(\d+)$/',$range)) {
list($cell1, $cell2) = split('\.\.', $range); list($cell1, $cell2) = explode('\.\.', $range);
} }
else { else {
// TODO: use real error codes // TODO: use real error codes
@ -714,7 +714,7 @@ function _convertRange3d($token)
$class = 2; // as far as I know, this is magick. $class = 2; // as far as I know, this is magick.
// Split the ref at the ! symbol // Split the ref at the ! symbol
list($ext_ref, $range) = split('!', $token); list($ext_ref, $range) = explode('!', $token);
// Convert the external reference part // Convert the external reference part
$ext_ref = $this->_packExtRef($ext_ref); $ext_ref = $this->_packExtRef($ext_ref);
@ -723,7 +723,7 @@ function _convertRange3d($token)
} }
// Split the range into 2 cell refs // Split the range into 2 cell refs
list($cell1, $cell2) = split(':', $range); list($cell1, $cell2) = explode(':', $range);
// Convert the cell references // Convert the cell references
if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $cell1)) if (preg_match('/^(\$)?[A-Ia-i]?[A-Za-z](\$)?(\d+)$/', $cell1))
@ -812,7 +812,7 @@ function _convertRef3d($cell)
$class = 2; // as far as I know, this is magick. $class = 2; // as far as I know, this is magick.
// Split the ref at the ! symbol // Split the ref at the ! symbol
list($ext_ref, $cell) = split('!', $cell); list($ext_ref, $cell) = explode('!', $cell);
// Convert the external reference part // Convert the external reference part
$ext_ref = $this->_packExtRef($ext_ref); $ext_ref = $this->_packExtRef($ext_ref);
@ -853,7 +853,7 @@ function _packExtRef($ext_ref) {
// Check if there is a sheet range eg., Sheet1:Sheet2. // Check if there is a sheet range eg., Sheet1:Sheet2.
if (preg_match("/:/", $ext_ref)) if (preg_match("/:/", $ext_ref))
{ {
list($sheet_name1, $sheet_name2) = split(':', $ext_ref); list($sheet_name1, $sheet_name2) = explode(':', $ext_ref);
$sheet1 = $this->_getSheetIndex($sheet_name1); $sheet1 = $this->_getSheetIndex($sheet_name1);
if ($sheet1 == -1) { if ($sheet1 == -1) {
@ -1469,7 +1469,7 @@ function _func()
} }
else { else {
trigger_error("Sintactic error: coma expected in ". trigger_error("Sintactic error: coma expected in ".
"function $function, {$num_args}º arg", E_USER_ERROR); "function $function, {$num_args}<EFBFBD> arg", E_USER_ERROR);
} }
$result2 = $this->_condition(); $result2 = $this->_condition();
if ($this->isError($result2)) { if ($this->isError($result2)) {

View File

@ -1681,7 +1681,7 @@ function _write_url_external() {
if (isset($sheet)) { if (isset($sheet)) {
$link_type |= 0x08; $link_type |= 0x08;
$sheet_len = pack("V", length($sheet) + 0x01); $sheet_len = pack("V", length($sheet) + 0x01);
$sheet = join("\0", split('', $sheet)); $sheet = join("\0", explode('', $sheet));
$sheet .= "\0\0\0"; $sheet .= "\0\0\0";
} else { } else {
$sheet_len = ''; $sheet_len = '';

View File

@ -404,7 +404,7 @@ class simplemail {
$this->error_log("Socket vers $to"); $this->error_log("Socket vers $to");
// DOLCHANGE LDR: From has to be the raw email address, strip the "name" off // DOLCHANGE LDR: From has to be the raw email address, strip the "name" off
$fromarray=split(' ',$this->hfrom); $fromarray=explode(' ',$this->hfrom);
$from=(empty($fromarray[1])?$fromarray[0]:$fromarray[1]); $from=(empty($fromarray[1])?$fromarray[0]:$fromarray[1]);
$this->SocketSend( "MAIL FROM: ".$from."\r\n", '250'); $this->SocketSend( "MAIL FROM: ".$from."\r\n", '250');
$this->SocketSend( "RCPT TO: <".$to.">\r\n", '250'); $this->SocketSend( "RCPT TO: <".$to.">\r\n", '250');

View File

@ -1433,12 +1433,12 @@ class SMTPs
// Seperate "Real Name" from eMail address // Seperate "Real Name" from eMail address
$_tmpaddr = null; $_tmpaddr = null;
$_tmpaddr = split ( '\<', $_strAddr ); $_tmpaddr = explode ( '<', $_strAddr );
// We have a "Real Name" and eMail address // We have a "Real Name" and eMail address
if ( count ($_tmpaddr) == 2 ) if ( count ($_tmpaddr) == 2 )
{ {
$_tmpHost = split ( '@', $_tmpaddr[1] ); $_tmpHost = explode ( '@', $_tmpaddr[1] );
$_tmpaddr[0] = trim ( $_tmpaddr[0], ' ">' ); $_tmpaddr[0] = trim ( $_tmpaddr[0], ' ">' );
$aryHost[$_tmpHost[1]][$_type][$_tmpHost[0]] = $_tmpaddr[0]; $aryHost[$_tmpHost[1]][$_type][$_tmpHost[0]] = $_tmpaddr[0];
} }
@ -1448,7 +1448,7 @@ class SMTPs
// Strip off the beggining '<' // Strip off the beggining '<'
$_strAddr = str_replace ( '<', '', $_strAddr ); $_strAddr = str_replace ( '<', '', $_strAddr );
$_tmpHost = split ( '@', $_strAddr ); $_tmpHost = explode ( '@', $_strAddr );
$_tmpHost[0] = trim ( $_tmpHost[0] ); $_tmpHost[0] = trim ( $_tmpHost[0] );
$_tmpHost[1] = trim ( $_tmpHost[1] ); $_tmpHost[1] = trim ( $_tmpHost[1] );
@ -2499,6 +2499,9 @@ class SMTPs
/** /**
* $Log$ * $Log$
* Revision 1.9 2009/10/20 13:14:47 hregis
* Fix: function "split" is deprecated since php 5.3.0
*
* Revision 1.8 2009/05/13 19:10:07 eldy * Revision 1.8 2009/05/13 19:10:07 eldy
* New: Can use inline images.Everything seems to work with thunderbird and webmail gmail. New to be tested on other mail browsers. * New: Can use inline images.Everything seems to work with thunderbird and webmail gmail. New to be tested on other mail browsers.
* *

View File

@ -292,7 +292,7 @@ else
$conf->setValues($db); $conf->setValues($db);
// Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE // Current version is $conf->global->MAIN_VERSION_LAST_UPGRADE
// Version to install is DOL_VERSION // Version to install is DOL_VERSION
$dolibarrlastupgradeversionarray=split('[\.-]',$conf->global->MAIN_VERSION_LAST_UPGRADE); $dolibarrlastupgradeversionarray=preg_split('/[.-]/',$conf->global->MAIN_VERSION_LAST_UPGRADE);
$dolibarrversiontoinstallarray=versiondolibarrarray(); $dolibarrversiontoinstallarray=versiondolibarrarray();
} }
@ -358,8 +358,8 @@ else
{ {
if (sizeof($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and a version x.y already available if (sizeof($dolibarrlastupgradeversionarray) >= 2) // If a database access is available and a version x.y already available
{ {
$dolibarrversionfromarray=split('[\.-]',$versionfrom); $dolibarrversionfromarray=preg_split('/[.-]/',$versionfrom);
$dolibarrversiontoarray=split('[\.-]',$versionto); $dolibarrversiontoarray=preg_split('/[.-]/',$versionto);
// Now we check if this is the first qualified choice // Now we check if this is the first qualified choice
if ($allowupgrade && empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0) if ($allowupgrade && empty($foundrecommandedchoice) && versioncompare($dolibarrversiontoarray,$dolibarrlastupgradeversionarray) > 0)
{ {

View File

@ -240,7 +240,7 @@ if ($_POST["action"] == "set")
// Cas special de lignes autorisees pour certaines versions uniquement // Cas special de lignes autorisees pour certaines versions uniquement
if (eregi('^-- V([0-9\.]+)',$buf,$reg)) if (eregi('^-- V([0-9\.]+)',$buf,$reg))
{ {
$versioncommande=split('\.',$reg[1]); $versioncommande=explode('.',$reg[1]);
//print var_dump($versioncommande); //print var_dump($versioncommande);
//print var_dump($versionarray); //print var_dump($versionarray);
if (sizeof($versioncommande) && sizeof($versionarray) if (sizeof($versioncommande) && sizeof($versionarray)
@ -258,7 +258,7 @@ if ($_POST["action"] == "set")
fclose($fp); fclose($fp);
// Si plusieurs requetes, on boucle sur chaque // Si plusieurs requetes, on boucle sur chaque
$listesql=split(';',$buffer); $listesql=explode(';',$buffer);
foreach ($listesql as $req) foreach ($listesql as $req)
{ {
$buffer=trim($req); $buffer=trim($req);
@ -350,7 +350,7 @@ if ($_POST["action"] == "set")
} }
// Si plusieurs requetes, on boucle sur chaque // Si plusieurs requetes, on boucle sur chaque
$listesql=split('<27>',eregi_replace(";';",";'<27>",$buffer)); $listesql=explode('§',preg_replace(";';",";'§",$buffer)); // TODO vérifier expression
foreach ($listesql as $buffer) { foreach ($listesql as $buffer) {
if (trim($buffer)) { if (trim($buffer)) {

View File

@ -40,7 +40,7 @@ $langs->setDefaultLang($setuplang);
$targetversion=DOL_VERSION; // It it's last upgrade $targetversion=DOL_VERSION; // It it's last upgrade
if (isset($_POST["action"]) && eregi('upgrade',$_POST["action"])) // If it's an old upgrade if (isset($_POST["action"]) && eregi('upgrade',$_POST["action"])) // If it's an old upgrade
{ {
$tmp=split('_',$_POST["action"],2); $tmp=explode('_',$_POST["action"],2);
if ($tmp[0]=='upgrade' && ! empty($tmp[1])) $targetversion=$tmp[1]; if ($tmp[0]=='upgrade' && ! empty($tmp[1])) $targetversion=$tmp[1];
} }
@ -228,8 +228,8 @@ if ($_POST["action"] == "set" || eregi('upgrade',$_POST["action"]))
if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) $tagdatabase=true; // We don't know what it was before, so now we consider we are version choosed. if (empty($conf->global->MAIN_VERSION_LAST_UPGRADE)) $tagdatabase=true; // We don't know what it was before, so now we consider we are version choosed.
else else
{ {
$mainversionlastupgradearray=split('[\.-]',$conf->global->MAIN_VERSION_LAST_UPGRADE); $mainversionlastupgradearray=preg_split('/[.-]/',$conf->global->MAIN_VERSION_LAST_UPGRADE);
$targetversionarray=split('[\.-]',$targetversion); $targetversionarray=preg_split('/[.-]/',$targetversion);
if (versioncompare($targetversionarray,$mainversionlastupgradearray) > 0) $tagdatabase=true; if (versioncompare($targetversionarray,$mainversionlastupgradearray) > 0) $tagdatabase=true;
} }

View File

@ -228,7 +228,7 @@ if (! isset($_GET["action"]) || eregi('upgrade',$_GET["action"]))
*/ */
if ($ok) if ($ok)
{ {
$versioncommande=split('\.','4.0'); $versioncommande=explode('.','4.0');
if (sizeof($versioncommande) && sizeof($versionarray) if (sizeof($versioncommande) && sizeof($versionarray)
&& versioncompare($versioncommande,$versionarray) <= 0) // Si mysql >= 4.0 && versioncompare($versioncommande,$versionarray) <= 0) // Si mysql >= 4.0
{ {

View File

@ -248,7 +248,7 @@ class CMailFile
} }
// Add to // Add to
$arrayTo=split(',',$to); $arrayTo=explode(',',$to);
foreach($arrayTo as $val) foreach($arrayTo as $val)
{ {
$mail->recipientlist[] = array( 'mail'=>$this->getValidAddress($val,2), 'nameplusmail' => $this->getValidAddress($val,0,1)); $mail->recipientlist[] = array( 'mail'=>$this->getValidAddress($val,2), 'nameplusmail' => $this->getValidAddress($val,0,1));
@ -257,7 +257,7 @@ class CMailFile
// Add carbon copy // Add carbon copy
if (!empty($addr_cc)) if (!empty($addr_cc))
{ {
$arrayTocc=split(',',$addr_cc); $arrayTocc=explode(',',$addr_cc);
foreach($arrayTocc as $val) foreach($arrayTocc as $val)
{ {
if (!empty($mail->hcc)) $mail->hcc.= ","; if (!empty($mail->hcc)) $mail->hcc.= ",";
@ -268,7 +268,7 @@ class CMailFile
// Add carbon copy cache // Add carbon copy cache
if (!empty($addr_bcc)) if (!empty($addr_bcc))
{ {
$arrayTobcc=split(',',$addr_bcc); $arrayTobcc=explode(',',$addr_bcc);
foreach($arrayTobcc as $val) foreach($arrayTobcc as $val)
{ {
if (!empty($mail->hbcc)) $mail->hbcc.= ","; if (!empty($mail->hbcc)) $mail->hbcc.= ",";
@ -1030,7 +1030,7 @@ class CMailFile
$ret=''; $ret='';
$arrayaddress=split(',',$adresses); $arrayaddress=explode(',',$adresses);
// Boucle sur chaque composant de l'adresse // Boucle sur chaque composant de l'adresse
foreach($arrayaddress as $val) foreach($arrayaddress as $val)

View File

@ -73,7 +73,7 @@ function versioncompare($versionarray1,$versionarray2)
*/ */
function versionphparray() function versionphparray()
{ {
return split('\.',PHP_VERSION); return explode('.',PHP_VERSION);
} }
/** /**
@ -82,7 +82,7 @@ function versionphparray()
*/ */
function versiondolibarrarray() function versiondolibarrarray()
{ {
return split('\.',DOL_VERSION); return explode('.',DOL_VERSION);
} }
@ -116,7 +116,7 @@ function run_sql($sqlfile,$silent=1)
// Cas special de lignes autorisees pour certaines versions uniquement // Cas special de lignes autorisees pour certaines versions uniquement
if (eregi('^-- V([0-9\.]+)',$buf,$reg)) if (eregi('^-- V([0-9\.]+)',$buf,$reg))
{ {
$versioncommande=split('\.',$reg[1]); $versioncommande=explode('.',$reg[1]);
//print var_dump($versioncommande); //print var_dump($versioncommande);
//print var_dump($versionarray); //print var_dump($versionarray);
if (sizeof($versioncommande) && sizeof($versionarray) if (sizeof($versioncommande) && sizeof($versionarray)
@ -475,7 +475,7 @@ function listOfSessions()
eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity
eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name
{ {
$tmp=split('_', $file); $tmp=explode('_', $file);
$idsess=$tmp[1]; $idsess=$tmp[1];
$login = eregi('dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"',$sessValues,$regs); $login = eregi('dol_login\|s:[0-9]+:"([A-Za-z0-9]+)"',$sessValues,$regs);
$arrayofSessions[$idsess]["login"] = $regs[1]; $arrayofSessions[$idsess]["login"] = $regs[1];
@ -520,7 +520,7 @@ function purgeSessions($mysessionid)
eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity eregi('dol_entity\|s:([0-9]+):"('.$conf->entity.')"',$sessValues) && // limit to current entity
eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name eregi('dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"',$sessValues)) // limit to company name
{ {
$tmp=split('_', $file); $tmp=explode('_', $file);
$idsess=$tmp[1]; $idsess=$tmp[1];
// We remove session if it's not ourself // We remove session if it's not ourself
if ($idsess != $mysessionid) if ($idsess != $mysessionid)

View File

@ -129,7 +129,7 @@ function societe_prepare_head($objsoc)
$i=0; $i=0;
foreach ($conf->tabs_modules['thirdparty'] as $value) foreach ($conf->tabs_modules['thirdparty'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$objsoc->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$objsoc->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -214,7 +214,7 @@ class DoliDb
*/ */
function getVersionArray() function getVersionArray()
{ {
return split('\.',$this->getVersion()); return explode('.',$this->getVersion());
} }
@ -442,7 +442,7 @@ class DoliDb
*/ */
function affected_rows($resultset=0) function affected_rows($resultset=0)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilis<EFBFBD> sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
if (! is_resource($resultset)) { $resultset=$this->results; } if (! is_resource($resultset)) { $resultset=$this->results; }
// mssql necessite un link de base pour cette fonction contrairement // mssql necessite un link de base pour cette fonction contrairement
// a pqsql qui prend un resultset // a pqsql qui prend un resultset
@ -453,22 +453,22 @@ class DoliDb
/** /**
\brief Lib<EFBFBD>re le dernier resultset utilis<EFBFBD> sur cette connexion. \brief Libere le dernier resultset utilise sur cette connexion.
\param resultset Curseur de la requete voulue \param resultset Curseur de la requete voulue
*/ */
function free($resultset=0) function free($resultset=0)
{ {
// Si le resultset n'est pas fourni, on prend le dernier utilis<EFBFBD> sur cette connexion // Si le resultset n'est pas fourni, on prend le dernier utilise sur cette connexion
if (! is_resource($resultset)) { $resultset=$this->results; } if (! is_resource($resultset)) { $resultset=$this->results; }
// Si resultset en est un, on libere la m<EFBFBD>moire // Si resultset en est un, on libere la memoire
if (is_resource($resultset)) mssql_free_result($resultset); if (is_resource($resultset)) mssql_free_result($resultset);
} }
/** /**
\brief D<EFBFBD>fini les limites de la requ<EFBFBD>te. \brief Defini les limites de la requete.
\param limit nombre maximum de lignes retourn<EFBFBD>es \param limit nombre maximum de lignes retournees
\param offset num<EFBFBD>ro de la ligne <EFBFBD> partir de laquelle recup<EFBFBD>rer les ligne \param offset numero de la ligne a partir de laquelle recuperer les ligne
\return string chaine exprimant la syntax sql de la limite \return string chaine exprimant la syntax sql de la limite
*/ */
function plimit($limit=0,$offset=0) function plimit($limit=0,$offset=0)
@ -492,7 +492,7 @@ class DoliDb
if ($sortfield) if ($sortfield)
{ {
$return=''; $return='';
$fields=split(',',$sortfield); $fields=explode(',',$sortfield);
foreach($fields as $val) foreach($fields as $val)
{ {
if (! $return) $return.=' ORDER BY '; if (! $return) $return.=' ORDER BY ';

View File

@ -241,7 +241,7 @@ class DoliDb
function getIntVersion() function getIntVersion()
{ {
$version= $this->getVersion(); $version= $this->getVersion();
$vlist=split('[.-]',$version); $vlist=preg_split('/[.-]/',$version);
if (strlen($vlist[1])==1){ if (strlen($vlist[1])==1){
$vlist[1]="0".$vlist[1]; $vlist[1]="0".$vlist[1];
} }
@ -258,7 +258,7 @@ class DoliDb
*/ */
function getVersionArray() function getVersionArray()
{ {
return split('\.',$this->getVersion()); return explode('.',$this->getVersion());
} }
@ -483,7 +483,7 @@ class DoliDb
if ($sortfield) if ($sortfield)
{ {
$return=''; $return='';
$fields=split(',',$sortfield); $fields=explode(',',$sortfield);
foreach($fields as $val) foreach($fields as $val)
{ {
if (! $return) $return.=' ORDER BY '; if (! $return) $return.=' ORDER BY ';

View File

@ -249,7 +249,7 @@ class DoliDb
function getIntVersion() function getIntVersion()
{ {
$version= $this->getVersion(); $version= $this->getVersion();
$vlist=split('[.-]',$version); $vlist=preg_split('/[.-]/',$version);
if (strlen($vlist[1])==1){ if (strlen($vlist[1])==1){
$vlist[1]="0".$vlist[1]; $vlist[1]="0".$vlist[1];
} }
@ -265,7 +265,7 @@ class DoliDb
*/ */
function getVersionArray() function getVersionArray()
{ {
return split('\.',$this->getVersion()); return explode('.',$this->getVersion());
} }
@ -498,7 +498,7 @@ class DoliDb
if ($sortfield) if ($sortfield)
{ {
$return=''; $return='';
$fields=split(',',$sortfield); $fields=explode(',',$sortfield);
foreach($fields as $val) foreach($fields as $val)
{ {
if (! $return) $return.=' ORDER BY '; if (! $return) $return.=' ORDER BY ';

View File

@ -387,7 +387,7 @@ class DoliDb
function getIntVersion() function getIntVersion()
{ {
$version = $this->getVersion(); $version = $this->getVersion();
$vlist = split('[.-]',$version); $vlist = preg_split('/[.-]/',$version);
if (strlen($vlist[1])==1){ if (strlen($vlist[1])==1){
$vlist[1]="0".$vlist[1]; $vlist[1]="0".$vlist[1];
} }
@ -403,7 +403,7 @@ class DoliDb
*/ */
function getVersionArray() function getVersionArray()
{ {
return split('\.',$this->getVersion()); return explode('.',$this->getVersion());
} }
/** /**
@ -617,7 +617,7 @@ class DoliDb
if ($sortfield) if ($sortfield)
{ {
$return=''; $return='';
$fields=split(',',$sortfield); $fields=explode(',',$sortfield);
foreach($fields as $val) foreach($fields as $val)
{ {
if (! $return) $return.=' ORDER BY '; if (! $return) $return.=' ORDER BY ';

View File

@ -76,7 +76,7 @@ function fichinter_prepare_head($fichinter)
$i=0; $i=0;
foreach ($conf->tabs_modules['intervention'] as $value) foreach ($conf->tabs_modules['intervention'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$fichinter->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$fichinter->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -67,7 +67,7 @@ function facturefourn_prepare_head($fac)
$i=0; $i=0;
foreach ($conf->tabs_modules['supplier_invoice'] as $value) foreach ($conf->tabs_modules['supplier_invoice'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$fac->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$fac->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);
@ -132,7 +132,7 @@ function ordersupplier_prepare_head($commande)
$i=0; $i=0;
foreach ($conf->tabs_modules['supplier_order'] as $value) foreach ($conf->tabs_modules['supplier_order'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$commande->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$commande->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -2328,7 +2328,7 @@ function price($amount, $html=0, $outlangs='', $trunc=1, $rounding=2)
//print "amount=".$amount."-"; //print "amount=".$amount."-";
$amount = ereg_replace(',','.',$amount); // should be useless $amount = ereg_replace(',','.',$amount); // should be useless
//print $amount."-"; //print $amount."-";
$datas = split('\.',$amount); $datas = explode('.',$amount);
$decpart = isset($datas[1])?$datas[1]:''; $decpart = isset($datas[1])?$datas[1]:'';
$decpart = eregi_replace('0+$','',$decpart); // Supprime les 0 de fin de partie decimale $decpart = eregi_replace('0+$','',$decpart); // Supprime les 0 de fin de partie decimale
//print "decpart=".$decpart."<br>"; //print "decpart=".$decpart."<br>";
@ -2793,7 +2793,7 @@ function dol_string_is_good_iso($s)
function dol_nboflines($s,$maxchar=0) function dol_nboflines($s,$maxchar=0)
{ {
if ($s == '') return 0; if ($s == '') return 0;
$arraystring=split("\n",$s); $arraystring=explode("\n",$s);
$nb=sizeof($arraystring); $nb=sizeof($arraystring);
return $nb; return $nb;

View File

@ -210,7 +210,7 @@ function dol_print_object_info($object)
*/ */
function isValidMailDomain($mail) function isValidMailDomain($mail)
{ {
list($user, $domain) = split("@", $mail, 2); list($user, $domain) = explode("@", $mail, 2);
if (checkdnsrr($domain, "MX")) if (checkdnsrr($domain, "MX"))
{ {
return true; return true;

View File

@ -85,7 +85,7 @@ function facture_prepare_head($fac)
$i=0; $i=0;
foreach ($conf->tabs_modules['invoice'] as $value) foreach ($conf->tabs_modules['invoice'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$fac->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$fac->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -19,7 +19,7 @@
/** /**
* \file htdocs/lib/member.lib.php * \file htdocs/lib/member.lib.php
* \brief Ensemble de fonctions de base pour les adhérents * \brief Ensemble de fonctions de base pour les adh<EFBFBD>rents
* \version $Id$ * \version $Id$
* *
* Ensemble de fonctions de base de dolibarr sous forme d'include * Ensemble de fonctions de base de dolibarr sous forme d'include
@ -73,7 +73,7 @@ function member_prepare_head($member)
$i=0; $i=0;
foreach ($conf->tabs_modules['member'] as $value) foreach ($conf->tabs_modules['member'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$member->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$member->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -102,7 +102,7 @@ function commande_prepare_head($commande)
$i=0; $i=0;
foreach ($conf->tabs_modules['order'] as $value) foreach ($conf->tabs_modules['order'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$commande->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$commande->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -127,7 +127,7 @@ function product_prepare_head($product, $user)
$i=0; $i=0;
foreach ($conf->tabs_modules['product'] as $value) foreach ($conf->tabs_modules['product'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$product->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$product->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -98,7 +98,7 @@ function propal_prepare_head($propal)
$i=0; $i=0;
foreach ($conf->tabs_modules['propal'] as $value) foreach ($conf->tabs_modules['propal'] as $value)
{ {
$values=split(':',$value); $values=explode(':',$value);
if ($values[2]) $langs->load($values[2]); if ($values[2]) $langs->load($values[2]);
$head[$h][0] = eregi_replace('__ID__',$propal->id,$values[3]); $head[$h][0] = eregi_replace('__ID__',$propal->id,$values[3]);
$head[$h][1] = $langs->trans($values[1]); $head[$h][1] = $langs->trans($values[1]);

View File

@ -131,7 +131,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
global $dolibarr_main_demo; global $dolibarr_main_demo;
if (! empty($dolibarr_main_demo)) if (! empty($dolibarr_main_demo))
{ {
$tab=split(',',$dolibarr_main_demo); $tab=explode(',',$dolibarr_main_demo);
$demologin=$tab[0]; $demologin=$tab[0];
$demopassword=$tab[1]; $demopassword=$tab[1];
} }
@ -152,7 +152,7 @@ function dol_loginfunction($langs,$conf,$mysoc)
$entityCookie = new DolCookie($cryptkey); $entityCookie = new DolCookie($cryptkey);
$cookieValue = $entityCookie->_getCookie($entityCookieName); $cookieValue = $entityCookie->_getCookie($entityCookieName);
list($lastuser, $lastentity) = split('\|', $cookieValue); list($lastuser, $lastentity) = explode('|', $cookieValue);
} }
} }
} }

View File

@ -153,7 +153,7 @@ if ($conf->file->main_force_https)
if (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') // If link is http if (empty($_SERVER["HTTPS"]) || $_SERVER["HTTPS"] != 'on') // If link is http
{ {
$uri=eregi_replace('^http(s?)://','',$dolibarr_main_url_root); $uri=eregi_replace('^http(s?)://','',$dolibarr_main_url_root);
$val=split('/',$uri); $val=explode('/',$uri);
$domaineport=$val[0]; // $domaineport contient nom domaine et port $domaineport=$val[0]; // $domaineport contient nom domaine et port
$newurl='https://'.$domaineport.$_SERVER["REQUEST_URI"]; $newurl='https://'.$domaineport.$_SERVER["REQUEST_URI"];
@ -183,8 +183,8 @@ if (! empty($conf->global->MAIN_NOT_INSTALLED) || ! empty($conf->global->MAIN_NO
if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_VERSION_LAST_UPGRADE != DOL_VERSION)) if (! empty($conf->global->MAIN_VERSION_LAST_UPGRADE) && ($conf->global->MAIN_VERSION_LAST_UPGRADE != DOL_VERSION))
{ {
require_once(DOL_DOCUMENT_ROOT ."/lib/admin.lib.php"); require_once(DOL_DOCUMENT_ROOT ."/lib/admin.lib.php");
$dolibarrversionlastupgrade=split('[\.-]',$conf->global->MAIN_VERSION_LAST_UPGRADE); $dolibarrversionlastupgrade=preg_split('/[.-]/',$conf->global->MAIN_VERSION_LAST_UPGRADE);
$dolibarrversionprogram=split('[\.-]',DOL_VERSION); $dolibarrversionprogram=preg_split('/[.-]/',DOL_VERSION);
if (versioncompare($dolibarrversionprogram,$dolibarrversionlastupgrade) > 0) // Programs have a version higher than database if (versioncompare($dolibarrversionprogram,$dolibarrversionlastupgrade) > 0) // Programs have a version higher than database
{ {
dol_syslog("main.inc: database version ".$conf->global->MAIN_VERSION_LAST_UPGRADE." is lower than programs version ".DOL_VERSION.". Redirect to install page.", LOG_WARNING); dol_syslog("main.inc: database version ".$conf->global->MAIN_VERSION_LAST_UPGRADE." is lower than programs version ".DOL_VERSION.". Redirect to install page.", LOG_WARNING);
@ -218,7 +218,7 @@ if (! empty($conf->global->MAIN_SECURITY_CSRF)) // Check validity of token, only
if (! empty($_REQUEST["disablemodules"])) $_SESSION["disablemodules"]=$_REQUEST["disablemodules"]; if (! empty($_REQUEST["disablemodules"])) $_SESSION["disablemodules"]=$_REQUEST["disablemodules"];
if (! empty($_SESSION["disablemodules"])) if (! empty($_SESSION["disablemodules"]))
{ {
$disabled_modules=split(',',$_SESSION["disablemodules"]); $disabled_modules=explode(',',$_SESSION["disablemodules"]);
foreach($disabled_modules as $module) foreach($disabled_modules as $module)
{ {
$conf->$module->enabled=false; $conf->$module->enabled=false;
@ -900,7 +900,7 @@ function top_menu($head, $title='', $target='')
$htmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')'; $htmltext.='<br><b>'.$langs->trans("Browser").'</b>: '.$conf->browser->name.' ('.$_SERVER['HTTP_USER_AGENT'].')';
if (! empty($conf->browser->phone)) $htmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone; if (! empty($conf->browser->phone)) $htmltext.='<br><b>'.$langs->trans("Phone").'</b>: '.$conf->browser->phone;
if (! empty($_SESSION["disablemodules"])) $htmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join('<br>',split(',',$_SESSION["disablemodules"])); if (! empty($_SESSION["disablemodules"])) $htmltext.='<br><b>'.$langs->trans("DisabledModules").'</b>: <br>'.join('<br>',explode(',',$_SESSION["disablemodules"]));
// print '<img class="login" border="0" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"'; // print '<img class="login" border="0" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/logout.png"';
// print ' alt="'.$title.'" title="'.$title.'"'; // print ' alt="'.$title.'" title="'.$title.'"';

View File

@ -165,7 +165,7 @@ $conf->file->dol_document_root=array(DOL_DOCUMENT_ROOT);
if (! empty($dolibarr_main_document_root_alt)) if (! empty($dolibarr_main_document_root_alt))
{ {
// dolibarr_main_document_root_alt contains several directories // dolibarr_main_document_root_alt contains several directories
$values=split('[;,]',$dolibarr_main_document_root_alt); $values=preg_split('/[;,]/',$dolibarr_main_document_root_alt);
foreach($values as $value) foreach($values as $value)
{ {
$conf->file->dol_document_root[]=$value; $conf->file->dol_document_root[]=$value;
@ -270,7 +270,7 @@ if (! defined('NOREQUIREDB'))
$entityCookie = new DolCookie($conf->file->cookie_cryptkey); $entityCookie = new DolCookie($conf->file->cookie_cryptkey);
$cookieValue = $entityCookie->_getCookie($entityCookieName); $cookieValue = $entityCookie->_getCookie($entityCookieName);
list($lastuser, $lastentity) = split('\|', $cookieValue); list($lastuser, $lastentity) = explode('|', $cookieValue);
$conf->entity = $lastentity; $conf->entity = $lastentity;
} }
} }

View File

@ -147,7 +147,7 @@ class Notify
{ {
$subject = $langs->transnoentitiesnoconv("DolibarrNotification"); $subject = $langs->transnoentitiesnoconv("DolibarrNotification");
$message = $texte; $message = $texte;
$filename = split("/",$file); $filename = explode("/",$file);
$msgishtml=0; $msgishtml=0;
$replyto = $conf->notification->email_from; $replyto = $conf->notification->email_from;

View File

@ -932,7 +932,7 @@ class soap_transport_http extends nusoap_base {
*/ */
function parseCookie($cookie_str) { function parseCookie($cookie_str) {
$cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
$data = split(';', $cookie_str); $data = explode(';', $cookie_str);
$value_str = $data[0]; $value_str = $data[0];
$cookie_param = 'domain='; $cookie_param = 'domain=';

View File

@ -2924,7 +2924,7 @@ class soap_transport_http extends nusoap_base {
*/ */
function parseCookie($cookie_str) { function parseCookie($cookie_str) {
$cookie_str = str_replace('; ', ';', $cookie_str) . ';'; $cookie_str = str_replace('; ', ';', $cookie_str) . ';';
$data = split(';', $cookie_str); $data = explode(';', $cookie_str);
$value_str = $data[0]; $value_str = $data[0];
$cookie_param = 'domain='; $cookie_param = 'domain=';

View File

@ -56,7 +56,7 @@ if ($_POST["action"] == 'createtask' && $user->rights->projet->creer)
if (! $error) if (! $error)
{ {
$tmparray=split('_',$_POST['task_parent']); $tmparray=explode('_',$_POST['task_parent']);
$projectid=$tmparray[0]; $projectid=$tmparray[0];
$task_parent=$tmparray[1]; $task_parent=$tmparray[1];
if (empty($task_parent)) $task_parent=0; // If task_parent is '' if (empty($task_parent)) $task_parent=0; // If task_parent is ''

View File

@ -75,8 +75,8 @@ print '<table summary="listofgoldcoaches"><tr>';
foreach ($arrayofwidgets as $arraywidget) // Loop on each user foreach ($arrayofwidgets as $arraywidget) // Loop on each user
{ {
if ($found >= $limit) break; if ($found >= $limit) break;
$listofwidgets=split(',',$arraywidget['id']); $listofwidgets=explode(',',$arraywidget['id']);
$listoflangs=split(',',$arraywidget['lang']); $listoflangs=explode(',',$arraywidget['lang']);
$pos=0; $pos=0;
foreach($listoflangs as $langcode) // Loop on each lang of user foreach($listoflangs as $langcode) // Loop on each lang of user
{ {

View File

@ -18,7 +18,7 @@
* $Id$ * $Id$
* $Source$ * $Source$
* *
* Visualisation de l'etat des lignes preselectionnées * Visualisation de l'etat des lignes preselectionn<EFBFBD>es
* *
*/ */
require ("../../../master.inc.php"); require ("../../../master.inc.php");
@ -113,7 +113,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids, $deb
} }
if (preg_match("/<Preselection .* \/>/",$line)) if (preg_match("/<Preselection .* \/>/",$line))
{ {
$results = split(" ",trim($line)); $results = explode(" ",trim($line));
//print_r($results); //print_r($results);
$array = array(); $array = array();

View File

@ -19,7 +19,7 @@
* $Source$ * $Source$
* *
* *
* Recupération des fichiers CDR * Recup<EFBFBD>ration des fichiers CDR
* *
*/ */
require ("../../master.inc.php"); require ("../../master.inc.php");
@ -58,7 +58,7 @@ else
if (sizeof($ids) == 0) if (sizeof($ids) == 0)
{ {
_log($GLOBALS["argv"][0]. " Aucune lignes à traiter - fin", LOG_NOTICE); _log($GLOBALS["argv"][0]. " Aucune lignes <EFBFBD> traiter - fin", LOG_NOTICE);
exit(0); exit(0);
} }
@ -85,7 +85,7 @@ while ( $childrenNow < $childrenTotal )
} }
elseif ( $pid ) elseif ( $pid )
{ {
// Père // P<EFBFBD>re
$childrenNow++; $childrenNow++;
} }
else else
@ -144,7 +144,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids)
if (preg_match("/<Preselection .* \/>/",$line)) if (preg_match("/<Preselection .* \/>/",$line))
{ {
$results = split(" ",trim($line)); $results = explode(" ",trim($line));
//print_r($results); //print_r($results);
$array = array(); $array = array();
@ -300,7 +300,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids)
} }
else else
{ {
_log("$cli ERREUR impossible de récupérer les infos", LOG_ERR); _log("$cli ERREUR impossible de r<EFBFBD>cup<EFBFBD>rer les infos", LOG_ERR);
} }
_log("$cli Fin Traitement ligne", LOG_NOTICE); _log("$cli Fin Traitement ligne", LOG_NOTICE);
} }

View File

@ -19,7 +19,7 @@
* $Source$ * $Source$
* *
* *
* Recupération des fichiers CDR * Recup<EFBFBD>ration des fichiers CDR
* *
*/ */
require ("../../master.inc.php"); require ("../../master.inc.php");
@ -96,7 +96,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids)
if (preg_match("/<Preselection .* \/>/",$line)) if (preg_match("/<Preselection .* \/>/",$line))
{ {
$results = split(" ",trim($line)); $results = explode(" ",trim($line));
//print_r($results); //print_r($results);
$array = array(); $array = array();

View File

@ -18,7 +18,7 @@
* $Id$ * $Id$
* $Source$ * $Source$
* *
* Visualisation de l'etat des lignes preselectionnées * Visualisation de l'etat des lignes preselectionn<EFBFBD>es
* *
*/ */
require ("../../master.inc.php"); require ("../../master.inc.php");
@ -113,7 +113,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids, $deb
} }
if (preg_match("/<Preselection .* \/>/",$line)) if (preg_match("/<Preselection .* \/>/",$line))
{ {
$results = split(" ",trim($line)); $results = explode(" ",trim($line));
//print_r($results); //print_r($results);
$array = array(); $array = array();

View File

@ -18,7 +18,7 @@
* $Id$ * $Id$
* $Source$ * $Source$
* *
* Visualisation de l'etat des lignes preselectionnées * Visualisation de l'etat des lignes preselectionn<EFBFBD>es
* *
*/ */
require ("../../master.inc.php"); require ("../../master.inc.php");
@ -109,7 +109,7 @@ function GetPreselection_byRef($db, $host, $user_login, $user_passwd, $ids, $deb
} }
if (preg_match("/<Preselection .* \/>/",$line)) if (preg_match("/<Preselection .* \/>/",$line))
{ {
$results = split(" ",trim($line)); $results = explode(" ",trim($line));
//print_r($results); //print_r($results);
$array = array(); $array = array();

View File

@ -108,13 +108,13 @@ class Translate {
$langpref=$_SERVER['HTTP_ACCEPT_LANGUAGE']; $langpref=$_SERVER['HTTP_ACCEPT_LANGUAGE'];
$langpref=eregi_replace(";[^,]*","",$langpref); $langpref=eregi_replace(";[^,]*","",$langpref);
$langpref=eregi_replace("-","_",$langpref); $langpref=eregi_replace("-","_",$langpref);
$langlist=split("[;,]",$langpref); $langlist=preg_split("/[;,]/",$langpref);
$codetouse=$langlist[0]; $codetouse=$langlist[0];
} }
else $codetouse=$srclang; else $codetouse=$srclang;
// We redefine $srclang // We redefine $srclang
$langpart=split("_",$codetouse); $langpart=explode("_",$codetouse);
//print "Short before _ : ".$langpart[0].'/ Short after _ : '.$langpart[1]; //print "Short before _ : ".$langpart[0].'/ Short after _ : '.$langpart[1];
if (isset($langpart[1])) // If its a long code xx_YY if (isset($langpart[1])) // If its a long code xx_YY
@ -201,7 +201,7 @@ class Translate {
//dol_syslog("Translate::Load langofdir=".$langofdir); //dol_syslog("Translate::Load langofdir=".$langofdir);
// Redefine alt // Redefine alt
$langarray=split('_',$langofdir); $langarray=explode('_',$langofdir);
if ($alt < 1 && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1; if ($alt < 1 && strtolower($langarray[0]) == strtolower($langarray[1])) $alt=1;
if ($alt < 2 && (strtolower($langofdir) == 'en_us' || strtolower($langofdir) == 'fr_fr' || strtolower($langofdir) == 'es_es')) $alt=2; if ($alt < 2 && (strtolower($langofdir) == 'en_us' || strtolower($langofdir) == 'fr_fr' || strtolower($langofdir) == 'es_es')) $alt=2;
@ -243,7 +243,7 @@ class Translate {
{ {
if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#") if ($ligne[0] != "\n" && $ligne[0] != " " && $ligne[0] != "#")
{ {
$tab=split('=',$ligne,2); $tab=explode('=',$ligne,2);
$key=trim($tab[0]); $key=trim($tab[0]);
//print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>"; //print "Domain=$domain, found a string for $tab[0] with value $tab[1]<br>";
if (empty($this->tab_translate[$key]) && isset($tab[1])) if (empty($this->tab_translate[$key]) && isset($tab[1]))
@ -589,7 +589,7 @@ class Translate {
global $conf; global $conf;
$outlang=$this->defaultlang; // Output language we want $outlang=$this->defaultlang; // Output language we want
$outlangarray=split('_',$outlang,2); $outlangarray=explode('_',$outlang,2);
// If lang is xx_XX, then we use xx // If lang is xx_XX, then we use xx
if (strtolower($outlangarray[0]) == strtolower($outlangarray[1])) $outlang=$outlangarray[0]; if (strtolower($outlangarray[0]) == strtolower($outlangarray[1])) $outlang=$outlangarray[0];

View File

@ -1598,7 +1598,7 @@ class User extends CommonObject
$info=array(); $info=array();
// Object classes // Object classes
$info["objectclass"]=split(',',$conf->global->LDAP_USER_OBJECT_CLASS); $info["objectclass"]=explode(',',$conf->global->LDAP_USER_OBJECT_CLASS);
// Champs // Champs
if ($this->fullname && $conf->global->LDAP_FIELD_FULLNAME) $info[$conf->global->LDAP_FIELD_FULLNAME] = $this->fullname; if ($this->fullname && $conf->global->LDAP_FIELD_FULLNAME) $info[$conf->global->LDAP_FIELD_FULLNAME] = $this->fullname;

View File

@ -555,7 +555,7 @@ class UserGroup extends CommonObject
$info=array(); $info=array();
// Object classes // Object classes
$info["objectclass"]=split(',',$conf->global->LDAP_GROUP_OBJECT_CLASS); $info["objectclass"]=explode(',',$conf->global->LDAP_GROUP_OBJECT_CLASS);
// Champs // Champs
if ($this->nom && $conf->global->LDAP_GROUP_FIELD_FULLNAME) $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->nom; if ($this->nom && $conf->global->LDAP_GROUP_FIELD_FULLNAME) $info[$conf->global->LDAP_GROUP_FIELD_FULLNAME] = $this->nom;