@@ -177,7 +177,7 @@ |
||
177 | 177 | $facavoir->fetch($facid); |
178 | 178 | $invoicecredits[] = $facavoir->getNomUrl(1); |
179 | 179 | } |
180 | - print ' ('.$langs->transnoentities("InvoiceHasAvoir") . implode(',', $invoicecredits) . ')'; |
|
180 | + print ' ('.$langs->transnoentities("InvoiceHasAvoir").implode(',', $invoicecredits).')'; |
|
181 | 181 | } |
182 | 182 | /* |
183 | 183 | if ($facidnext > 0) { |
@@ -29,9 +29,9 @@ |
||
29 | 29 | |
30 | 30 | // Load Dolibarr environment |
31 | 31 | require '../../main.inc.php'; |
32 | -require_once DOL_DOCUMENT_ROOT .'/product/class/product.class.php'; |
|
33 | -require_once DOL_DOCUMENT_ROOT .'/societe/class/societe.class.php'; |
|
34 | -require_once DOL_DOCUMENT_ROOT .'/fourn/class/fournisseur.class.php'; |
|
32 | +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; |
|
33 | +require_once DOL_DOCUMENT_ROOT.'/societe/class/societe.class.php'; |
|
34 | +require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php'; |
|
35 | 35 | |
36 | 36 | |
37 | 37 | // Load translation files required by the page |
@@ -65,7 +65,7 @@ |
||
65 | 65 | |
66 | 66 | $startdate = $enddate = ''; |
67 | 67 | if (GETPOST('startdatemonth')) { |
68 | - $startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int')); |
|
68 | + $startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int')); |
|
69 | 69 | } |
70 | 70 | if (GETPOST('enddatemonth')) { |
71 | 71 | $enddate = dol_mktime(23, 59, 59, GETPOST('enddatemonth', 'int'), GETPOST('enddateday', 'int'), GETPOST('enddateyear')); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | //if (! defined("MAIN_AUTHENTICATION_MODE")) define('MAIN_AUTHENTICATION_MODE', 'aloginmodule'); // Force authentication handler |
41 | 41 | //if (! defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET |
42 | 42 | //if (! defined('NOBROWSERNOTIF')) define('NOBROWSERNOTIF', '1'); // Disable browser notification |
43 | -if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions |
|
43 | +if (!defined('NOSESSION')) define('NOSESSION', '1'); // On CLI mode, no need to use web sessions |
|
44 | 44 | |
45 | 45 | |
46 | 46 | $sapi_type = php_sapi_name(); |
@@ -187,7 +187,7 @@ discard block |
||
187 | 187 | $maxfilesizearray = getMaxFileSizeArray(); |
188 | 188 | $maxmin = $maxfilesizearray['maxmin']; |
189 | 189 | if ($maxmin > 0) { |
190 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
190 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file |
|
191 | 191 | } |
192 | 192 | $texte .= ' <input type="file" name="uploadfile">'; |
193 | 193 | $texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -282,7 +282,7 @@ discard block |
||
282 | 282 | $newfiletmp = preg_replace('/template_/i', '', $newfiletmp); |
283 | 283 | $newfiletmp = preg_replace('/modele_/i', '', $newfiletmp); |
284 | 284 | |
285 | - $newfiletmp = $objectref . '_' . $newfiletmp; |
|
285 | + $newfiletmp = $objectref.'_'.$newfiletmp; |
|
286 | 286 | //$file=$dir.'/'.$newfiletmp.'.'.dol_print_date(dol_now(),'%Y%m%d%H%M%S').'.odt'; |
287 | 287 | |
288 | 288 | // Get extension (ods or odt) |
@@ -292,11 +292,11 @@ discard block |
||
292 | 292 | if ($format == '1') { |
293 | 293 | $format = '%Y%m%d%H%M%S'; |
294 | 294 | } |
295 | - $filename = $newfiletmp . '-' . dol_print_date(dol_now(), $format) . '.' . $newfileformat; |
|
295 | + $filename = $newfiletmp.'-'.dol_print_date(dol_now(), $format).'.'.$newfileformat; |
|
296 | 296 | } else { |
297 | - $filename = $newfiletmp . '.' . $newfileformat; |
|
297 | + $filename = $newfiletmp.'.'.$newfileformat; |
|
298 | 298 | } |
299 | - $file = $dir . '/' . $filename; |
|
299 | + $file = $dir.'/'.$filename; |
|
300 | 300 | //print "newdir=".$dir; |
301 | 301 | //print "newfile=".$newfile; |
302 | 302 | //print "file=".$file; |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | dol_mkdir($conf->mymodule->dir_temp); |
306 | 306 | if (!is_writable($conf->mymodule->dir_temp)) { |
307 | 307 | $this->error = $langs->transnoentities("ErrorFailedToWriteInTempDirectory", $conf->mymodule->dir_temp); |
308 | - dol_syslog('Error in write_file: ' . $this->error, LOG_ERR); |
|
308 | + dol_syslog('Error in write_file: '.$this->error, LOG_ERR); |
|
309 | 309 | return -1; |
310 | 310 | } |
311 | 311 |
@@ -85,14 +85,14 @@ discard block |
||
85 | 85 | // Get parameters |
86 | 86 | $id = GETPOST('id', 'int'); |
87 | 87 | $ref = GETPOST('ref', 'alpha'); |
88 | -$lineid = GETPOST('lineid', 'int'); |
|
88 | +$lineid = GETPOST('lineid', 'int'); |
|
89 | 89 | |
90 | 90 | $action = GETPOST('action', 'aZ09'); |
91 | 91 | $confirm = GETPOST('confirm', 'alpha'); |
92 | 92 | $cancel = GETPOST('cancel', 'aZ09'); |
93 | 93 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search |
94 | -$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
95 | -$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
94 | +$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used |
|
95 | +$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used |
|
96 | 96 | $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha'); |
97 | 97 | $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09'); |
98 | 98 | |
@@ -543,7 +543,7 @@ discard block |
||
543 | 543 | |
544 | 544 | // Clone |
545 | 545 | if ($permissiontoadd) { |
546 | - print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd); |
|
546 | + print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&token='.newToken(), '', $permissiontoadd); |
|
547 | 547 | } |
548 | 548 | |
549 | 549 | /* |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit; |
47 | 47 | $sortfield = GETPOST('sortfield', 'aZ09comma'); |
48 | 48 | $sortorder = GETPOST('sortorder', 'aZ09comma'); |
49 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
49 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
50 | 50 | $confirm = GETPOST('confirm', 'alpha'); |
51 | 51 | |
52 | 52 | $page = GETPOSTISSET('pageplusone') ? (GETPOST('pageplusone') - 1) : GETPOST("page", 'int'); |
@@ -254,12 +254,12 @@ discard block |
||
254 | 254 | foreach ($typeleaves as $key => $val) { |
255 | 255 | $labeltypes[$val['id']] = ($langs->trans($val['code']) != $val['code']) ? $langs->trans($val['code']) : $langs->trans($val['label']); |
256 | 256 | } |
257 | - $formquestion [] = array( 'type' => 'other', |
|
257 | + $formquestion [] = array('type' => 'other', |
|
258 | 258 | 'name' => 'typeofholiday', |
259 | 259 | 'label' => $langs->trans("Type"), |
260 | 260 | 'value' => $form->selectarray('typeholiday', $labeltypes, GETPOST('typeholiday', 'alpha'), 1) |
261 | 261 | ); |
262 | - $formquestion [] = array( 'type' => 'other', |
|
262 | + $formquestion [] = array('type' => 'other', |
|
263 | 263 | 'name' => 'nbdaysholydays', |
264 | 264 | 'label' => $langs->trans("NumberDayAddMass"), |
265 | 265 | 'value' => '<input name="nbdaysholidays" class="maxwidth75" id="nbdaysholidays" value="'.GETPOST('nbdaysholidays', 'int').'">' |
@@ -966,7 +966,7 @@ discard block |
||
966 | 966 | // Show field if not hidden |
967 | 967 | if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) { |
968 | 968 | $extratitle = $langs->trans($value); |
969 | - $arrayfields['ef.' . $key] = array('label' => $extratitle, 'checked' => 0, |
|
969 | + $arrayfields['ef.'.$key] = array('label' => $extratitle, 'checked' => 0, |
|
970 | 970 | 'position' => (end($arrayfields)['position'] + 1), |
971 | 971 | 'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key], |
972 | 972 | 'help' => $extrafields->attributes["product_fournisseur_price"]['help'][$key]); |
@@ -1079,8 +1079,8 @@ discard block |
||
1079 | 1079 | } else { |
1080 | 1080 | $extratitle = $langs->trans($value); |
1081 | 1081 | } |
1082 | - if (!empty($arrayfields['ef.' . $key]['checked'])) { |
|
1083 | - print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.' . $key, '', $param, '', $sortfield, $sortorder, 'right '); |
|
1082 | + if (!empty($arrayfields['ef.'.$key]['checked'])) { |
|
1083 | + print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right '); |
|
1084 | 1084 | $nbfields++; |
1085 | 1085 | } |
1086 | 1086 | } |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | } |
1090 | 1090 | |
1091 | 1091 | if (is_object($hookmanager)) { |
1092 | - $parameters = array('id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id, 'nbfields'=>$nbfields); |
|
1092 | + $parameters = array('id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id, 'nbfields'=>$nbfields); |
|
1093 | 1093 | $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); |
1094 | 1094 | } |
1095 | 1095 | print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch '); |
@@ -1258,7 +1258,7 @@ discard block |
||
1258 | 1258 | } |
1259 | 1259 | |
1260 | 1260 | if (is_object($hookmanager)) { |
1261 | - $parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id); |
|
1261 | + $parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id); |
|
1262 | 1262 | $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action); |
1263 | 1263 | } |
1264 | 1264 |
@@ -201,7 +201,7 @@ |
||
201 | 201 | $tmplotstatic->eatby = $objp->eatby; |
202 | 202 | |
203 | 203 | print '<tr class="oddeven">'; |
204 | - print '<td class="nowraponall">'.img_picto($langs->trans("Ref").' '.$objp->mid, 'movement', 'class="pictofixedwidth"').dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>'; |
|
204 | + print '<td class="nowraponall">'.img_picto($langs->trans("Ref").' '.$objp->mid, 'movement', 'class="pictofixedwidth"').dol_print_date($db->jdate($objp->datem), 'dayhour').'</td>'; |
|
205 | 205 | print '<td class="tdoverflowmax150">'; |
206 | 206 | print $producttmp->getNomUrl(1); |
207 | 207 | print "</td>\n"; |