Completed
Branch develop (806e3a)
by
unknown
17:40
created
htdocs/core/get_menudiv.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 $title = $langs->trans("Menu");
85 85
 
86 86
 // URL http://mydolibarr/core/get_menudiv.php?dol_use_jmobile=1 can be used for tests
87
-$head = '<!-- Menu -->'."\n";	// This is used by DoliDroid to know page is a menu page
87
+$head = '<!-- Menu -->'."\n"; // This is used by DoliDroid to know page is a menu page
88 88
 $arrayofjs = array();
89 89
 $arrayofcss = array();
90 90
 top_htmlhead($head, $title, 0, 0, $arrayofjs, $arrayofcss);
Please login to merge, or discard this patch.
htdocs/holiday/month_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@
 block discarded – undo
149 149
 $sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
150 150
 $sql .= " AND (";
151 151
 $sql .= " (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
152
-$sql .= " OR";	// For leave over several months
152
+$sql .= " OR"; // For leave over several months
153 153
 $sql .= " (date_format(cp.date_debut, '%Y-%m') < '".$db->escape($year_month)."' AND date_format(cp.date_fin, '%Y-%m') > '".$db->escape($year_month)."') ";
154 154
 $sql .= " )";
155 155
 if (!empty($search_ref)) {
Please login to merge, or discard this patch.
htdocs/reception/card.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -916,7 +916,7 @@
 block discarded – undo
916 916
 			/**
917 917
 			 * @var array $suffix2numAsked map HTTP query parameter suffixes (like '1_0') to line indices so that
918 918
 			 *                             extrafields from HTTP query can be assigned to the correct dispatch line
919
-			*/
919
+			 */
920 920
 			$suffix2numAsked = array();
921 921
 			$dispatchLines = array();
922 922
 
Please login to merge, or discard this patch.
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 $line_id = GETPOST('lineid', 'int') ?GETPOST('lineid', 'int') : '';
87 87
 $facid = GETPOST('facid', 'int');
88 88
 
89
-$action	= GETPOST('action', 'alpha');
89
+$action = GETPOST('action', 'alpha');
90 90
 //Select mail models is same action as presend
91 91
 if (GETPOST('modelselected')) {
92 92
 	$action = 'presend';
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 
343 343
 		// Loop lines to calculate $totalqty
344 344
 		for ($i = 1; $i <= $num; $i++) {
345
-			$idl = "idl".$i;	// id line source
345
+			$idl = "idl".$i; // id line source
346 346
 
347 347
 			//$sub_qty = array();
348 348
 			//$subtotalqty = 0;
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
 			//$j = 0;
351 351
 			//$batch = "batchl".$i."_0";
352 352
 			//$stockLocation = "ent1".$i."_0";
353
-			$qty = "qtyl".$i;	// qty
353
+			$qty = "qtyl".$i; // qty
354 354
 
355 355
 			//reception line for product with no batch management and no multiple stock location
356 356
 			if (GETPOST($qty, 'alpha') > 0) {
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
 		if ($totalqty > 0) {  // There is at least one thing to ship
366 366
 			for ($i = 1; $i <= $num; $i++) {
367
-				$idl = "idl".$i;	// id line source
367
+				$idl = "idl".$i; // id line source
368 368
 				$lineToTest = '';
369 369
 				$lineId = GETPOST($idl, 'int');
370 370
 				foreach ($objectsrc->lines as $linesrc) {
@@ -971,35 +971,35 @@  discard block
 block discarded – undo
971 971
 				$reg = array();
972 972
 				if (preg_match('/^product_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
973 973
 					$numAsked++;
974
-					$paramSuffix = $reg[1] . '_' . $reg[2];
974
+					$paramSuffix = $reg[1].'_'.$reg[2];
975 975
 					$suffix2numAsked[$paramSuffix] = $numAsked;
976 976
 
977 977
 					// $numline=$reg[2] + 1; // line of product
978 978
 					$numline = $numAsked;
979 979
 
980
-					$prod = "product_" . $paramSuffix;
981
-					$qty = "qty_" . $paramSuffix;
982
-					$ent = "entrepot_" . $paramSuffix;
983
-					$pu = "pu_" . $paramSuffix; // This is unit price including discount
984
-					$fk_commandefourndet = "fk_commandefourndet_" . $paramSuffix;
980
+					$prod = "product_".$paramSuffix;
981
+					$qty = "qty_".$paramSuffix;
982
+					$ent = "entrepot_".$paramSuffix;
983
+					$pu = "pu_".$paramSuffix; // This is unit price including discount
984
+					$fk_commandefourndet = "fk_commandefourndet_".$paramSuffix;
985 985
 					$dispatchLines[$numAsked] = array('paramSuffix'=>$paramSuffix, 'prod' => GETPOST($prod, 'int'), 'qty' => price2num(GETPOST($qty), 'MS'), 'ent' => GETPOST($ent, 'int'), 'pu' => price2num(GETPOST($pu), 'MU'), 'comment' => GETPOST('comment'), 'fk_commandefourndet' => GETPOST($fk_commandefourndet, 'int'));
986 986
 				}
987 987
 
988 988
 				// with batch module enabled and product with lot/serial
989 989
 				if (preg_match('/^product_batch_([0-9]+)_([0-9]+)$/i', $key, $reg)) {
990 990
 					$numAsked++;
991
-					$paramSuffix = $reg[1] . '_' . $reg[2];
991
+					$paramSuffix = $reg[1].'_'.$reg[2];
992 992
 					$suffix2numAsked[$paramSuffix] = $numAsked;
993 993
 
994 994
 					// eat-by date dispatch
995 995
 					// $numline=$reg[2] + 1; // line of product
996 996
 					$numline = $numAsked;
997 997
 
998
-					$prod = 'product_batch_' . $paramSuffix;
999
-					$qty = 'qty_' . $paramSuffix;
1000
-					$ent = 'entrepot_' . $paramSuffix;
1001
-					$pu = 'pu_' . $paramSuffix;
1002
-					$lot = 'lot_number_' . $paramSuffix;
998
+					$prod = 'product_batch_'.$paramSuffix;
999
+					$qty = 'qty_'.$paramSuffix;
1000
+					$ent = 'entrepot_'.$paramSuffix;
1001
+					$pu = 'pu_'.$paramSuffix;
1002
+					$lot = 'lot_number_'.$paramSuffix;
1003 1003
 					$dDLUO = dol_mktime(12, 0, 0, GETPOST('dluo_'.$paramSuffix.'month', 'int'), GETPOST('dluo_'.$paramSuffix.'day', 'int'), GETPOST('dluo_'.$paramSuffix.'year', 'int'));
1004 1004
 					$dDLC = dol_mktime(12, 0, 0, GETPOST('dlc_'.$paramSuffix.'month', 'int'), GETPOST('dlc_'.$paramSuffix.'day', 'int'), GETPOST('dlc_'.$paramSuffix.'year', 'int'));
1005 1005
 					$fk_commandefourndet = 'fk_commandefourndet_'.$paramSuffix;
@@ -1033,7 +1033,7 @@  discard block
 block discarded – undo
1033 1033
 			// Note that if an extrafield with the same name exists in the origin supplier order line, the value
1034 1034
 			// from the HTTP query will be ignored
1035 1035
 			foreach ($suffix2numAsked as $suffix => $n) {
1036
-				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_' . $suffix, '');
1036
+				$dispatchLines[$n]['array_options'] = $extrafields->getOptionalsFromPost('commande_fournisseur_dispatch', '_'.$suffix, '');
1037 1037
 			}
1038 1038
 
1039 1039
 			print '<script type="text/javascript">
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 			// $objectsrc->lines contains the line of the purchase order
1098 1098
 			// $dispatchLines is list of lines with dispatching detail (with product, qty and warehouse). One purchase order line may have n of this dispatch lines.
1099 1099
 
1100
-			$arrayofpurchaselinealreadyoutput= array();
1100
+			$arrayofpurchaselinealreadyoutput = array();
1101 1101
 
1102 1102
 			// $_POST contains fk_commandefourndet_X_Y    where Y is num of product line and X is number of splitted line
1103 1103
 			$indiceAsked = 1;
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 
1139 1139
 					print '<input type="hidden" name="productl'.$indiceAsked.'" value="'.$line->fk_product.'">';
1140 1140
 
1141
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1141
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1142 1142
 						print '<input type="hidden" name="productid'.$indiceAsked.'" value="'.$line->fk_product.'">';
1143 1143
 
1144 1144
 						// Show product and description
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 					print '</td>';
1161 1161
 				} else {
1162 1162
 					print "<td>";
1163
-					if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1163
+					if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1164 1164
 						if ($type == 1) {
1165 1165
 							$text = img_object($langs->trans('Service'), 'service');
1166 1166
 						} else {
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
 
1190 1190
 				// Qty in source purchase order line
1191 1191
 				print '<td class="center">';
1192
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1192
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1193 1193
 					print $line->qty;
1194 1194
 				}
1195 1195
 				print '<input type="hidden" name="fk_commandefournisseurdet'.$indiceAsked.'" value="'.$line->id.'">';
@@ -1201,7 +1201,7 @@  discard block
 block discarded – undo
1201 1201
 				// Qty already received
1202 1202
 				print '<td class="center">';
1203 1203
 				$quantityDelivered = $objectsrc->receptions[$line->id];
1204
-				if (! array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1204
+				if (!array_key_exists($line->id, $arrayofpurchaselinealreadyoutput)) {	// Add test to avoid to show qty twice
1205 1205
 					print $quantityDelivered;
1206 1206
 				}
1207 1207
 				print '<input name="qtydelivered'.$indiceAsked.'" id="qtydelivered'.$indiceAsked.'" type="hidden" value="'.$quantityDelivered.'">';
@@ -2037,7 +2037,7 @@  discard block
 block discarded – undo
2037 2037
 							$detail = $form->textwithtooltip(img_picto('', 'object_barcode').' '.$langs->trans("DetailBatchNumber"), $batchinfo);
2038 2038
 						}
2039 2039
 					}
2040
-					print $detail . '</td>';
2040
+					print $detail.'</td>';
2041 2041
 				} else {
2042 2042
 					print '<td></td>';
2043 2043
 				}
Please login to merge, or discard this patch.
htdocs/core/modules/propale/doc/pdf_azur.modules.php 2 patches
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -459,8 +459,12 @@  discard block
 block discarded – undo
459 459
 
460 460
 
461 461
 					$creator_info = $langs->trans("CaseFollowedBy").' '.$tmpuser->getFullName($langs);
462
-					if ($tmpuser->email) $creator_info .= ',  '.$langs->trans("EMail").': '.$tmpuser->email;
463
-					if ($tmpuser->office_phone) $creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone;
462
+					if ($tmpuser->email) {
463
+						$creator_info .= ',  '.$langs->trans("EMail").': '.$tmpuser->email;
464
+					}
465
+					if ($tmpuser->office_phone) {
466
+						$creator_info .= ', '.$langs->trans("Phone").': '.$tmpuser->office_phone;
467
+					}
464 468
 
465 469
 					$notetoshow = dol_concatdesc($notetoshow, $creator_info);
466 470
 				}
@@ -1439,7 +1443,9 @@  discard block
 block discarded – undo
1439 1443
 		global $conf, $langs;
1440 1444
 
1441 1445
 		$ltrdirection = 'L';
1442
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1446
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1447
+			$ltrdirection = 'R';
1448
+		}
1443 1449
 
1444 1450
 		// Load traductions files required by page
1445 1451
 		$outputlangs->loadLangs(array("main", "propal", "companies", "bills"));
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 					if (!empty($conf->mycompany->multidir_output[$object->entity])) {
319 319
 						$logodir = $conf->mycompany->multidir_output[$object->entity];
320 320
 					}
321
-					$pagecount = $pdf->setSourceFile($logodir.'/' . getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
321
+					$pagecount = $pdf->setSourceFile($logodir.'/'.getDolGlobalString('MAIN_ADD_PDF_BACKGROUND'));
322 322
 					$tplidx = $pdf->importPage(1);
323 323
 				}
324 324
 
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
 			$pdf->SetXY($this->marge_gauche, $posy);
909 909
 			$titre = $outputlangs->transnoentities("DateDeliveryPlanned").':';
910 910
 			$pdf->MultiCell(80, 4, $titre, 0, 'L');
911
-			$pdf->SetFont('', '', $default_font_size -$diffsizetitle);
911
+			$pdf->SetFont('', '', $default_font_size - $diffsizetitle);
912 912
 			$pdf->SetXY($posxval, $posy);
913 913
 			$dlp = dol_print_date($object->delivery_date, $displaydate, false, $outputlangs, true);
914 914
 			$pdf->MultiCell(80, 4, $dlp, 0, 'L');
@@ -1663,7 +1663,7 @@  discard block
 block discarded – undo
1663 1663
 
1664 1664
 			$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
1665 1665
 
1666
-			$mode =  'target';
1666
+			$mode = 'target';
1667 1667
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
1668 1668
 
1669 1669
 			// Show recipient
Please login to merge, or discard this patch.
htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	$h = 0;
38 38
 	$head = array();
39 39
 
40
-	$withProjectUrl='';
41
-	if ($with_project>0) {
40
+	$withProjectUrl = '';
41
+	if ($with_project > 0) {
42 42
 		$withProjectUrl = "&withproject=1";
43 43
 	}
44 44
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 	$head[$h][2] = 'conferenceorbooth';
132 132
 	// Enable caching of conf or booth count attendees
133 133
 	$nbAttendees = 0;
134
-	$nbConferenceOrBooth= 0;
134
+	$nbConferenceOrBooth = 0;
135 135
 	require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php';
136 136
 	$cachekey = 'count_conferenceorbooth_project_'.$object->id;
137 137
 	$dataretrieved = dol_getcache($cachekey);
@@ -139,14 +139,14 @@  discard block
 block discarded – undo
139 139
 		$nbAttendees = $dataretrieved;
140 140
 	} else {
141 141
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
142
-		$conforbooth=new ConferenceOrBooth($db);
142
+		$conforbooth = new ConferenceOrBooth($db);
143 143
 		$result = $conforbooth->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
144
-		if (!is_array($result) && $result<0) {
144
+		if (!is_array($result) && $result < 0) {
145 145
 			setEventMessages($conforbooth->error, $conforbooth->errors, 'errors');
146 146
 		} else {
147 147
 			$nbConferenceOrBooth = count($result);
148 148
 		}
149
-		dol_setcache($cachekey, $nbConferenceOrBooth, 120);	// If setting cache fails, this is not a problem, so we do not test result.
149
+		dol_setcache($cachekey, $nbConferenceOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result.
150 150
 	}
151 151
 	if ($nbConferenceOrBooth > 0) {
152 152
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbConferenceOrBooth.'</span>';
@@ -165,14 +165,14 @@  discard block
 block discarded – undo
165 165
 		$nbAttendees = $dataretrieved;
166 166
 	} else {
167 167
 		require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
168
-		$attendees=new ConferenceOrBoothAttendee($db);
168
+		$attendees = new ConferenceOrBoothAttendee($db);
169 169
 		$result = $attendees->fetchAll('', '', 0, 0, array('t.fk_project'=>$object->id));
170
-		if (!is_array($result) && $result<0) {
170
+		if (!is_array($result) && $result < 0) {
171 171
 			setEventMessages($attendees->error, $attendees->errors, 'errors');
172 172
 		} else {
173 173
 			$nbAttendees = count($result);
174 174
 		}
175
-		dol_setcache($cachekey, $nbAttendees, 120);	// If setting cache fails, this is not a problem, so we do not test result.
175
+		dol_setcache($cachekey, $nbAttendees, 120); // If setting cache fails, this is not a problem, so we do not test result.
176 176
 	}
177 177
 	if ($nbAttendees > 0) {
178 178
 		$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbAttendees.'</span>';
Please login to merge, or discard this patch.
htdocs/workstation/class/workstation.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -856,7 +856,9 @@
 block discarded – undo
856 856
 
857 857
 		$statusType = 'status'.$status;
858 858
 		//if ($status == self::STATUS_DISABLED) $statusType = 'status6';
859
-		if ($status == self::STATUS_ENABLED) $statusType = 'status4';
859
+		if ($status == self::STATUS_ENABLED) {
860
+			$statusType = 'status4';
861
+		}
860 862
 
861 863
 		return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
862 864
 	}
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	/**
98 98
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
99 99
 	 */
100
-	public $fields=array(
100
+	public $fields = array(
101 101
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
102 102
 		'entity' => array('type'=>'integer', 'label'=>'Entity', 'enabled'=>1, 'visible'=>0, 'position'=>5, 'notnull'=>1, 'default'=>'1', 'index'=>1),
103 103
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>1, 'noteditable'=>'0', 'default'=>'', 'index'=>1, 'searchall'=>1, 'showoncombobox'=>'1', 'comment'=>"Reference of object"),
@@ -111,14 +111,14 @@  discard block
 block discarded – undo
111 111
 		'fk_user_modif' => array('type'=>'integer:User:user/class/user.class.php', 'label'=>'UserModif', 'enabled'=>'1', 'position'=>511, 'notnull'=>-1, 'visible'=>-2,),
112 112
 		'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>'1', 'position'=>512, 'notnull'=>-1, 'visible'=>-2,),
113 113
 		'nb_operators_required' => array('type'=>'integer', 'label'=>'NbOperatorsRequired', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1,),
114
-		'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp','label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
114
+		'thm_operator_estimated' => array('type'=>'double', 'help'=>'THMOperatorEstimatedHelp', 'label'=>'THMOperatorEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
115 115
 		'thm_machine_estimated' => array('type'=>'double', 'help'=>'THMMachineEstimatedHelp', 'label'=>'THMMachineEstimated', 'enabled'=>'1', 'position'=>50, 'notnull'=>0, 'visible'=>1, 'css'=>'right'),
116 116
 		'status' => array('type'=>'smallint', 'label'=>'Status', 'enabled'=>'1', 'position'=>1000, 'default'=>1, 'notnull'=>1, 'visible'=>1, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Disabled', '1'=>'Enabled'),),
117 117
 	);
118 118
 	public $rowid;
119 119
 	public $ref;
120 120
 	public $label;
121
-	public $type;	// HUMAN, MACHINE, ...
121
+	public $type; // HUMAN, MACHINE, ...
122 122
 
123 123
 	public $date_creation;
124 124
 	public $tms;
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 		// Usergroups
458 458
 		$groups = GETPOST('groups', 'array:int');
459 459
 		WorkstationUserGroup::deleteAllGroupsOfWorkstation($this->id);
460
-		$this->usergroups=array();
460
+		$this->usergroups = array();
461 461
 
462 462
 		foreach ($groups as $id_group) {
463 463
 			$ws_usergroup = new WorkstationUserGroup($this->db);
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 		// Resources
471 471
 		$resources = GETPOST('resources', 'array:int');
472 472
 		WorkstationResource::deleteAllResourcesOfWorkstation($this->id);
473
-		$this->resources=array();
473
+		$this->resources = array();
474 474
 		if (!empty($resources)) {
475 475
 			foreach ($resources as $id_resource) {
476 476
 				$ws_resource = new WorkstationResource($this->db);
@@ -637,7 +637,7 @@  discard block
 block discarded – undo
637 637
 				$label = $langs->trans("ShowWorkstation");
638 638
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
639 639
 			}
640
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
640
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
641 641
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
642 642
 		} else {
643 643
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
@@ -794,7 +794,7 @@  discard block
 block discarded – undo
794 794
 		if (!empty($conf->global->WORKSTATION_WORKSTATION_ADDON)) {
795 795
 			$mybool = false;
796 796
 
797
-			$file = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON') . ".php";
797
+			$file = getDolGlobalString('WORKSTATION_WORKSTATION_ADDON').".php";
798 798
 			$classname = $conf->global->WORKSTATION_WORKSTATION_ADDON;
799 799
 
800 800
 			// Include file with class
Please login to merge, or discard this patch.
htdocs/core/modules/takepos/mod_takepos_ref_simple.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function getExample()
78 78
 	{
79
-		return $this->prefix.'0-0501-0001';		// TC0-0501-0001
79
+		return $this->prefix.'0-0501-0001'; // TC0-0501-0001
80 80
 	}
81 81
 
82 82
 	/**
@@ -92,10 +92,10 @@  discard block
 block discarded – undo
92 92
 		$pryymm = '';
93 93
 		$max = '';
94 94
 
95
-		$pos_source = 0;	// POS source = Terminal ID
95
+		$pos_source = 0; // POS source = Terminal ID
96 96
 
97 97
 		// First, we get the max value
98
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
98
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
99 99
 
100 100
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
101 101
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
@@ -135,10 +135,10 @@  discard block
 block discarded – undo
135 135
 	{
136 136
 		global $db;
137 137
 
138
-		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0;	// POS source = Terminal ID
138
+		$pos_source = is_object($invoice) && $invoice->pos_source > 0 ? $invoice->pos_source : 0; // POS source = Terminal ID
139 139
 
140 140
 		// First, we get the max value
141
-		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1;	// So posindice is position after TCX-YYMM-
141
+		$posindice = strlen($this->prefix.$pos_source.'-____-') + 1; // So posindice is position after TCX-YYMM-
142 142
 		$sql  = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max"; // This is standard SQL
143 143
 		$sql .= " FROM ".MAIN_DB_PREFIX."facture";
144 144
 		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix.$pos_source."-____-%")."'";
Please login to merge, or discard this patch.
htdocs/societe/ajax/company.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
 	$match = preg_grep('/('.preg_quote($htmlname, '/').'[0-9]+)/', array_keys($_GET));
106 106
 	sort($match);
107 107
 
108
-	$id = (!empty($match[0]) ? $match[0] : '');		// Take first key found into GET array with matching $htmlname123
108
+	$id = (!empty($match[0]) ? $match[0] : ''); // Take first key found into GET array with matching $htmlname123
109 109
 
110 110
 	// When used from jQuery, the search term is added as GET param "term".
111 111
 	$searchkey = (($id && GETPOST($id, 'alpha')) ? GETPOST($id, 'alpha') : (($htmlname && GETPOST($htmlname, 'alpha')) ?GETPOST($htmlname, 'alpha') : ''));
Please login to merge, or discard this patch.
htdocs/hrm/lib/hrm_skillrank.lib.php 2 patches
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -108,14 +108,14 @@  discard block
 block discarded – undo
108 108
 {
109 109
 	global $db, $conf, $langs;
110 110
 
111
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skill.class.php';
112
-	require_once DOL_DOCUMENT_ROOT . '/hrm/class/skilldet.class.php';
111
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skill.class.php';
112
+	require_once DOL_DOCUMENT_ROOT.'/hrm/class/skilldet.class.php';
113 113
 
114 114
 	// On charge les différentes notes possibles pour la compétence $fk_skill
115 115
 	$skilldet = new Skilldet($db);
116 116
 	$Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, array('customsql'=>'fk_skill = '.$fk_skill));
117 117
 
118
-	if (!is_array($Lines) && $Lines<0) {
118
+	if (!is_array($Lines) && $Lines < 0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121 121
 	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
@@ -128,29 +128,29 @@  discard block
 block discarded – undo
128 128
 				continue;
129 129
 			}
130 130
 
131
-			$ret .= '<span title="' . $line->description . '" class="radio_js_bloc_number ' . $inputname . '_' . $line->fk_skill;
131
+			$ret .= '<span title="'.$line->description.'" class="radio_js_bloc_number '.$inputname.'_'.$line->fk_skill;
132 132
 			$ret .= $line->rankorder == $selected_rank ? ' selected' : '';
133
-			$ret .= '">' . $line->rankorder . '</span>';
133
+			$ret .= '">'.$line->rankorder.'</span>';
134 134
 		}
135 135
 
136 136
 		if ($mode == 'edit') {
137 137
 			$ret .= '
138
-		<input type="hidden" id="' . $inputname . '_' . $fk_skill . '" name="' . $inputname . '[' . $fk_skill . ']" value="' . $selected_rank . '">
138
+		<input type="hidden" id="' . $inputname.'_'.$fk_skill.'" name="'.$inputname.'['.$fk_skill.']" value="'.$selected_rank.'">
139 139
 		<script type="text/javascript">
140 140
 			$(document).ready(function(){
141 141
 				$(".radio_js_bloc_number").tooltip();
142 142
 				var error,same;
143
-				$(".' . $inputname . '_' . $fk_skill . '").on("click",function(){
143
+				$(".' . $inputname.'_'.$fk_skill.'").on("click",function(){
144 144
 					same=false;
145 145
 					val = $(this).html();
146 146
 					if($(this).hasClass("selected"))same=true;
147
-					$(".' . $inputname . '_' . $fk_skill . '").removeClass("selected");
147
+					$(".' . $inputname.'_'.$fk_skill.'").removeClass("selected");
148 148
 					if(same)
149 149
 					{
150
-						$("#' . $inputname . '_' . $fk_skill . '").val("");
150
+						$("#' . $inputname.'_'.$fk_skill.'").val("");
151 151
 					}else {
152 152
 						$(this).addClass("selected");
153
-						$("#' . $inputname . '_' . $fk_skill . '").val(val);
153
+						$("#' . $inputname.'_'.$fk_skill.'").val(val);
154 154
 					}
155 155
 				});
156 156
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 	if (!is_array($Lines) && $Lines<0) {
119 119
 		setEventMessages($skilldet->error, $skilldet->errors, 'errors');
120 120
 	}
121
-	if (empty($Lines)) return $langs->trans('SkillHasNoLines');
121
+	if (empty($Lines)) {
122
+		return $langs->trans('SkillHasNoLines');
123
+	}
122 124
 
123 125
 	$ret = '<!-- field jquery --><span title="'.$langs->trans('NA').'" class="radio_js_bloc_number '.$inputname.'_'.$fk_skill.(empty($selected_rank) ? ' selected' : '').'">';
124 126
 	$ret .= $langs->trans('NA');
Please login to merge, or discard this patch.