Passed
Branch develop (d85e4e)
by Laurent
84:36
created
htdocs/expensereport/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 	}
95 95
 }
96 96
 
97
-$permissiontoadd = $user->rights->expensereport->creer;	// Used by the include of actions_dellink.inc.php
97
+$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php
98 98
 
99 99
 
100 100
 /*
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
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $fk_entrepot = GETPOST('fk_entrepot', 'int');
68 68
 
69 69
 // List all visible warehouses
70
-$resWar = $db->query("SELECT rowid FROM " . MAIN_DB_PREFIX . "entrepot WHERE entity IN (" . $db->sanitize(getEntity('stock')) .")");
70
+$resWar = $db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."entrepot WHERE entity IN (".$db->sanitize(getEntity('stock')).")");
71 71
 $listofqualifiedwarehousesid = "";
72 72
 $count = 0;
73 73
 while ($tmpobj = $db->fetch_object($resWar)) {
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 $sql .= ' FROM '.MAIN_DB_PREFIX.'product as p';
361 361
 $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s ON p.rowid = s.fk_product';
362 362
 $list_warehouse = (empty($listofqualifiedwarehousesid) ? '0' : $listofqualifiedwarehousesid);
363
-$sql .= ' AND s.fk_entrepot  IN ('.$db->sanitize($list_warehouse) .')';
363
+$sql .= ' AND s.fk_entrepot  IN ('.$db->sanitize($list_warehouse).')';
364 364
 
365 365
 //$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'entrepot AS ent ON s.fk_entrepot = ent.rowid AND ent.entity IN('.getEntity('stock').')';
366 366
 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 (!empty($conf->global->MAIN_MULTILANGS)) {
Please login to merge, or discard this patch.
htdocs/core/modules/modHRM.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
 
129 129
 		// Array to add new pages in new tabs
130 130
 		$this->tabs = array();
131
-		$this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user');  					// To add a new tab identified by code tabname1
131
+		$this->tabs[] = array('data'=>'user:+skill_tab:Skills:hrm:1:/hrm/skill_tab.php?id=__ID__&objecttype=user'); // To add a new tab identified by code tabname1
132 132
 		//$this->tabs[] = array('data'=>'job:+tabname1:Poste:mylangfile@hrm:1:/hrm/poste_list.php?fk_job=__ID__');  					// To add a new tab identified by code tabname1
133 133
 		// Example:
134 134
 		// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@hrm:$user->rights->hrm->read:/hrm/mynewtab1.php?id=__ID__');  					// To add a new tab identified by code tabname1
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
@@ -950,7 +950,7 @@  discard block
 block discarded – undo
950 950
 							// Show field if not hidden
951 951
 							if (!empty($extrafields->attributes["product_fournisseur_price"]['list'][$key]) && $extrafields->attributes["product_fournisseur_price"]['list'][$key] != 3) {
952 952
 								$extratitle = $langs->trans($value);
953
-								$arrayfields['ef.' . $key] = array('label'    => $extratitle, 'checked' => 0,
953
+								$arrayfields['ef.'.$key] = array('label'    => $extratitle, 'checked' => 0,
954 954
 																   'position' => (end($arrayfields)['position'] + 1),
955 955
 																   'langfile' => $extrafields->attributes["product_fournisseur_price"]['langfile'][$key],
956 956
 																   'help'     => $extrafields->attributes["product_fournisseur_price"]['help'][$key]);
@@ -1043,8 +1043,8 @@  discard block
 block discarded – undo
1043 1043
 								} else {
1044 1044
 									$extratitle = $langs->trans($value);
1045 1045
 								}
1046
-								if (!empty($arrayfields['ef.' . $key]['checked'])) {
1047
-									print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.' . $key, '', $param, '', $sortfield, $sortorder, 'right ');
1046
+								if (!empty($arrayfields['ef.'.$key]['checked'])) {
1047
+									print_liste_field_titre($extratitle, $_SERVER["PHP_SELF"], 'ef.'.$key, '', $param, '', $sortfield, $sortorder, 'right ');
1048 1048
 								}
1049 1049
 							}
1050 1050
 						}
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 				}
1053 1053
 
1054 1054
 				if (is_object($hookmanager)) {
1055
-					$parameters = array('id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id);
1055
+					$parameters = array('id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id);
1056 1056
 					$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action);
1057 1057
 				}
1058 1058
 				print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
@@ -1220,7 +1220,7 @@  discard block
 block discarded – undo
1220 1220
 						}
1221 1221
 
1222 1222
 						if (is_object($hookmanager)) {
1223
-							$parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn)?$id_fourn:''), 'prod_id'=>$object->id);
1223
+							$parameters = array('id_pfp'=>$productfourn->product_fourn_price_id, 'id_fourn'=>(!empty($id_fourn) ? $id_fourn : ''), 'prod_id'=>$object->id);
1224 1224
 							$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters, $object, $action);
1225 1225
 						}
1226 1226
 
Please login to merge, or discard this patch.
htdocs/core/extrafieldsinexport.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
 			case 'sellist':
49 49
 				$tmp = '';
50 50
 				$tmpparam = jsonOrUnserialize($obj->param); // $tmp may be array 'options' => array 'c_currencies:code_iso:code_iso' => null
51
-				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) &&  $tmpparam['options'] && is_array($tmpparam['options'])) {
51
+				if (is_array($tmpparam) && array_key_exists('options', $tmpparam) && $tmpparam['options'] && is_array($tmpparam['options'])) {
52 52
 					$tmpkeys = array_keys($tmpparam['options']);
53 53
 					$tmp = array_shift($tmpkeys);
54 54
 				}
Please login to merge, or discard this patch.
htdocs/document.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
  */
