@@ -244,7 +244,7 @@ |
||
244 | 244 | |
245 | 245 | $this->id = $obj->rowid; |
246 | 246 | $this->ref = $obj->rowid; |
247 | - $this->date_start = $this->db->jdate($obj->date_start); |
|
247 | + $this->date_start = $this->db->jdate($obj->date_start); |
|
248 | 248 | $this->date_end = $this->db->jdate($obj->date_end); |
249 | 249 | $this->label = $obj->label; |
250 | 250 | $this->statut = $obj->status; |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | $backtopage = GETPOST('backtopage'); |
49 | 49 | |
50 | 50 | $id = GETPOST('id', 'int'); |
51 | -$element = GETPOST('element', 'alpha'); // 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule) |
|
51 | +$element = GETPOST('element', 'alpha'); // 'myobject' (myobject=mymodule) or 'myobject@mymodule' or 'myobject_mysubobject' (myobject=mymodule) |
|
52 | 52 | $field = GETPOST('field', 'alpha'); |
53 | 53 | $value = GETPOST('value', 'int'); |
54 | 54 | $format = 'int'; |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | // Load object according to $id and $element |
57 | 57 | $object = fetchObjectByElement($id, $element); |
58 | 58 | if (!is_object($object)) { |
59 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
59 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Object not found."); // This includes the exit. |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | $object->fields[$field] = array('type' => $format, 'enabled' => 1); |
@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | if (!empty($user->socid)) { |
75 | 75 | $socid = $user->socid; |
76 | 76 | if (!empty($object->socid) && $socid != $object->socid) { |
77 | - httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
77 | + httponly_accessforbidden("Access on object not allowed for this external user."); // This includes the exit. |
|
78 | 78 | } |
79 | 79 | } |
80 | 80 | |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } elseif ($element == 'product' && in_array($field, array('tosell', 'tobuy', 'tobatch'))) { // Special case for products |
86 | 86 | restrictedArea($user, 'produit|service', $object, 'product&product', '', '', 'rowid'); |
87 | 87 | } else { |
88 | - httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
88 | + httponly_accessforbidden("Bad value for combination of parameters element/field: Field not supported."); // This includes the exit. |
|
89 | 89 | } |
90 | 90 | |
91 | 91 |
@@ -60,7 +60,7 @@ |
||
60 | 60 | $showempty = 0; |
61 | 61 | } |
62 | 62 | |
63 | - $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1); |
|
63 | + $return['value'] = $formProject->selectInvoiceAndLine($invoice_id, 0, 'invoiceid', 'invoicelineid', 'maxwidth500', array(), 1); |
|
64 | 64 | //$return['num'] = $form->num; |
65 | 65 | //$return['error'] = $form->error; |
66 | 66 |
@@ -57,7 +57,7 @@ |
||
57 | 57 | //print $object->id.' - '.$object->module.' - '.$object->element.' - '.$object->table_element.' - '.$usesublevelpermission."\n"; |
58 | 58 | |
59 | 59 | // Security check |
60 | -$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
60 | +$result = restrictedArea($user, $object->module, $object, $object->table_element, $usesublevelpermission, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
61 | 61 | if (!$result) { |
62 | 62 | httponly_accessforbidden('Not allowed by restrictArea'); |
63 | 63 | } |
@@ -40,7 +40,7 @@ |
||
40 | 40 | |
41 | 41 | |
42 | 42 | $id = GETPOST('id', 'aZ09'); |
43 | -$objecttype = GETPOST('objecttype', 'aZ09arobase'); // 'module' or 'myobject@mymodule', 'mymodule_myobject' |
|
43 | +$objecttype = GETPOST('objecttype', 'aZ09arobase'); // 'module' or 'myobject@mymodule', 'mymodule_myobject' |
|
44 | 44 | |
45 | 45 | $params = array('fromajaxtooltip' => 1); |
46 | 46 | if (GETPOSTISSET('infologin')) { |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | $flowChunkSize = GETPOST('flowChunkSize', 'alpha'); |
56 | 56 | $flowTotalSize = GETPOST('flowTotalSize', 'alpha'); |
57 | 57 | |
58 | -$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
58 | +$result = restrictedArea($user, $module, 0, '', 0, 'fk_soc', 'rowid', 0, 1); // Call with mode return |
|
59 | 59 | |
60 | 60 | if ($action != 'upload') { |
61 | 61 | httponly_accessforbidden("Param action must be 'upload'"); |
@@ -160,10 +160,10 @@ discard block |
||
160 | 160 | |
161 | 161 | // check that all the parts are present |
162 | 162 | // the size of the last part is between chunkSize and 2*$chunkSize |
163 | - if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) { |
|
163 | + if ($total_files * $chunkSize >= ($totalSize - $chunkSize + 1)) { |
|
164 | 164 | // create the final destination file |
165 | 165 | if (($fp = fopen($upload_dir.'/'.$fileName, 'w')) !== false) { |
166 | - for ($i=1; $i<=$total_files; $i++) { |
|
166 | + for ($i = 1; $i <= $total_files; $i++) { |
|
167 | 167 | fwrite($fp, file_get_contents($temp_dir.'/'.$fileName.'.part'.$i)); |
168 | 168 | dol_syslog('writing chunk '.$i); |
169 | 169 | } |
@@ -43,13 +43,13 @@ discard block |
||
43 | 43 | if ($massaction == 'preclonetasks') { |
44 | 44 | $selected = ''; |
45 | 45 | foreach (GETPOST('toselect') as $tmpselected) { |
46 | - $selected .= '&selected[]=' . $tmpselected; |
|
46 | + $selected .= '&selected[]='.$tmpselected; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | $formquestion = array( |
50 | - array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project') .': ', 'value' => $form->selectProjects('', 'projectid', '', '', '', '', '', '', '', 1, 1)), |
|
50 | + array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project').': ', 'value' => $form->selectProjects('', 'projectid', '', '', '', '', '', '', '', 1, 1)), |
|
51 | 51 | ); |
52 | - print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . $selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590); |
|
52 | + print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id.$selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | if ($massaction == 'preaffecttag' && isModEnabled('category')) { |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | $result = $objecttmp->fetch($toselectid); |
181 | 181 | if ($result > 0) { |
182 | 182 | $listofselectedid[$toselectid] = $toselectid; |
183 | - $thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid); // For proposal, order, invoice, conferenceorbooth, ... |
|
183 | + $thirdpartyid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid); // For proposal, order, invoice, conferenceorbooth, ... |
|
184 | 184 | if (in_array($objecttmp->element, array('societe', 'conferenceorboothattendee'))) { |
185 | 185 | $thirdpartyid = $objecttmp->id; |
186 | 186 | } elseif ($objecttmp->element == 'contact') { |
@@ -261,14 +261,14 @@ discard block |
||
261 | 261 | $formmail->withfile = 0; |
262 | 262 | $formmail->withmaindocfile = 0; // Add a checkbox "Attach also main document" |
263 | 263 | } else { |
264 | - $formmail->withfile = 1; // $formmail->withfile = 2 to allow to upload files is not yet supported in mass action |
|
264 | + $formmail->withfile = 1; // $formmail->withfile = 2 to allow to upload files is not yet supported in mass action |
|
265 | 265 | // Add a checkbox "Attach also main document" |
266 | 266 | if (isset($withmaindocfilemail)) { |
267 | 267 | $formmail->withmaindocfile = $withmaindocfilemail; |
268 | 268 | } else { // Do an automatic definition of $formmail->withmaindocfile |
269 | 269 | $formmail->withmaindocfile = 1; |
270 | 270 | if ($objecttmp->element != 'societe') { |
271 | - $formmail->withfile = '<span class="hideonsmartphone opacitymedium">' . $langs->trans("OnlyPDFattachmentSupported") . '</span>'; |
|
271 | + $formmail->withfile = '<span class="hideonsmartphone opacitymedium">'.$langs->trans("OnlyPDFattachmentSupported").'</span>'; |
|
272 | 272 | $formmail->withmaindocfile = -1; // Add a checkbox "Attach also main document" but not checked by default |
273 | 273 | } |
274 | 274 | } |
@@ -296,7 +296,7 @@ discard block |
||
296 | 296 | |
297 | 297 | // Tableau des parametres complementaires du post |
298 | 298 | $formmail->param['action'] = $action; |
299 | - $formmail->param['models'] = $modelmail; // the filter to know which kind of template emails to show. 'none' means no template suggested. |
|
299 | + $formmail->param['models'] = $modelmail; // the filter to know which kind of template emails to show. 'none' means no template suggested. |
|
300 | 300 | $formmail->param['models_id'] = GETPOST('modelmailselected', 'int') ? GETPOST('modelmailselected', 'int') : '-1'; |
301 | 301 | $formmail->param['id'] = join(',', $arrayofselected); |
302 | 302 | // $formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id; |
@@ -339,12 +339,12 @@ discard block |
||
339 | 339 | $outputShowOutputFields = '<div class="extrafields-inputs">'; |
340 | 340 | |
341 | 341 | foreach ($extrafields_list as $extraKey => $extraLabel) { |
342 | - $outputShowOutputFields.= '<div class="mass-action-extrafield" data-extrafield="'.$extraKey.'" style="display:none;" >'; |
|
343 | - $outputShowOutputFields.= '<br><span>'. $langs->trans('NewValue').'</span>'; |
|
344 | - $outputShowOutputFields.= $extrafields->showInputField($extraKey, '', '', $keysuffix, '', 0, $objecttmp->id, $objecttmp->table_element); |
|
345 | - $outputShowOutputFields.= '</div>'; |
|
342 | + $outputShowOutputFields .= '<div class="mass-action-extrafield" data-extrafield="'.$extraKey.'" style="display:none;" >'; |
|
343 | + $outputShowOutputFields .= '<br><span>'.$langs->trans('NewValue').'</span>'; |
|
344 | + $outputShowOutputFields .= $extrafields->showInputField($extraKey, '', '', $keysuffix, '', 0, $objecttmp->id, $objecttmp->table_element); |
|
345 | + $outputShowOutputFields .= '</div>'; |
|
346 | 346 | } |
347 | - $outputShowOutputFields.= '<script> |
|
347 | + $outputShowOutputFields .= '<script> |
|
348 | 348 | jQuery(function($) { |
349 | 349 | $("#extrafield-key-to-update").on(\'change\',function(){ |
350 | 350 | let selectedExtrtafield = $(this).val(); |
@@ -355,7 +355,7 @@ discard block |
||
355 | 355 | }); |
356 | 356 | }); |
357 | 357 | </script>'; |
358 | - $outputShowOutputFields.= '</div>'; |
|
358 | + $outputShowOutputFields .= '</div>'; |
|
359 | 359 | |
360 | 360 | |
361 | 361 |
@@ -215,7 +215,7 @@ discard block |
||
215 | 215 | |
216 | 216 | $html_id = !empty($object->id) ? $object->element.'_extras_'.$tmpkeyextra.'_'.$object->id : ''; |
217 | 217 | |
218 | - print '<td id="' . $html_id . '" class="valuefield ' . $object->element . '_extras_' . $tmpkeyextra . ' wordbreakimp"' . (!empty($cols) ? ' colspan="' . $cols . '"' : '') . '>'; |
|
218 | + print '<td id="'.$html_id.'" class="valuefield '.$object->element.'_extras_'.$tmpkeyextra.' wordbreakimp"'.(!empty($cols) ? ' colspan="'.$cols.'"' : '').'>'; |
|
219 | 219 | |
220 | 220 | // Convert date into timestamp format |
221 | 221 | if (in_array($extrafields->attributes[$object->table_element]['type'][$tmpkeyextra], array('date'))) { |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | if ($object->table_element == 'societe') { |
244 | 244 | $fieldid = 'socid'; |
245 | 245 | } |
246 | - print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"] . '?' . $fieldid . '=' . $object->id . '" method="post" name="formextra">'; |
|
246 | + print '<form enctype="multipart/form-data" action="'.$_SERVER["PHP_SELF"].'?'.$fieldid.'='.$object->id.'" method="post" name="formextra">'; |
|
247 | 247 | print '<input type="hidden" name="action" value="update_extras">'; |
248 | 248 | print '<input type="hidden" name="attribute" value="'.$tmpkeyextra.'">'; |
249 | 249 | print '<input type="hidden" name="token" value="'.newToken().'">'; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | $sql .= " WHERE u.entity IN (".getEntity('adherent').")"; |
94 | 94 | $sql .= " AND u.statut = ".Adherent::STATUS_VALIDATED; |
95 | 95 | $sql .= dolSqlDateFilter('u.birth', 0, $tmparray['mon'], 0); |
96 | - $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
96 | + $sql .= " ORDER BY daya ASC"; // We want to have date of the month sorted by the day without taking into consideration the year |
|
97 | 97 | $sql .= $this->db->plimit($max, 0); |
98 | 98 | |
99 | 99 | dol_syslog(get_class($this)."::loadBox", LOG_DEBUG); |