';
diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php
index 90220f1bb23..e1357a39fb5 100644
--- a/htdocs/admin/tools/dolibarr_import.php
+++ b/htdocs/admin/tools/dolibarr_import.php
@@ -106,7 +106,7 @@ print $langs->trans("RestoreDesc3",$dolibarr_main_db_name).' ';
';
diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php
index 05d5fa43c86..8ae44951ca5 100644
--- a/htdocs/comm/action/class/actioncomm.class.php
+++ b/htdocs/comm/action/class/actioncomm.class.php
@@ -293,7 +293,7 @@ class ActionComm extends CommonObject
$this->type_id=$cactioncomm->id;
$this->type_code=$cactioncomm->code;
}
- else if ($result == 0)
+ elseif ($result == 0)
{
$this->error='Failed to get record with id '.$this->type_id.' code '.$this->type_code.' from dictionary "type of events"';
return -1;
@@ -566,7 +566,7 @@ class ActionComm extends CommonObject
* @param string $ref_ext Ref ext to get
* @return int <0 if KO, >0 if OK
*/
- function fetch($id, $ref='',$ref_ext='')
+ function fetch($id, $ref = '', $ref_ext = '')
{
global $langs;
@@ -761,7 +761,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK
*/
- function delete($notrigger=0)
+ function delete($notrigger = 0)
{
global $user,$langs,$conf;
@@ -838,7 +838,7 @@ class ActionComm extends CommonObject
* @param int $notrigger 1 = disable triggers, 0 = enable triggers
* @return int <0 if KO, >0 if OK
*/
- function update($user,$notrigger=0)
+ function update($user, $notrigger = 0)
{
global $langs,$conf,$hookmanager;
@@ -999,7 +999,7 @@ class ActionComm extends CommonObject
* @param string $limit Limit number of answers
* @return array or string Error string if KO, array with actions if OK
*/
- static function getActions($db, $socid=0, $fk_element=0, $elementtype='', $filter='', $sortfield='a.datep', $sortorder='DESC', $limit=0)
+ static function getActions($db, $socid = 0, $fk_element = 0, $elementtype = '', $filter = '', $sortfield = 'a.datep', $sortorder = 'DESC', $limit = 0)
{
global $conf, $langs;
@@ -1051,7 +1051,7 @@ class ActionComm extends CommonObject
* @param int $load_state_board Charge indicateurs this->nb de tableau de bord
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
*/
- function load_board($user, $load_state_board=0)
+ function load_board($user, $load_state_board = 0)
{
// phpcs:enable
global $conf, $langs;
@@ -1164,7 +1164,7 @@ class ActionComm extends CommonObject
* @param int $hidenastatus 1=Show nothing if status is "Not applicable"
* @return string String with status
*/
- function getLibStatut($mode,$hidenastatus=0)
+ function getLibStatut($mode, $hidenastatus = 0)
{
return $this->LibStatut($this->percentage,$mode,$hidenastatus,$this->datep);
}
@@ -1179,7 +1179,7 @@ class ActionComm extends CommonObject
* @param int $datestart Date start of event
* @return string Label
*/
- function LibStatut($percent,$mode,$hidenastatus=0,$datestart='')
+ function LibStatut($percent, $mode, $hidenastatus = 0, $datestart = '')
{
// phpcs:enable
global $langs;
@@ -1257,7 +1257,7 @@ class ActionComm extends CommonObject
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
* @return string Chaine avec URL
*/
- function getNomUrl($withpicto=0, $maxlength=0, $classname='', $option='', $overwritepicto=0, $notooltip=0, $save_lastsearch_value=-1)
+ function getNomUrl($withpicto = 0, $maxlength = 0, $classname = '', $option = '', $overwritepicto = 0, $notooltip = 0, $save_lastsearch_value = -1)
{
global $conf, $langs, $user, $hookmanager, $action;
@@ -1391,7 +1391,7 @@ class ActionComm extends CommonObject
* @param array $filters Array of filters. Exemple array('notolderthan'=>99, 'year'=>..., 'idfrom'=>..., 'notactiontype'=>'systemauto', 'project'=>123, ...)
* @return int <0 if error, nb of events in new file if ok
*/
- function build_exportfile($format,$type,$cachedelay,$filename,$filters)
+ function build_exportfile($format, $type, $cachedelay, $filename, $filters)
{
// phpcs:enable
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php
index 6631d0e375d..4d5536e50fc 100644
--- a/htdocs/comm/action/class/actioncommreminder.class.php
+++ b/htdocs/comm/action/class/actioncommreminder.class.php
@@ -178,7 +178,7 @@ class ActionCommReminder extends CommonObject
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
* @return string Label of status
*/
- function getLibStatut($mode=0)
+ function getLibStatut($mode = 0)
{
return $this->LibStatut($this->status,$mode);
}
@@ -191,7 +191,7 @@ class ActionCommReminder extends CommonObject
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
* @return string Label of status
*/
- static function LibStatut($status,$mode=0)
+ static function LibStatut($status, $mode = 0)
{
// phpcs:enable
global $langs;
diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php
index d6c25f6d4c1..8efb6ab0515 100644
--- a/htdocs/comm/action/class/cactioncomm.class.php
+++ b/htdocs/comm/action/class/cactioncomm.class.php
@@ -130,7 +130,7 @@ class CActionComm
* @param int $shortlabel 1=Get short label instead of long label
* @return mixed Array of all event types if OK, <0 if KO. Key of array is id or code depending on parameter $idorcode.
*/
- function liste_array($active='',$idorcode='id',$excludetype='',$onlyautoornot=0, $morefilter='', $shortlabel=0)
+ function liste_array($active = '', $idorcode = 'id', $excludetype = '', $onlyautoornot = 0, $morefilter = '', $shortlabel = 0)
{
// phpcs:enable
global $langs,$conf;
@@ -223,7 +223,7 @@ class CActionComm
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Picto only
* @return string Label of action type
*/
- function getNomUrl($withpicto=0)
+ function getNomUrl($withpicto = 0)
{
global $langs;
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index a73731699f2..4448fee5366 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -779,7 +779,7 @@ if (count($listofextcals))
$datecurstart=dol_stringtotime($icalevent['DTSTART;VALUE=DATE'],1);
$datecurend=dol_stringtotime($icalevent['DTEND;VALUE=DATE'],1)-1; // We remove one second to get last second of day
}
- else if (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime']))
+ elseif (is_array($icalevent['DTSTART']) && ! empty($icalevent['DTSTART']['unixtime']))
{
$datecurstart=$icalevent['DTSTART']['unixtime'];
$datecurend=$icalevent['DTEND']['unixtime'];
@@ -1277,7 +1277,7 @@ $db->close();
* @param string $nonew 0=Add "new entry button", 1=No "new entry button", -1=Only "new entry button"
* @return void
*/
-function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $nonew=0)
+function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $nonew = 0)
{
global $user, $conf, $langs;
global $action, $filter, $filtert, $status, $actioncode, $usergroup; // Filters used into search form
@@ -1365,7 +1365,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
// We decide to choose color of owner of event (event->userownerid is user id of owner, event->userassigned contains all users assigned to event)
if (! empty($cacheusers[$event->userownerid]->color)) $color=$cacheusers[$event->userownerid]->color;
}
- else if ($event->type_code == 'ICALEVENT') // Event come from external ical file
+ elseif ($event->type_code == 'ICALEVENT') // Event come from external ical file
{
$numical++;
if (! empty($event->icalname)) {
@@ -1378,7 +1378,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$color=($event->icalcolor?$event->icalcolor:-1);
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other');
}
- else if ($event->type_code == 'BIRTHDAY')
+ elseif ($event->type_code == 'BIRTHDAY')
{
$numbirthday++; $colorindex=2; $cssclass='family_birthday unmovable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
}
@@ -1425,11 +1425,11 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
{
$cssclass.= " unmovable";
}
- else if ($event->type_code == 'ICALEVENT')
+ elseif ($event->type_code == 'ICALEVENT')
{
$cssclass.= " unmovable";
}
- else if ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
+ elseif ($event->date_end_in_calendar && date('Ymd',$event->date_start_in_calendar) != date('Ymd',$event->date_end_in_calendar))
{
$tmpyearend = date('Y',$event->date_end_in_calendar);
$tmpmonthend = date('m',$event->date_end_in_calendar);
diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php
index 67a4534ca14..2a5691279a1 100644
--- a/htdocs/comm/action/pertype.php
+++ b/htdocs/comm/action/pertype.php
@@ -757,7 +757,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td
* @return void
*/
-function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)
+function show_day_events_pertype($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false)
{
global $db;
global $user, $conf, $langs, $hookmanager, $action;
@@ -809,7 +809,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
$nummytasks++; $cssclass='family_mytasks';
if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) $color=$event->type_color;
}
- else if ($event->type_code == 'ICALEVENT')
+ elseif ($event->type_code == 'ICALEVENT')
{
$numical++;
if (! empty($event->icalname))
@@ -823,7 +823,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
$color=$event->icalcolor;
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');
}
- else if ($event->type_code == 'BIRTHDAY')
+ elseif ($event->type_code == 'BIRTHDAY')
{
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
}
@@ -1026,7 +1026,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color1 = $output[0]['color'];
}
- else if (count($cases1[$h]) > 1)
+ elseif (count($cases1[$h]) > 1)
{
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
$color1='222222';
@@ -1039,7 +1039,7 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color2 = $output[0]['color'];
}
- else if (count($cases2[$h]) > 1)
+ elseif (count($cases2[$h]) > 1)
{
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
$color2='222222';
diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php
index 9e2a7278a27..f208c25a058 100644
--- a/htdocs/comm/action/peruser.php
+++ b/htdocs/comm/action/peruser.php
@@ -905,7 +905,7 @@ $db->close();
* @param bool $var true or false for alternat style on tr/td
* @return void
*/
-function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint=0, $maxnbofchar=16, $newparam='', $showinfo=0, $minheight=60, $showheader=false, $colorsbytype=array(), $var=false)
+function show_day_events2($username, $day, $month, $year, $monthshown, $style, &$eventarray, $maxprint = 0, $maxnbofchar = 16, $newparam = '', $showinfo = 0, $minheight = 60, $showheader = false, $colorsbytype = array(), $var = false)
{
global $db;
global $user, $conf, $langs, $hookmanager, $action;
@@ -970,7 +970,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
if (! empty($conf->global->AGENDA_USE_COLOR_PER_EVENT_TYPE)) $color=$event->type_color;
}
- else if ($event->type_code == 'ICALEVENT')
+ elseif ($event->type_code == 'ICALEVENT')
{
$numical++;
if (! empty($event->icalname))
@@ -984,7 +984,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
$color=$event->icalcolor;
$cssclass=(! empty($event->icalname)?'family_ext'.md5($event->icalname):'family_other unsortable');
}
- else if ($event->type_code == 'BIRTHDAY')
+ elseif ($event->type_code == 'BIRTHDAY')
{
$numbirthday++; $colorindex=2; $cssclass='family_birthday unsortable'; $color=sprintf("%02x%02x%02x",$theme_datacolor[$colorindex][0],$theme_datacolor[$colorindex][1],$theme_datacolor[$colorindex][2]);
}
@@ -1201,7 +1201,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
if ($output[0]['string']) $title1.=($title1?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color1 = $output[0]['color'];
}
- else if (count($cases1[$h]) > 1)
+ elseif (count($cases1[$h]) > 1)
{
$title1=$langs->trans("Ref").' '.$ids1.($title1?' - '.$title1:'');
$color1='222222';
@@ -1214,7 +1214,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
if ($output[0]['string']) $title2.=($title2?' - ':'').$output[0]['string'];
if ($output[0]['color']) $color2 = $output[0]['color'];
}
- else if (count($cases2[$h]) > 1)
+ elseif (count($cases2[$h]) > 1)
{
$title2=$langs->trans("Ref").' '.$ids2.($title2?' - '.$title2:'');
$color2='222222';
diff --git a/htdocs/comm/address.php b/htdocs/comm/address.php
index f9cf7dc5bf1..04b7cd3ad63 100644
--- a/htdocs/comm/address.php
+++ b/htdocs/comm/address.php
@@ -83,7 +83,7 @@ if ($action == 'add' || $action == 'update')
header("Location: ".$backtopage);
exit;
}
- else if ($origin == 'commande')
+ elseif ($origin == 'commande')
{
header("Location: ../commande/contact.php?action=editdelivery_adress&socid=".$socid."&id=".$originid);
exit;
@@ -112,7 +112,7 @@ if ($action == 'add' || $action == 'update')
}
// Update address
- else if ($action == 'update')
+ elseif ($action == 'update')
{
$result = $object->update($id, $socid, $user);
@@ -123,7 +123,7 @@ if ($action == 'add' || $action == 'update')
header("Location: ".$backtopage);
exit;
}
- else if ($origin == 'commande')
+ elseif ($origin == 'commande')
{
header("Location: ../commande/contact.php?id=".$originid);
exit;
@@ -153,7 +153,7 @@ if ($action == 'add' || $action == 'update')
}
}
-else if ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
+elseif ($action == 'confirm_delete' && $confirm == 'yes' && $user->rights->societe->supprimer)
{
$result = $object->delete($id, $socid);
diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php
index e0b60a87753..bee64fb41d1 100644
--- a/htdocs/comm/index.php
+++ b/htdocs/comm/index.php
@@ -496,7 +496,7 @@ if (! empty($conf->societe->enabled) && $user->rights->societe->lire)
print '