Completed
Branch develop (f5af02)
by
unknown
17:35
created
template/core/modules/mymodule/doc/doc_generic_myobject_odt.modules.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_card.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 			/*
Please login to merge, or discard this patch.
htdocs/holiday/define_holiday.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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').'">'
Please login to merge, or discard this patch.
htdocs/product/fournisseurs.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
htdocs/product/stock/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@
 block discarded – undo
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";
Please login to merge, or discard this patch.
htdocs/product/stock/replenish.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
 $fk_entrepot = GETPOST('fk_entrepot', 'int');
69 69
 
70 70
 // List all visible warehouses
71
-$resWar = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "entrepot WHERE entity IN (" . $db->sanitize(getEntity('stock')) .")");
71
+$resWar = $db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."entrepot WHERE entity IN (".$db->sanitize(getEntity('stock')).")");
72 72
 $listofqualifiedwarehousesid = "";
73 73
 $count = 0;
74 74
 while ($tmpobj = $db->fetch_object($resWar)) {
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
362 362
 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product';
363 363
 $list_warehouse = (empty($listofqualifiedwarehousesid) ? '0' : $listofqualifiedwarehousesid);
364
-$sql .= ' AND s.fk_entrepot  IN ('.$db->sanitize($list_warehouse) .')';
364
+$sql .= ' AND s.fk_entrepot  IN ('.$db->sanitize($list_warehouse).')';
365 365
 
366 366
 //$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot AS ent ON s.fk_entrepot = ent.rowid AND ent.entity IN('.getEntity('stock').')';
367 367
 if (!empty($conf->global->STOCK_ALLOW_ADD_LIMIT_STOCK_BY_WAREHOUSE) && $fk_entrepot > 0) {
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 			exit;
801 801
 		}
802 802
 
803
-		$prod->load_stock('warehouseopen, warehouseinternal'.(!$usevirtualstock?', novirtual':''), $draftchecked);
803
+		$prod->load_stock('warehouseopen, warehouseinternal'.(!$usevirtualstock ? ', novirtual' : ''), $draftchecked);
804 804
 
805 805
 		// Multilangs
806 806
 		if (getDolGlobalInt('MAIN_MULTILANGS')) {
Please login to merge, or discard this patch.
htdocs/product/stock/productlot_note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
 
34 34
 // Get parameters
35 35
 $id = GETPOST('id', 'int');
36
-$ref        = GETPOST('ref', 'alpha');
36
+$ref = GETPOST('ref', 'alpha');
37 37
 $action = GETPOST('action', 'aZ09');
38 38
 
39 39
 // Initialize technical objects
Please login to merge, or discard this patch.
htdocs/product/index.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -341,9 +341,9 @@
 block discarded – undo
341 341
 				$product_static->status_buy = $objp->tobuy;
342 342
 				$product_static->status_batch = $objp->tobatch;
343 343
 
344
-				$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read');
344
+				$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read');
345 345
 				if ($product_static->isService()) {
346
-					$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read');
346
+					$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read');
347 347
 				}
348 348
 
349 349
 				// Multilangs
Please login to merge, or discard this patch.
htdocs/fichinter/stats/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -288,7 +288,7 @@
 block discarded – undo
288 288
 	print '<tr class="oddeven" height="24">';
289 289
 	print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$year.'&amp;mode='.$mode.($socid > 0 ? '&socid='.$socid : '').($userid > 0 ? '&userid='.$userid : '').'">'.$year.'</a></td>';
290 290
 	print '<td class="right">'.$val['nb'].'</td>';
291
-	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']): "0").'%</td>';
291
+	print '<td class="right opacitylow" style="'.((!isset($val['nb_diff']) || $val['nb_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['nb_diff']) ? round($val['nb_diff']) : "0").'%</td>';
292 292
 	print '<td class="right">'.price(price2num($val['total'], 'MT'), 1).'</td>';
293 293
 	print '<td class="right opacitylow" style="'.((!isset($val['total_diff']) || $val['total_diff'] >= 0) ? 'color: green;' : 'color: red;').'">'.(isset($val['total_diff']) ? round($val['total_diff']) : "0").'%</td>';
294 294
 	print '<td class="right">'.price(price2num($val['avg'], 'MT'), 1).'</td>';
Please login to merge, or discard this patch.