';
/*
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index 9420651df8b..3d0b10d05c2 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -316,7 +316,7 @@ class BillOfMaterials extends CommonObject
if ($key=='t.rowid') {
$sqlwhere[] = $key . '='. $value;
}
- elseif (strpos($key,'date') !== false) {
+ elseif (strpos($key, 'date') !== false) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
}
elseif ($key=='customsql') {
@@ -412,13 +412,13 @@ class BillOfMaterials extends CommonObject
$label.= '
';
$label.= '
' . $langs->trans('Ref') . ': ' . $this->ref;
- $url = dol_buildpath('/bom/bom_card.php',1).'?id='.$this->id;
+ $url = dol_buildpath('/bom/bom_card.php', 1).'?id='.$this->id;
if ($option != 'nolink')
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
- if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
@@ -455,7 +455,7 @@ class BillOfMaterials extends CommonObject
global $action,$hookmanager;
$hookmanager->initHooks(array('bomdao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
- $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint;
else $result .= $hookmanager->resPrint;
@@ -899,7 +899,7 @@ class BillOfMaterialsLine extends CommonObject
if ($key=='t.rowid') {
$sqlwhere[] = $key . '='. $value;
}
- elseif (strpos($key,'date') !== false) {
+ elseif (strpos($key, 'date') !== false) {
$sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
}
elseif ($key=='customsql') {
@@ -1001,7 +1001,7 @@ class BillOfMaterialsLine extends CommonObject
{
// Add param to save lastsearch_values or not
$add_save_lastsearch_values=($save_lastsearch_value == 1 ? 1 : 0);
- if ($save_lastsearch_value == -1 && preg_match('/list\.php/',$_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
+ if ($save_lastsearch_value == -1 && preg_match('/list\.php/', $_SERVER["PHP_SELF"])) $add_save_lastsearch_values=1;
if ($add_save_lastsearch_values) $url.='&save_lastsearch_values=1';
}
@@ -1038,7 +1038,7 @@ class BillOfMaterialsLine extends CommonObject
global $action,$hookmanager;
$hookmanager->initHooks(array('bomlinedao'));
$parameters=array('id'=>$this->id, 'getnomurl'=>$result);
- $reshook=$hookmanager->executeHooks('getNomUrl',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
+ $reshook=$hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook > 0) $result = $hookmanager->resPrint;
else $result .= $hookmanager->resPrint;
diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php
index ff8820a93b3..ee93c6525f8 100644
--- a/htdocs/bom/lib/bom.lib.php
+++ b/htdocs/bom/lib/bom.lib.php
@@ -97,7 +97,7 @@ function bomPrepareHead($object)
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
$upload_dir = $conf->bom->dir_output . "/bom/" . dol_sanitizeFileName($object->ref);
- $nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview.*\.png)$'));
+ $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
$nbLinks=Link::count($db, $object->element, $object->id);
$head[$h][0] = dol_buildpath("/bom/bom_document.php", 1).'?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
@@ -117,9 +117,8 @@ function bomPrepareHead($object)
//); // to add new tab
//$this->tabs = array(
// 'entity:-tabname:Title:@bom:/bom/mypage.php?id=__ID__'
- //); // to remove a tab
- complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom@bom');
-
- return $head;
-}
+ //); // to remove a tab
+ complete_head_from_modules($conf, $langs, $object, $head, $h, 'bom@bom');
+ return $head;
+}
\ No newline at end of file
diff --git a/htdocs/core/modules/modBom.class.php b/htdocs/core/modules/modBom.class.php
index e9cb8cc631a..d9b27b729e3 100644
--- a/htdocs/core/modules/modBom.class.php
+++ b/htdocs/core/modules/modBom.class.php
@@ -59,7 +59,7 @@ class modBom extends DolibarrModules
//$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily")));
// Module label (no space allowed), used if translation string 'ModuleBomName' not found (Bom is name of module).
- $this->name = preg_replace('/^mod/i','',get_class($this));
+ $this->name = preg_replace('/^mod/i', '', get_class($this));
// Module description, used if translation string 'ModuleBomDesc' not found (Bom is name of module).
$this->description = "Bill of Materials (BOM) definitions for Manufacturing Resource Planning";
// Used only if file README.md and README-LL.md not found.
diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php
index b3cb0ce3cd9..ecc76f29d73 100644
--- a/htdocs/datapolicy/class/datapolicy.class.php
+++ b/htdocs/datapolicy/class/datapolicy.class.php
@@ -219,44 +219,46 @@ Class DataPolicy
*/
function sendMailDataPolicyCompany($societe)
{
- global $langs, $conf, $db, $user;
+ global $langs, $conf, $db, $user;
- $error = 0;
+ $error = 0;
- $from = $user->getFullName($langs) . ' <' . $user->email . '>';
+ $from = $user->getFullName($langs) . ' <' . $user->email . '>';
- $sendto = $societe->email;
+ $sendto = $societe->email;
- $code= md5($societe->email);
- if (!empty($societe->default_lang)) {
- $l = $societe->default_lang;
- } else {
- $l = $langs->defaultlang;
- }
- $s = "DATAPOLICIESSUBJECT_" . $l;
- $ma = "DATAPOLICIESCONTENT_" . $l;
- $la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
- $lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
+ $code= md5($societe->email);
+ if (!empty($societe->default_lang)) {
+ $l = $societe->default_lang;
+ } else {
+ $l = $langs->defaultlang;
+ }
+ $s = "DATAPOLICIESSUBJECT_" . $l;
+ $ma = "DATAPOLICIESCONTENT_" . $l;
+ $la = 'TXTLINKDATAPOLICIESACCEPT_' . $l;
+ $lr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
- $subject = $conf->global->$s;
- $message = $conf->global->$ma;
- $linka = $conf->global->$la;
- $linkr = $conf->global->$lr;
- $sendtocc = $sendtobcc = '';
- $filepath = $mimetype = $filename = array();
- $deliveryreceipt = 0;
+ $subject = $conf->global->$s;
+ $message = $conf->global->$ma;
+ $linka = $conf->global->$la;
+ $linkr = $conf->global->$lr;
+ $sendtocc = $sendtobcc = '';
+ $filepath = $mimetype = $filename = array();
+ $deliveryreceipt = 0;
- $substitutionarray = array(
+ $substitutionarray = array(
'__LINKACCEPT__' => '
'.$linka.'',
'__LINKREFUSED__' => '
'.$linkr.'',
- );
- $subject = make_substitutions($subject, $substitutionarray);
- $message = make_substitutions($message, $substitutionarray);
+ );
+ $subject = make_substitutions($subject, $substitutionarray);
+ $message = make_substitutions($message, $substitutionarray);
- $actiontypecode = 'AC_EMAIL';
- $actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
- if ($message) {
- if ($sendtocc) {
+ $actiontypecode = 'AC_EMAIL';
+ $actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
+ if ($message)
+ {
+ if ($sendtocc)
+ {
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
}
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
@@ -264,12 +266,12 @@ Class DataPolicy
$actionmsg .= dol_concatdesc($actionmsg, $message);
}
- // Send mail
- require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
- $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
- if ($mailfile->error) {
+ // Send mail
+ require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
+ $mailfile = new CMailFile($subject, $sendto, $from, $message, $filepath, $mimetype, $filename, $sendtocc, $sendtobcc, $deliveryreceipt, -1);
+ if ($mailfile->error) {
$resultmasssend .= '
' . $mailfile->error . '
';
- } else {
+ } else {
$result4 = $mailfile->sendfile();
if (!$error) {
@@ -279,8 +281,8 @@ Class DataPolicy
} else {
dol_print_error($db);
}
- }
- setEventMessage($resultmasssend);
+ }
+ setEventMessage($resultmasssend);
}
/**
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index 3bf3ae7b42f..0b3a1c101e8 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -82,7 +82,7 @@ $search_array_options=$extrafields->getOptionalsFromPost($object->table_element,
if (! $sortfield) $sortfield="t.".key($object->fields); // Set here default search field. By default 1st field in definition.
if (! $sortorder) $sortorder="ASC";
-if (GETPOST('search_fk_status','alpha') == 'non_closed') $_GET['search_fk_statut'][]='openall'; // For backward compatibility
+if (GETPOST('search_fk_status', 'alpha') == 'non_closed') $_GET['search_fk_statut'][]='openall'; // For backward compatibility
// Initialize array of search criterias
$search_all=trim(GETPOST("search_all", 'alpha'));