@@ -404,7 +404,7 @@ |
||
404 | 404 | include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; |
405 | 405 | // End add extra fields object |
406 | 406 | $this->export_sql_start[$r] = 'SELECT DISTINCT '; |
407 | - $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; |
|
407 | + $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s'; |
|
408 | 408 | if (is_object($user) && empty($user->rights->societe->client->voir)) { |
409 | 409 | $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; |
410 | 410 | } |
@@ -107,7 +107,7 @@ |
||
107 | 107 | $out .= '<option value="'.$obj->rowid.'" selected>'.$labeltoshow.'</option>'; |
108 | 108 | } else { |
109 | 109 | $disabled = 0; |
110 | - if (!$obj->fk_statut > 0 && ! $draftonly) { |
|
110 | + if (!$obj->fk_statut > 0 && !$draftonly) { |
|
111 | 111 | $disabled = 1; |
112 | 112 | $labeltoshow .= ' ('.$langs->trans("Draft").')'; |
113 | 113 | } |
@@ -241,7 +241,7 @@ |
||
241 | 241 | |
242 | 242 | |
243 | 243 | $title = $langs->trans('BOM'); |
244 | -$help_url ='EN:Module_BOM'; |
|
244 | +$help_url = 'EN:Module_BOM'; |
|
245 | 245 | llxHeader('', $title, $help_url); |
246 | 246 | |
247 | 247 | // Part to create |
@@ -272,13 +272,13 @@ |
||
272 | 272 | } |
273 | 273 | } else { |
274 | 274 | if (preg_match('/(_dtstart|_dtend)$/', $key) && $search[$key] != '') { |
275 | - $columnName=preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
275 | + $columnName = preg_replace('/(_dtstart|_dtend)$/', '', $key); |
|
276 | 276 | if (preg_match('/^(date|timestamp|datetime)/', $object->fields[$columnName]['type'])) { |
277 | 277 | if (preg_match('/_dtstart$/', $key)) { |
278 | - $sql .= " AND t." . $columnName . " >= '" . $db->idate($search[$key]) . "'"; |
|
278 | + $sql .= " AND t.".$columnName." >= '".$db->idate($search[$key])."'"; |
|
279 | 279 | } |
280 | 280 | if (preg_match('/_dtend$/', $key)) { |
281 | - $sql .= " AND t." . $columnName . " <= '" . $db->idate($search[$key]) . "'"; |
|
281 | + $sql .= " AND t.".$columnName." <= '".$db->idate($search[$key])."'"; |
|
282 | 282 | } |
283 | 283 | } |
284 | 284 | } |
@@ -136,7 +136,7 @@ |
||
136 | 136 | $dataseries = dol_sort_array($dataseries, 1, 'desc'); |
137 | 137 | |
138 | 138 | // Merge all entrie after the $KEEPNFIRST one into one entry called "Other..." (to avoid to have too much entries in graphic). |
139 | -$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
139 | +$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain |
|
140 | 140 | $i = 0; |
141 | 141 | if (count($dataseries) > ($KEEPNFIRST + 1)) { |
142 | 142 | foreach ($dataseries as $key => $val) { |
@@ -24,7 +24,7 @@ discard block |
||
24 | 24 | * \brief Widget of scheduled jobs |
25 | 25 | */ |
26 | 26 | |
27 | -include_once DOL_DOCUMENT_ROOT . '/core/boxes/modules_boxes.php'; |
|
27 | +include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php'; |
|
28 | 28 | |
29 | 29 | |
30 | 30 | /** |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | $this->info_box_head = array('text' => $langs->trans("BoxScheduledJobs", $max)); |
81 | 81 | |
82 | 82 | if ($user->rights->cron->read) { |
83 | - include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php'; |
|
83 | + include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php'; |
|
84 | 84 | $cronstatic = new Cronjob($this->db); |
85 | 85 | $resultarray = array(); |
86 | 86 | |
87 | 87 | $result = 0; |
88 | 88 | $sql = "SELECT t.rowid, t.datelastrun, t.datenextrun, t.datestart,"; |
89 | 89 | $sql .= " t.label, t.status, t.test, t.lastresult"; |
90 | - $sql .= " FROM " . MAIN_DB_PREFIX . "cronjob as t"; |
|
90 | + $sql .= " FROM ".MAIN_DB_PREFIX."cronjob as t"; |
|
91 | 91 | $sql .= " WHERE status <> ".$cronstatic::STATUS_DISABLED; |
92 | 92 | $sql .= " AND entity IN (0, ".$conf->entity.")"; |
93 | 93 | $sql .= $this->db->order("t.datelastrun", "DESC"); |
@@ -176,7 +176,7 @@ discard block |
||
176 | 176 | $this->info_box_contents[0][0] = array( |
177 | 177 | 'td' => '', |
178 | 178 | 'maxlength' => 500, |
179 | - 'text' => ($this->db->lasterror() . ' sql=' . $sql) |
|
179 | + 'text' => ($this->db->lasterror().' sql='.$sql) |
|
180 | 180 | ); |
181 | 181 | } |
182 | 182 | } else { |
@@ -116,10 +116,10 @@ discard block |
||
116 | 116 | |
117 | 117 | if (!$error) { |
118 | 118 | setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); |
119 | - $action = ''; // To avoid to execute next actions |
|
119 | + $action = ''; // To avoid to execute next actions |
|
120 | 120 | } else { |
121 | 121 | setEventMessages($langs->trans("Error"), null, 'errors'); |
122 | - $action = ''; // To avoid to execute next actions |
|
122 | + $action = ''; // To avoid to execute next actions |
|
123 | 123 | } |
124 | 124 | } |
125 | 125 | |
@@ -134,10 +134,10 @@ discard block |
||
134 | 134 | |
135 | 135 | if (!$error) { |
136 | 136 | setEventMessages($langs->trans("SetupSaved"), null, 'mesgs'); |
137 | - $action = ''; // To avoid to execute next actions |
|
137 | + $action = ''; // To avoid to execute next actions |
|
138 | 138 | } else { |
139 | 139 | setEventMessages($langs->trans("Error"), null, 'errors'); |
140 | - $action = ''; // To avoid to execute next actions |
|
140 | + $action = ''; // To avoid to execute next actions |
|
141 | 141 | } |
142 | 142 | } |
143 | 143 |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | $sql .= " AND entity = ".$conf->entity; |
92 | 92 | |
93 | 93 | $resql = $db->query($sql); |
94 | - if ($resql) { |
|
94 | + if ($resql) { |
|
95 | 95 | $obj = $db->fetch_object($resql); |
96 | 96 | if ($obj) { |
97 | 97 | $max = intval($obj->max); |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $sql .= " AND entity = ".$conf->entity; |
128 | 128 | |
129 | 129 | $resql = $db->query($sql); |
130 | - if ($resql) { |
|
130 | + if ($resql) { |
|
131 | 131 | $obj = $db->fetch_object($resql); |
132 | 132 | if ($obj) { |
133 | 133 | $max = intval($obj->max); |
@@ -127,7 +127,7 @@ |
||
127 | 127 | $sql .= " AND entity = ".$conf->entity; |
128 | 128 | |
129 | 129 | $resql = $db->query($sql); |
130 | - if ($resql) { |
|
130 | + if ($resql) { |
|
131 | 131 | $obj = $db->fetch_object($resql); |
132 | 132 | if ($obj) { |
133 | 133 | $max = intval($obj->max); |