139 139
 
140 140
 // If we have a hash public (hashp), we guess the original_file.
141
-$ecmfile='';
141
+$ecmfile = '';
142 142
 if (!empty($hashp)) {
143 143
 	include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php';
144 144
 	$ecmfile = new EcmFiles($db);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 }
197 197
 
198 198
 // Security: Delete string ../ or ..\ into $original_file
199
-$original_file = preg_replace('/\.\.+/', '..', $original_file);	// Replace '... or more' with '..'
199
+$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..'
200 200
 $original_file = str_replace('../', '/', $original_file);
201 201
 $original_file = str_replace('..\\', '/', $original_file);
202 202
 
Please login to merge, or discard this patch.
htdocs/expensereport/card.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -68,9 +68,9 @@  discard block
 block discarded – undo
68 68
 
69 69
 $childids = $user->getAllChildIds(1);
70 70
 
71
-if (! empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) {
71
+if (!empty($conf->global->EXPENSEREPORT_PREFILL_DATES_WITH_CURRENT_MONTH)) {
72 72
 	if (empty($date_start)) {
73
-		$date_start = dol_mktime(0, 0, 0, (int) dol_print_date(dol_now(), '%m'),  1, (int) dol_print_date(dol_now(), '%Y'));
73
+		$date_start = dol_mktime(0, 0, 0, (int) dol_print_date(dol_now(), '%m'), 1, (int) dol_print_date(dol_now(), '%Y'));
74 74
 	}
75 75
 
76 76
 	if (empty($date_end)) {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 
118 118
 $upload_dir = $conf->expensereport->dir_output.'/'.dol_sanitizeFileName($object->ref);
119 119
 
120
-$projectRequired = $conf->projet->enabled && ! empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED);
120
+$projectRequired = $conf->projet->enabled && !empty($conf->global->EXPENSEREPORT_PROJECT_IS_REQUIRED);
121 121
 $fileRequired = !empty($conf->global->EXPENSEREPORT_FILE_IS_REQUIRED);
122 122
 
123 123
 if ($object->id > 0) {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 }
141 141
 $result = restrictedArea($user, 'expensereport', $object->id, 'expensereport');
142 142
 
143
-$permissiontoadd = $user->rights->expensereport->creer;	// Used by the include of actions_dellink.inc.php
143
+$permissiontoadd = $user->rights->expensereport->creer; // Used by the include of actions_dellink.inc.php
144 144
 
145 145
 
146 146
 /*
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 
288 288
 			if ($overlappingExpenseReportID > 0) {
289 289
 				$error++;
290
-				setEventMessages($langs->trans("ErrorDoubleDeclaration").' <a href="'.$_SERVER['PHP_SELF'].'?id='.$overlappingExpenseReportID.'">'. $langs->trans('ShowTrip').'</a>', null, 'errors');
290
+				setEventMessages($langs->trans("ErrorDoubleDeclaration").' <a href="'.$_SERVER['PHP_SELF'].'?id='.$overlappingExpenseReportID.'">'.$langs->trans('ShowTrip').'</a>', null, 'errors');
291 291
 				$action = 'create';
292 292
 			}
293 293
 		}
@@ -1602,7 +1602,7 @@  discard block
 block discarded – undo
1602 1602
 
1603 1603
 			print '</form>';
1604 1604
 		} else {
1605
-			$taxlessUnitPriceDisabled = ! empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? ' disabled' : '';
1605
+			$taxlessUnitPriceDisabled = !empty($conf->global->EXPENSEREPORT_FORCE_LINE_AMOUNTS_INCLUDING_TAXES_ONLY) ? ' disabled' : '';
1606 1606
 
1607 1607
 			print dol_get_fiche_head($head, 'card', $langs->trans("ExpenseReport"), -1, 'trip');
1608 1608
 
@@ -2341,7 +2341,7 @@  discard block
 block discarded – undo
2341 2341
 
2342 2342
 						// Quantity
2343 2343
 						print '<td class="right">';
2344
-						print '<input type="text" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($line->qty).'" />';  // We must be able to enter decimal qty
2344
+						print '<input type="text" min="0" class="right maxwidth50" name="qty" value="'.dol_escape_htmltag($line->qty).'" />'; // We must be able to enter decimal qty
2345 2345
 						print '</td>';
2346 2346
 
2347 2347
 						//print '<td class="right">'.$langs->trans('AmountHT').'</td>';
Please login to merge, or discard this patch.
htdocs/admin/defaultvalues.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 
140 140
 	if (!$error) {
141 141
 		if ($action == 'add' || (GETPOST('add') && $action != 'update')) {
142
-			$object->type=$mode;
143
-			$object->user_id=0;
144
-			$object->page=$defaulturl;
145
-			$object->param=$defaultkey;
146
-			$object->value=$defaultvalue;
147
-			$object->entity=$conf->entity;
148
-			$result=$object->create($user);
149
-			if ($result<0) {
142
+			$object->type = $mode;
143
+			$object->user_id = 0;
144
+			$object->page = $defaulturl;
145
+			$object->param = $defaultkey;
146
+			$object->value = $defaultvalue;
147
+			$object->entity = $conf->entity;
148
+			$result = $object->create($user);
149
+			if ($result < 0) {
150 150
 				$action = '';
151 151
 				setEventMessages($object->error, $object->errors, 'errors');
152 152
 			} else {
@@ -158,14 +158,14 @@  discard block
 block discarded – undo
158 158
 			}
159 159
 		}
160 160
 		if (GETPOST('actionmodify')) {
161
-			$object->id=$id;
162
-			$object->type=$mode;
163
-			$object->page=$urlpage;
164
-			$object->param=$key;
165
-			$object->value=$value;
166
-			$object->entity=$conf->entity;
167
-			$result=$object->update($user);
168
-			if ($result<0) {
161
+			$object->id = $id;
162
+			$object->type = $mode;
163
+			$object->page = $urlpage;
164
+			$object->param = $key;
165
+			$object->value = $value;
166
+			$object->entity = $conf->entity;
167
+			$result = $object->update($user);
168
+			if ($result < 0) {
169 169
 				$action = '';
170 170
 				setEventMessages($object->error, $object->errors, 'errors');
171 171
 			} else {
@@ -181,9 +181,9 @@  discard block
 block discarded – undo
181 181
 
182 182
 // Delete line from delete picto
183 183
 if ($action == 'delete') {
184
-	$object->id=$id;
185
-	$result=$object->delete($user);
186
-	if ($result<0) {
184
+	$object->id = $id;
185
+	$result = $object->delete($user);
186
+	if ($result < 0) {
187 187
 		$action = '';
188 188
 		setEventMessages($object->error, $object->errors, 'errors');
189 189
 	}
@@ -353,7 +353,7 @@  discard block
 block discarded – undo
353 353
 print '</td>'."\n";
354 354
 print '</tr>'."\n";
355 355
 
356
-$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode,'t.entity'=>array($user->entity,$conf->entity)));
356
+$result = $object->fetchAll($sortorder, $sortfield, 0, 0, array('t.type'=>$mode, 't.entity'=>array($user->entity, $conf->entity)));
357 357
 
358 358
 if (!is_array($result) && $result < 0) {
359 359
 	setEventMessages($object->error, $object->errors, 'errors');
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 
386 386
 		// Actions
387 387
 		print '<td class="center">';
388
-		if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id)	{
388
+		if ($action != 'edit' || GETPOST('rowid') != $defaultvalue->id) {
389 389
 			print '<a class="editfielda marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$defaultvalue->id.'&entity='.$defaultvalue->entity.'&mode='.$mode.'&action=edit&token='.newToken().'">'.img_edit().'</a>';
390 390
 			print '<a class="marginleftonly marginrightonly" href="'.$_SERVER['PHP_SELF'].'?rowid='.$defaultvalue->id.'&entity='.$defaultvalue->entity.'&mode='.$mode.'&action=delete&token='.newToken().'">'.img_delete().'</a>';
391 391
 		} else {
Please login to merge, or discard this patch.
htdocs/core/class/smtps.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 			$host = 'tls://'.$host;
465 465
 		}
466 466
 
467
-		$hosth = $host;	// so for example 'localhost' or 'smtp-relay.gmail.com'
467
+		$hosth = $host; // so for example 'localhost' or 'smtp-relay.gmail.com'
468 468
 
469 469
 		if (!empty($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
470 470
 			if (!is_numeric($conf->global->MAIL_SMTP_USE_FROM_FOR_HELO)) {
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 				}
559 559
 				// Most servers expect a 2nd pass of EHLO after TLS is established to get another time
560 560
 				// the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS.
561
-				if (! $_retVal = $this->socket_send_str('EHLO '.$hosth, '250')) {
561
+				if (!$_retVal = $this->socket_send_str('EHLO '.$hosth, '250')) {
562 562
 					$this->_setErr(126, '"'.$hosth.'" does not support authenticated connections. Error after sending EHLO '.$hosth);
563 563
 					return $_retVal;
564 564
 				}
Please login to merge, or discard this patch.