';
@@ -194,11 +194,11 @@ foreach ($dirmodels as $reldir)
// Example
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().' ';
- $nextval=$module->getNextValue($mysoc,$chequereceipts);
+ $nextval=$module->getNextValue($mysoc, $chequereceipts);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=$langs->trans("NextValue").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval.' ';
} else {
@@ -207,11 +207,11 @@ foreach ($dirmodels as $reldir)
}
print '
';
- print $form->textwithpicto('',$htmltooltip,1,0);
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
if ($conf->global->CHEQUERECEIPTS_ADDON.'.php' == $file) // If module is the one used, we show existing errors
{
- if (! empty($module->error)) dol_htmloutput_mesg($module->error,'','error',1);
+ if (! empty($module->error)) dol_htmloutput_mesg($module->error, '', 'error', 1);
}
print '
';
@@ -1061,19 +1061,19 @@ if ($id)
if ($fieldlist[$field]=='organization') { $valuetoshow=$langs->trans("Organization"); }
if ($fieldlist[$field]=='lang') { $valuetoshow=$langs->trans("Language"); }
if ($fieldlist[$field]=='type') {
- if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"),$langs->trans("TypePaymentDesc"),2,1,img_help(1,''));
+ if ($tabname[$id] == MAIN_DB_PREFIX."c_paiement") $valuetoshow=$form->textwithtooltip($langs->trans("Type"), $langs->trans("TypePaymentDesc"), 2, 1, img_help(1, ''));
else $valuetoshow=$langs->trans("Type");
}
if ($fieldlist[$field]=='code') { $valuetoshow=$langs->trans("Code"); $class='width100'; }
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label')
{
- $valuetoshow=$form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"),2,1,img_help(1,''));
+ $valuetoshow=$form->textwithtooltip($langs->trans("Label"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, ''));
}
if ($fieldlist[$field]=='libelle_facture') {
- $valuetoshow=$form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"),2,1,img_help(1,''));
+ $valuetoshow=$form->textwithtooltip($langs->trans("LabelOnDocuments"), $langs->trans("LabelUsedByDefault"), 2, 1, img_help(1, ''));
}
if ($fieldlist[$field]=='country') {
- if (in_array('region_id',$fieldlist)) { print '
'; continue; } // For region page, we do not show the country input
+ if (in_array('region_id', $fieldlist)) { print '
'; continue; } // For region page, we do not show the country input
$valuetoshow=$langs->trans("Country");
}
if ($fieldlist[$field]=='recuperableonly') { $valuetoshow=$langs->trans("NPR"); $class="center"; }
@@ -1117,15 +1117,15 @@ if ($id)
if ($id == 2) // Special cas for state page
{
- if ($fieldlist[$field]=='region_id') { $valuetoshow=' '; $showfield=1; }
- if ($fieldlist[$field]=='region') { $valuetoshow=$langs->trans("Country").'/'.$langs->trans("Region"); $showfield=1; }
+ if ($fieldlist[$field]=='region_id') { $valuetoshow=' '; $showfield=1; }
+ if ($fieldlist[$field]=='region') { $valuetoshow=$langs->trans("Country").'/'.$langs->trans("Region"); $showfield=1; }
}
if ($valuetoshow != '')
{
print '
';
}
@@ -1158,7 +1158,7 @@ if ($id)
$tmpaction = 'create';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
- $reshook=$hookmanager->executeHooks('createDictionaryFieldlist',$parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('createDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
if ($id == 3) unset($fieldlist[2]); // Remove field ??? if dictionary Regions
@@ -1190,7 +1190,7 @@ if ($id)
print '
';
print '';
- print '';
+ print '';
// List of available record in database
dol_syslog("htdocs/admin/dict", LOG_DEBUG);
@@ -1363,7 +1363,7 @@ if ($id)
{
$tmpaction='edit';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
- $reshook=$hookmanager->executeHooks('editDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('editDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
// Show fields
@@ -1385,7 +1385,7 @@ if ($id)
{
$tmpaction = 'view';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
- $reshook=$hookmanager->executeHooks('viewDictionaryFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('viewDictionaryFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
@@ -1436,8 +1436,7 @@ if ($id)
elseif($valuetoshow == 1) $valuetoshow = $langs->trans('AtEndOfMonth');
elseif($valuetoshow == 2) $valuetoshow = $langs->trans('CurrentNext');
$align="center";
- }
- elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i',$fieldlist[$field])) {
+ } elseif ($fieldlist[$field]=='price' || preg_match('/^amount/i', $fieldlist[$field])) {
$valuetoshow=price($valuetoshow);
}
if ($value == 'private')
@@ -1523,7 +1522,7 @@ if ($id)
$showfield=0;
}
elseif ($fieldlist[$field]=='unicode') {
- $valuetoshow = $langs->getCurrencySymbol($obj->code,1);
+ $valuetoshow = $langs->getCurrencySymbol($obj->code, 1);
}
elseif ($fieldlist[$field]=='label' && $tabname[$_GET["id"]]==MAIN_DB_PREFIX.'c_units') {
$langs->load("products");
@@ -1558,9 +1557,7 @@ if ($id)
elseif ($fieldlist[$field]=='taux') {
$valuetoshow = price($valuetoshow, 0, $langs, 0, 0);
$align="center";
- }
- elseif (in_array($fieldlist[$field],array('recuperableonly')))
- {
+ } elseif (in_array($fieldlist[$field], array('recuperableonly'))) {
$align="center";
}
elseif ($fieldlist[$field]=='accountancy_code' || $fieldlist[$field]=='accountancy_code_sell' || $fieldlist[$field]=='accountancy_code_buy') {
@@ -1600,10 +1597,13 @@ if ($id)
}
// Can an entry be erased or disabled ?
- $iserasable=1;$canbedisabled=1;$canbemodified=1; // true by default
+ // all true by default
+ $iserasable=1;
+ $canbedisabled=1;
+ $canbemodified=1;
if (isset($obj->code) && $id != 10)
{
- if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) { $iserasable = 0; $canbedisabled = 0; }
+ if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i', $obj->code))) { $iserasable = 0; $canbedisabled = 0; }
elseif ($obj->code == 'RECEP') { $iserasable = 0; $canbedisabled = 0; }
elseif ($obj->code == 'EF0') { $iserasable = 0; $canbedisabled = 0; }
}
@@ -1786,7 +1786,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
elseif ($fieldlist[$field] == 'country')
{
- if (in_array('region_id',$fieldlist))
+ if (in_array('region_id', $fieldlist))
{
print '
';
//print join(',',$fieldlist);
@@ -1800,7 +1800,7 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
}
elseif ($fieldlist[$field] == 'country_id')
{
- if (! in_array('country',$fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate)
+ if (! in_array('country', $fieldlist)) // If there is already a field country, we don't show country_id (avoid duplicate)
{
$country_id = (! empty($obj->{$fieldlist[$field]}) ? $obj->{$fieldlist[$field]} : 0);
print '
';
}
$moreforfilter = '';
@@ -412,7 +412,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
$parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder);
$reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
-print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"],'','','','align="center"',$sortfield,$sortorder,'maxwidthsearch ')."\n";
+print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ')."\n";
print ''."\n";
@@ -422,7 +422,7 @@ if (is_array($extrafields->attributes[$object->table_element]['computed']) && co
{
foreach ($extrafields->attributes[$object->table_element]['computed'] as $key => $val)
{
- if (preg_match('/\$object/',$val)) $needToFetchEachLine++; // There is at least one compute field that use $object
+ if (preg_match('/\$object/', $val)) $needToFetchEachLine++; // There is at least one compute field that use $object
}
}
@@ -537,7 +537,7 @@ print ''."\n";
print '
'."\n";
-if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
+if (in_array('builddoc', $arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
{
$hidegeneratedfilelistifempty=1;
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
@@ -547,13 +547,13 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
// Show list of available documents
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
- $urlsource.=str_replace('&','&',$param);
+ $urlsource.=str_replace('&', '&', $param);
$filedir=$diroutputmassaction;
$genallowed=$user->rights->emailcollector->read;
$delallowed=$user->rights->emailcollector->create;
- print $formfile->showdocuments('massfilesarea_emailcollector','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
+ print $formfile->showdocuments('massfilesarea_emailcollector', '', $filedir, $urlsource, 0, $delallowed, '', 1, 1, 0, 48, 1, $param, $title, '', '', '', null, $hidegeneratedfilelistifempty);
}
// End of page
diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php
index 347f4c27489..f6e731aaee6 100644
--- a/htdocs/admin/events.php
+++ b/htdocs/admin/events.php
@@ -34,7 +34,7 @@ accessforbidden();
// Load translation files required by the page
$langs->loadLangs(array("users","admin","other"));
-$action=GETPOST('action','aZ09');
+$action=GETPOST('action', 'aZ09');
$securityevent=new Events($db);
@@ -54,8 +54,8 @@ if ($action == "save")
{
$param='MAIN_LOGEVENTS_'.$arr['id'];
//print "param=".$param." - ".$_POST[$param];
- if (! empty($_POST[$param])) dolibarr_set_const($db,$param,$_POST[$param],'chaine',0,'',$conf->entity);
- else dolibarr_del_const($db,$param,$conf->entity);
+ if (! empty($_POST[$param])) dolibarr_set_const($db, $param, $_POST[$param], 'chaine', 0, '', $conf->entity);
+ else dolibarr_del_const($db, $param, $conf->entity);
}
$db->commit();
@@ -69,10 +69,10 @@ if ($action == "save")
*/
$wikihelp='EN:Setup_Security|FR:Paramétrage_Sécurité|ES:Configuración_Seguridad';
-llxHeader('',$langs->trans("Audit"),$wikihelp);
+llxHeader('', $langs->trans("Audit"), $wikihelp);
//$linkback=''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans("SecuritySetup"),'','title_setup');
+print load_fiche_titre($langs->trans("SecuritySetup"), '', 'title_setup');
print $langs->trans("LogEventDesc", $langs->transnoentitiesnoconv("AdminTools"), $langs->transnoentitiesnoconv("Audit"))." \n";
print " \n";
diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php
index 2dec14f0a24..d8398f610ba 100644
--- a/htdocs/admin/expedition.php
+++ b/htdocs/admin/expedition.php
@@ -40,10 +40,10 @@ $langs->loadLangs(array("admin", "sendings", "deliveries", "other"));
if (! $user->admin)
accessforbidden();
-$action=GETPOST('action','alpha');
-$value=GETPOST('value','alpha');
-$label = GETPOST('label','alpha');
-$scandir = GETPOST('scan_dir','alpha');
+$action=GETPOST('action', 'alpha');
+$value=GETPOST('value', 'alpha');
+$label = GETPOST('label', 'alpha');
+$scandir = GETPOST('scan_dir', 'alpha');
$type='shipping';
if (empty($conf->global->EXPEDITION_ADDON_NUMBER))
@@ -60,10 +60,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_setmoduleoptions.inc.php';
if ($action == 'updateMask')
{
- $maskconst=GETPOST('maskconstexpedition','alpha');
- $maskvalue=GETPOST('maskexpedition','alpha');
+ $maskconst=GETPOST('maskconstexpedition', 'alpha');
+ $maskvalue=GETPOST('maskexpedition', 'alpha');
if (! empty($maskconst))
- $res = dolibarr_set_const($db,$maskconst,$maskvalue,'chaine',0,'',$conf->entity);
+ $res = dolibarr_set_const($db, $maskconst, $maskvalue, 'chaine', 0, '', $conf->entity);
if (isset($res))
{
@@ -76,16 +76,16 @@ if ($action == 'updateMask')
elseif ($action == 'set_param')
{
- $freetext=GETPOST('SHIPPING_FREE_TEXT','none'); // No alpha here, we want exact string
- $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT",$freetext,'chaine',0,'',$conf->entity);
+ $freetext=GETPOST('SHIPPING_FREE_TEXT', 'none'); // No alpha here, we want exact string
+ $res = dolibarr_set_const($db, "SHIPPING_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if ($res <= 0)
{
$error++;
setEventMessages($langs->trans("Error"), null, 'errors');
}
- $draft=GETPOST('SHIPPING_DRAFT_WATERMARK','alpha');
- $res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
+ $draft=GETPOST('SHIPPING_DRAFT_WATERMARK', 'alpha');
+ $res = dolibarr_set_const($db, "SHIPPING_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if ($res <= 0)
{
$error++;
@@ -100,17 +100,17 @@ elseif ($action == 'set_param')
elseif ($action == 'specimen')
{
- $modele=GETPOST('module','alpha');
+ $modele=GETPOST('module', 'alpha');
$exp = new Expedition($db);
$exp->initAsSpecimen();
// Search template files
$file=''; $classname=''; $filefound=0;
- $dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
+ $dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
foreach($dirmodels as $reldir)
{
- $file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php",0);
+ $file=dol_buildpath($reldir."core/modules/expedition/doc/pdf_".$modele.".modules.php", 0);
if (file_exists($file))
{
$filefound=1;
@@ -125,7 +125,7 @@ elseif ($action == 'specimen')
$module = new $classname($db);
- if ($module->write_file($exp,$langs) > 0)
+ if ($module->write_file($exp, $langs) > 0)
{
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=expedition&file=SPECIMEN.pdf");
return;
@@ -154,14 +154,14 @@ elseif ($action == 'del')
$ret = delDocumentModel($value, $type);
if ($ret > 0)
{
- if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF',$conf->entity);
+ if ($conf->global->EXPEDITION_ADDON_PDF == "$value") dolibarr_del_const($db, 'EXPEDITION_ADDON_PDF', $conf->entity);
}
}
// Set default model
elseif ($action == 'setdoc')
{
- if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
+ if (dolibarr_set_const($db, "EXPEDITION_ADDON_PDF", $value, 'chaine', 0, '', $conf->entity))
{
// La constante qui a ete lue en avant du nouveau set
// on passe donc par une variable pour avoir un affichage coherent
@@ -178,7 +178,7 @@ elseif ($action == 'setdoc')
elseif ($action == 'setmodel')
{
- dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER",$value,'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "EXPEDITION_ADDON_NUMBER", $value, 'chaine', 0, '', $conf->entity);
}
@@ -186,14 +186,14 @@ elseif ($action == 'setmodel')
* View
*/
-$dirmodels=array_merge(array('/'),(array) $conf->modules_parts['models']);
+$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
$form=new Form($db);
-llxHeader("",$langs->trans("SendingsSetup"));
+llxHeader("", $langs->trans("SendingsSetup"));
$linkback=''.$langs->trans("BackToModuleList").'';
-print load_fiche_titre($langs->trans("SendingsSetup"),$linkback,'title_setup');
+print load_fiche_titre($langs->trans("SendingsSetup"), $linkback, 'title_setup');
print ' ';
$head = expedition_admin_prepare_head();
@@ -247,7 +247,7 @@ foreach ($dirmodels as $reldir)
// Show example of numbering module
print '
';
$tmp=$module->getExample();
- if (preg_match('/^Error/',$tmp)) {
+ if (preg_match('/^Error/', $tmp)) {
$langs->load("errors"); print '
'."\n";
@@ -356,11 +356,11 @@ foreach ($dirmodels as $reldir)
//print "> ".$conf->global->FACTURE_ADDON." - ".$file;
if ($conf->global->FACTURE_ADDON == $file || $conf->global->FACTURE_ADDON.'.php' == $file)
{
- print img_picto($langs->trans("Activated"),'switch_on');
+ print img_picto($langs->trans("Activated"), 'switch_on');
}
else
{
- print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"),'switch_off').'';
+ print 'scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'';
}
print '';
@@ -371,11 +371,11 @@ foreach ($dirmodels as $reldir)
$htmltooltip='';
$htmltooltip.=''.$langs->trans("Version").': '.$module->getVersion().' ';
$facture->type=0;
- $nextval=$module->getNextValue($mysoc,$facture);
+ $nextval=$module->getNextValue($mysoc, $facture);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=$langs->trans("NextValueForInvoices").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval.' ';
} else {
@@ -384,11 +384,11 @@ foreach ($dirmodels as $reldir)
}
// Example for remplacement
$facture->type=1;
- $nextval=$module->getNextValue($mysoc,$facture);
+ $nextval=$module->getNextValue($mysoc, $facture);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=$langs->trans("NextValueForReplacements").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval.' ';
} else {
@@ -398,11 +398,11 @@ foreach ($dirmodels as $reldir)
// Example for credit invoice
$facture->type=2;
- $nextval=$module->getNextValue($mysoc,$facture);
+ $nextval=$module->getNextValue($mysoc, $facture);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=$langs->trans("NextValueForCreditNotes").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval.' ';
} else {
@@ -411,11 +411,11 @@ foreach ($dirmodels as $reldir)
}
// Example for deposit invoice
$facture->type=3;
- $nextval=$module->getNextValue($mysoc,$facture);
+ $nextval=$module->getNextValue($mysoc, $facture);
if ("$nextval" != $langs->trans("NotAvailable")) { // Keep " on nextval
$htmltooltip.=$langs->trans("NextValueForDeposit").': ';
if ($nextval) {
- if (preg_match('/^Error/',$nextval) || $nextval=='NotConfigured')
+ if (preg_match('/^Error/', $nextval) || $nextval=='NotConfigured')
$nextval = $langs->trans($nextval);
$htmltooltip.=$nextval;
} else {
@@ -424,11 +424,11 @@ foreach ($dirmodels as $reldir)
}
print '
';
- print $form->textwithpicto('',$htmltooltip,1,0);
+ print $form->textwithpicto('', $htmltooltip, 1, 0);
if ($conf->global->FACTURE_ADDON.'.php' == $file) // If module is the one used, we show existing errors
{
- if (! empty($module->error)) dol_htmloutput_mesg($module->error,'','error',1);
+ if (! empty($module->error)) dol_htmloutput_mesg($module->error, '', 'error', 1);
}
print '
';
@@ -450,7 +450,7 @@ print '
';
* Document templates generators
*/
print ' ';
-print load_fiche_titre($langs->trans("BillsPDFModules"),'','');
+print load_fiche_titre($langs->trans("BillsPDFModules"), '', '');
// Load array def with activated templates
$type='invoice';
@@ -510,7 +510,7 @@ foreach ($dirmodels as $reldir)
foreach($filelist as $file)
{
- if (preg_match('/\.modules\.php$/i',$file) && preg_match('/^(pdf_|doc_)/',$file))
+ if (preg_match('/\.modules\.php$/i', $file) && preg_match('/^(pdf_|doc_)/', $file))
{
if (file_exists($dir.'/'.$file))
{
@@ -529,7 +529,7 @@ foreach ($dirmodels as $reldir)
print '
';
}
// Fields from hook
$parameters=array();
-$reshook=$hookmanager->executeHooks('addAdminLdapOptions',$parameters); // Note that $action and $object may have been modified by hook
+$reshook=$hookmanager->executeHooks('addAdminLdapOptions', $parameters); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
print '
';
@@ -616,7 +616,7 @@ if ($resql)
$paramwithsearch = $param;
if ($sortorder) $paramwithsearch.= '&sortorder='.urlencode($sortorder);
if ($sortfield) $paramwithsearch.= '&sortfield='.urlencode($sortfield);
- if (GETPOST('from','alpha')) $paramwithsearch.= '&from='.urlencode(GETPOST('from','alpha'));
+ if (GETPOST('from', 'alpha')) $paramwithsearch.= '&from='.urlencode(GETPOST('from', 'alpha'));
// There is several pages
if ($num > $listlimit)
@@ -724,11 +724,11 @@ if ($resql)
$tmpaction='edit';
$parameters=array('fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
- $reshook=$hookmanager->executeHooks('editEmailTemplateFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('editEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
// Show fields
- if (empty($reshook)) fieldList($fieldlist,$obj,$tabname[$id],'edit');
+ if (empty($reshook)) fieldList($fieldlist, $obj, $tabname[$id], 'edit');
print '
';
print '
';
@@ -801,7 +801,7 @@ if ($resql)
$tmpaction = 'view';
$parameters=array('var'=>$var, 'fieldlist'=>$fieldlist, 'tabname'=>$tabname[$id]);
- $reshook=$hookmanager->executeHooks('viewEmailTemplateFieldlist',$parameters,$obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('viewEmailTemplateFieldlist', $parameters, $obj, $tmpaction); // Note that $action and $object may have been modified by some hooks
$error=$hookmanager->error; $errors=$hookmanager->errors;
diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php
index 6037304350a..f18b09b7d05 100644
--- a/htdocs/admin/menus.php
+++ b/htdocs/admin/menus.php
@@ -27,8 +27,8 @@ require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php';
-$action=GETPOST('action','aZ09');
-$cancel=GETPOST('cancel','alpha');
+$action=GETPOST('action', 'aZ09');
+$cancel=GETPOST('cancel', 'alpha');
// Load translation files required by the page
$langs->loadLangs(array("companies","products","admin","users","other"));
@@ -38,7 +38,7 @@ if (! $user->admin) accessforbidden();
$dirstandard = array();
$dirsmartphone = array();
-$dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
+$dirmenus=array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']);
foreach($dirmenus as $dirmenu)
{
$dirstandard[]=$dirmenu.'standard';
@@ -64,24 +64,24 @@ if ($action == 'update' && ! $cancel)
{
$_SESSION["mainmenu"]="home"; // Le gestionnaire de menu a pu changer
- dolibarr_set_const($db, "MAIN_MENU_STANDARD", GETPOST('MAIN_MENU_STANDARD','alpha'),'chaine',0,'',$conf->entity);
- dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", GETPOST('MAIN_MENU_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_MENU_STANDARD", GETPOST('MAIN_MENU_STANDARD', 'alpha'), 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_MENU_SMARTPHONE", GETPOST('MAIN_MENU_SMARTPHONE', 'alpha'), 'chaine', 0, '', $conf->entity);
- dolibarr_set_const($db, "MAIN_MENUFRONT_STANDARD", GETPOST('MAIN_MENUFRONT_STANDARD','alpha'),'chaine',0,'',$conf->entity);
- dolibarr_set_const($db, "MAIN_MENUFRONT_SMARTPHONE", GETPOST('MAIN_MENUFRONT_SMARTPHONE','alpha'),'chaine',0,'',$conf->entity);
+ dolibarr_set_const($db, "MAIN_MENUFRONT_STANDARD", GETPOST('MAIN_MENUFRONT_STANDARD', 'alpha'), 'chaine', 0, '', $conf->entity);
+ dolibarr_set_const($db, "MAIN_MENUFRONT_SMARTPHONE", GETPOST('MAIN_MENUFRONT_SMARTPHONE', 'alpha'), 'chaine', 0, '', $conf->entity);
// Define list of menu handlers to initialize
$listofmenuhandler=array();
- $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',GETPOST('MAIN_MENU_STANDARD','alpha'))]=1;
- $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',GETPOST('MAIN_MENUFRONT_STANDARD','alpha'))]=1;
- if (GETPOST('MAIN_MENU_SMARTPHONE','alpha')) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',GETPOST('MAIN_MENU_SMARTPHONE','alpha'))]=1;
- if (GETPOST('MAIN_MENUFRONT_SMARTPHONE','alpha')) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i','',GETPOST('MAIN_MENUFRONT_SMARTPHONE','alpha'))]=1;
+ $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i', '', GETPOST('MAIN_MENU_STANDARD', 'alpha'))]=1;
+ $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i', '', GETPOST('MAIN_MENUFRONT_STANDARD', 'alpha'))]=1;
+ if (GETPOST('MAIN_MENU_SMARTPHONE', 'alpha')) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i', '', GETPOST('MAIN_MENU_SMARTPHONE', 'alpha'))]=1;
+ if (GETPOST('MAIN_MENUFRONT_SMARTPHONE', 'alpha')) $listofmenuhandler[preg_replace('/(_backoffice|_frontoffice|_menu)?\.php/i', '', GETPOST('MAIN_MENUFRONT_SMARTPHONE', 'alpha'))]=1;
// Initialize menu handlers
foreach ($listofmenuhandler as $key => $val)
{
// Load sql init_menu_handler.sql file
- $dirmenus=array_merge(array("/core/menus/"),(array) $conf->modules_parts['menus']);
+ $dirmenus=array_merge(array("/core/menus/"), (array) $conf->modules_parts['menus']);
foreach($dirmenus as $dirmenu)
{
$file='init_menu_'.$key.'.sql';
@@ -92,7 +92,7 @@ if ($action == 'update' && ! $cancel)
{
$db->begin();
- $result=run_sql($fullpath,1,'',1,$key,'none');
+ $result=run_sql($fullpath, 1, '', 1, $key, 'none');
if ($result > 0)
{
$db->commit();
@@ -126,9 +126,9 @@ $form=new Form($db);
$formadmin=new FormAdmin($db);
$wikihelp='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
-llxHeader('',$langs->trans("Setup"),$wikihelp);
+llxHeader('', $langs->trans("Setup"), $wikihelp);
-print load_fiche_titre($langs->trans("Menus"),'','title_setup');
+print load_fiche_titre($langs->trans("Menus"), '', 'title_setup');
$h = 0;
@@ -167,10 +167,10 @@ if ($action == 'edit')
print '
';
diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php
index 781f1fd380b..8d8bf531443 100644
--- a/htdocs/admin/modulehelp.php
+++ b/htdocs/admin/modulehelp.php
@@ -21,7 +21,7 @@
* \brief Page to activate/disable all modules
*/
-if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU','1'); // If there is no need to load and show top and left menu
+if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU', '1'); // If there is no need to load and show top and left menu
require '../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
@@ -32,7 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
$langs->loadLangs(array('errors', 'admin'));
$mode=GETPOST('mode', 'alpha');
-$action=GETPOST('action','alpha');
+$action=GETPOST('action', 'alpha');
$id = GETPOST('id', 'int');
if (empty($mode)) $mode='desc';
@@ -55,7 +55,7 @@ if (! $user->admin)
$form = new Form($db);
$help_url='EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
-llxHeader('',$langs->trans("Setup"),$help_url);
+llxHeader('', $langs->trans("Setup"), $help_url);
print ''."\n".''."\n";
diff --git a/htdocs/website/websiteaccount_card.php b/htdocs/website/websiteaccount_card.php
index 24f87678505..dfe189f2a74 100644
--- a/htdocs/website/websiteaccount_card.php
+++ b/htdocs/website/websiteaccount_card.php
@@ -46,14 +46,14 @@ $diroutputmassaction=$conf->website->dir_output . '/temp/massgeneration/'.$user-
$hookmanager->initHooks(array('websiteaccountcard')); // Note that conf->hooks_modules contains array
// Fetch optionals attributes and labels
$extralabels = $extrafields->fetch_name_optionals_label('societeaccount');
-$search_array_options=$extrafields->getOptionalsFromPost($object->table_element,'','search_');
+$search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_');
// Initialize array of search criterias
-$search_all=trim(GETPOST("search_all",'alpha'));
+$search_all=trim(GETPOST("search_all", 'alpha'));
$search=array();
foreach($object->fields as $key => $val)
{
- if (GETPOST('search_'.$key,'alpha')) $search[$key]=GETPOST('search_'.$key,'alpha');
+ if (GETPOST('search_'.$key, 'alpha')) $search[$key]=GETPOST('search_'.$key, 'alpha');
}
if (empty($action) && empty($id) && empty($ref)) $action='view';
@@ -76,7 +76,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be inclu
*/
$parameters=array();
-$reshook=$hookmanager->executeHooks('doActions',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
+$reshook=$hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
@@ -85,7 +85,7 @@ if (empty($reshook))
$permissiontoadd = $user->rights->website->write;
$permissiontodelete = $user->rights->website->delete;
- $backurlforlist = dol_buildpath('/website/websiteaccount_list.php',1);
+ $backurlforlist = dol_buildpath('/website/websiteaccount_list.php', 1);
// Actions cancel, add, update or delete
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
@@ -108,7 +108,7 @@ if (empty($reshook))
$form=new Form($db);
$formfile=new FormFile($db);
-llxHeader('','WebsiteAccount','');
+llxHeader('', 'WebsiteAccount', '');
// Example : Adding jquery code
print '