Passed
Branch develop (d85e4e)
by Laurent
84:36
created
htdocs/compta/prelevement/factures.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -221,7 +221,7 @@
 block discarded – undo
221 221
 	$i = 0;
222 222
 
223 223
 	if ($limit > 0 && $limit != $conf->liste_limit) {
224
-		$param.='&limit='.urlencode($limit);
224
+		$param .= '&limit='.urlencode($limit);
225 225
 	}
226 226
 	$param = "&id=".urlencode($id);
227 227
 
Please login to merge, or discard this patch.
htdocs/public/project/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@
 block discarded – undo
239 239
 	print '<input type="submit" value="'.$langs->trans("ViewAndVote").'" id="viewandvote" name="viewandvote" class="button width500">';
240 240
 }
241 241
 
242
-if (! $foundaction) {
242
+if (!$foundaction) {
243 243
 	print '<span class="opacitymedium">'.$langs->trans("NoPublicActionsAllowedForThisEvent").'</span>';
244 244
 }
245 245
 
Please login to merge, or discard this patch.
htdocs/multicurrency/multicurrency_rate.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 $id_rate_selected = GETPOST('id_rate', 'int');
48 48
 $sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
49 49
 $search_date_sync = dol_mktime(0, 0, 0, GETPOST('search_date_syncmonth', 'int'), GETPOST('search_date_syncday', 'int'), GETPOST('search_date_syncyear', 'int'));
50
-$search_date_sync_end	= dol_mktime(0, 0, 0, GETPOST('search_date_sync_endmonth', 'int'), GETPOST('search_date_sync_endday', 'int'), GETPOST('search_date_sync_endyear', 'int'));
50
+$search_date_sync_end = dol_mktime(0, 0, 0, GETPOST('search_date_sync_endmonth', 'int'), GETPOST('search_date_sync_endday', 'int'), GETPOST('search_date_sync_endyear', 'int'));
51 51
 $search_rate		= GETPOST('search_rate', 'alpha');
52 52
 $search_code		= GETPOST('search_code', 'alpha');
53 53
 $multicurrency_code = GETPOST('multicurrency_code', 'alpha');
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 	if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
211 211
 		$sall = "";
212 212
 		$search_date_sync = "";
213
-		$search_date_sync_end="";
213
+		$search_date_sync_end = "";
214 214
 		$search_rate = "";
215 215
 		$search_code = "";
216 216
 		$search_array_options = array();
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 $sql .= ' FROM '.MAIN_DB_PREFIX.'multicurrency_rate as cr ';
292 292
 $sql .= " INNER JOIN ".MAIN_DB_PREFIX."multicurrency AS m ON cr.fk_multicurrency = m.rowid";
293 293
 if ($sall) $sql .= natural_search(array_keys($fieldstosearchall), $sall);
294
-if ($search_date_sync && $search_date_sync_end ) {
294
+if ($search_date_sync && $search_date_sync_end) {
295 295
 	$sql .= " AND (cr.date_sync BETWEEN '".$db->idate($search_date_sync)."' AND '".$db->idate($search_date_sync_end)."')";
296 296
 } elseif ($search_date_sync && !$search_date_sync_end) {
297 297
 	$sql .= natural_search('cr.date_sync', $db->idate($search_date_sync));
@@ -348,9 +348,9 @@  discard block
 block discarded – undo
348 348
 	}
349 349
 
350 350
 	if ($search_date_sync) $param = "&search_date_sync=".$search_date_sync;
351
-	if ($search_date_sync_end) $param="&search_date_sync_end=".$search_date_sync_end;
351
+	if ($search_date_sync_end) $param = "&search_date_sync_end=".$search_date_sync_end;
352 352
 	if ($search_rate) $param = "&search_rate=".urlencode($search_rate);
353
-	if ($search_code != '') $param.="&search_code=".urlencode($search_code);
353
+	if ($search_code != '') $param .= "&search_code=".urlencode($search_code);
354 354
 
355 355
 	// Add $param from extra fields
356 356
 	include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
@@ -477,9 +477,9 @@  discard block
 block discarded – undo
477 477
 		// USER REQUEST UPDATE FOR THIS LINE
478 478
 		if ($action == "updateRate" && $obj->rowid == $id_rate_selected) {
479 479
 			//  var_dump($obj);
480
-			print ' <td><input class="minwidth200" name="dateinput" value="'. date('Y-m-d', dol_stringtotime($obj->date_sync)) .'" type="date"></td>';
481
-			print '<td>' . $form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true) . '</td>';
482
-			print ' <td><input type="text" min ="0" step="any" class="minwidth200" name="rateinput" value="' . dol_escape_htmltag($obj->rate) . '"></td>';
480
+			print ' <td><input class="minwidth200" name="dateinput" value="'.date('Y-m-d', dol_stringtotime($obj->date_sync)).'" type="date"></td>';
481
+			print '<td>'.$form->selectMultiCurrency($obj->code, 'multicurrency_code', 1, " code != '".$conf->currency."'", true).'</td>';
482
+			print ' <td><input type="text" min ="0" step="any" class="minwidth200" name="rateinput" value="'.dol_escape_htmltag($obj->rate).'"></td>';
483 483
 
484 484
 			print '<td class="center nowrap ">';
485 485
 			print '<input type="hidden" name="page" value="'.dol_escape_htmltag($page).'">';
@@ -497,26 +497,26 @@  discard block
 block discarded – undo
497 497
 			}
498 498
 
499 499
 			// code
500
-			if (! empty($arrayfields['m.code']['checked'])) {
500
+			if (!empty($arrayfields['m.code']['checked'])) {
501 501
 				print '<td class="tdoverflowmax200">';
502 502
 				print $obj->code." ".$obj->name;
503 503
 				print "</td>\n";
504 504
 
505
-				if (! $i) $totalarray['nbfield']++;
505
+				if (!$i) $totalarray['nbfield']++;
506 506
 			}
507 507
 
508 508
 			// rate
509
-			if (! empty($arrayfields['cr.rate']['checked'])) {
509
+			if (!empty($arrayfields['cr.rate']['checked'])) {
510 510
 				print '<td class="tdoverflowmax200">';
511 511
 				print $obj->rate;
512 512
 				print "</td>\n";
513
-				if (! $i) $totalarray['nbfield']++;
513
+				if (!$i) $totalarray['nbfield']++;
514 514
 			}
515 515
 
516 516
 
517 517
 			// Fields from hook
518 518
 			$parameters = array('arrayfields' => $arrayfields, 'obj' => $obj);
519
-			$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters);    // Note that $action and $object may have been modified by hook
519
+			$reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
520 520
 			print $hookmanager->resPrint;
521 521
 
522 522
 			// Action
Please login to merge, or discard this patch.
htdocs/accountancy/admin/index.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -263,16 +263,16 @@
 block discarded – undo
263 263
 // Show message if accountancy hidden options are activated to help to resolve some problems
264 264
 if (!$user->admin) {
265 265
 	if (!empty($conf->global->FACTURE_DEPOSITS_ARE_JUST_PAYMENTS)) {
266
-		print '<div class="info">' . $langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS") . '</div>';
266
+		print '<div class="info">'.$langs->trans("ConstantIsOn", "FACTURE_DEPOSITS_ARE_JUST_PAYMENTS").'</div>';
267 267
 	}
268 268
 	if (!empty($conf->global->ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY)) {
269
-		print '<div class="info">' . $langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY") . '</div>';
269
+		print '<div class="info">'.$langs->trans("ConstantIsOn", "ACCOUNTANCY_USE_PRODUCT_ACCOUNT_ON_THIRDPARTY").'</div>';
270 270
 	}
271 271
 	if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
272
-		print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED") . '</div>';
272
+		print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_COMPANY_PERENTITY_SHARED").'</div>';
273 273
 	}
274 274
 	if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
275
-		print '<div class="info">' . $langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED") . '</div>';
275
+		print '<div class="info">'.$langs->trans("ConstantIsOn", "MAIN_PRODUCT_PERENTITY_SHARED").'</div>';
276 276
 	}
277 277
 }
278 278
 
Please login to merge, or discard this patch.
htdocs/adherents/cartes/carte.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@
 block discarded – undo
156 156
 				$textright = make_substitutions($conf->global->ADHERENT_CARD_TEXT_RIGHT, $substitutionarray);
157 157
 
158 158
 				if (is_numeric($foruserid) || $foruserlogin) {
159
-					$nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY'];	// $_Avery_Labels is defined into an include
159
+					$nb = $_Avery_Labels[$model]['NX'] * $_Avery_Labels[$model]['NY']; // $_Avery_Labels is defined into an include
160 160
 					if ($nb <= 0) {
161 161
 						$nb = 1; // Protection to avoid empty page
162 162
 					}
Please login to merge, or discard this patch.
htdocs/fourn/paiement/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
 	$morehtmlref .= '<br>'.$langs->trans('ThirdParty').' : '.$object->thirdparty->getNomUrl(1);
118 118
 
119 119
 	// Amount
120
-	$morehtmlref .= '<br>'.$langs->trans('Amount').' : '. price($object->amount, '', $langs, 0, 0, -1, $conf->currency);
120
+	$morehtmlref .= '<br>'.$langs->trans('Amount').' : '.price($object->amount, '', $langs, 0, 0, -1, $conf->currency);
121 121
 
122 122
 	$allow_delete = 1;
123 123
 	// Bank account
Please login to merge, or discard this patch.
htdocs/projet/class/project.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1601,7 +1601,7 @@
 block discarded – undo
1601 1601
 
1602 1602
 				foreach (array('internal', 'external') as $source) {
1603 1603
 					$tab = $origin_project->liste_contact(-1, $source);
1604
-					if (is_array($tab) && count($tab)>0) {
1604
+					if (is_array($tab) && count($tab) > 0) {
1605 1605
 						foreach ($tab as $contacttoadd) {
1606 1606
 							$clone_project->add_contact($contacttoadd['id'], $contacttoadd['code'], $contacttoadd['source'], $notrigger);
1607 1607
 							if ($clone_project->error == 'DB_ERROR_RECORD_ALREADY_EXISTS') {
Please login to merge, or discard this patch.
htdocs/projet/contact.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -33,9 +33,9 @@  discard block
 block discarded – undo
33 33
 }
34 34
 
35 35
 // Load translation files required by the page
36
-$langsLoad=array('projects', 'companies');
36
+$langsLoad = array('projects', 'companies');
37 37
 if (!empty($conf->eventorganization->enabled)) {
38
-	$langsLoad[]='eventorganization';
38
+	$langsLoad[] = 'eventorganization';
39 39
 }
40 40
 
41 41
 $langs->loadLangs($langsLoad);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 if ($action == 'addcontact') {
74 74
 	$form = new Form($db);
75 75
 
76
-	$source=GETPOST("source", 'aZ09');
76
+	$source = GETPOST("source", 'aZ09');
77 77
 
78 78
 	$taskstatic = new Task($db);
79 79
 	$task_array = $taskstatic->getTasksArray(0, 0, $object->id, 0, 0);
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 	$type_to = (GETPOST('typecontact') ? 'typecontact='.GETPOST('typecontact') : 'type='.GETPOST('type'));
84 84
 	$personToAffect = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
85 85
 	$affect_to = (GETPOST('userid') ? 'userid='.$personToAffect : 'contactid='.$personToAffect);
86
-	$url_redirect='?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source;
86
+	$url_redirect = '?id='.$object->id.'&'.$affect_to.'&'.$type_to.'&source='.$source;
87 87
 
88 88
 	if ($personToAffect > 0 && (empty($conf->global->PROJECT_HIDE_TASKS) || $nbTasks > 0)) {
89 89
 		$text = $langs->trans('AddPersonToTask');
@@ -92,13 +92,13 @@  discard block
 block discarded – undo
92 92
 
93 93
 		$task_to_affect = array();
94 94
 		foreach ($task_array as $task) {
95
-			$task_already_affected=false;
95
+			$task_already_affected = false;
96 96
 			$personsLinked = $task->liste_contact(-1, $source);
97 97
 			if (!is_array($personsLinked) && count($personsLinked) < 0) {
98 98
 				setEventMessage($object->error, 'errors');
99 99
 			} else {
100 100
 				foreach ($personsLinked as $person) {
101
-					if ($person['id']==$personToAffect) {
101
+					if ($person['id'] == $personToAffect) {
102 102
 						$task_already_affected = true;
103 103
 						break;
104 104
 					}
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 			$formcompany = new FormCompany($db);
116 116
 			foreach ($task_array as $task) {
117 117
 				$key = $task->id;
118
-				$val = $task->ref . ' '.dol_trunc($task->label);
118
+				$val = $task->ref.' '.dol_trunc($task->label);
119 119
 				$formquestion[] = array(
120 120
 					'type' => 'other',
121 121
 					'name' => 'person_'.$key.',person_role_'.$key,
@@ -126,8 +126,8 @@  discard block
 block discarded – undo
126 126
 			$formquestion[] = array('type'=> 'other', 'name'=>'tasksavailable', 'label'=>'', 'value' => '<input type="hidden" id="tasksavailable" name="tasksavailable" value="'.implode(',', array_keys($task_to_affect)).'">');
127 127
 		}
128 128
 
129
-		$formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'] . $url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590);
130
-		$formconfirmtoaddtasks .='
129
+		$formconfirmtoaddtasks = $form->formconfirm($_SERVER['PHP_SELF'].$url_redirect, $text, '', 'addcontact_confirm', $formquestion, '', 1, 300, 590);
130
+		$formconfirmtoaddtasks .= '
131 131
 		 <script>
132 132
 		 $(document).ready(function() {
133 133
 			var saveprop = false;
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 	$contactid = (GETPOST('userid') ? GETPOST('userid', 'int') : GETPOST('contactid', 'int'));
154 154
 	$typeid = (GETPOST('typecontact') ? GETPOST('typecontact') : GETPOST('type'));
155 155
 
156
-	if (! ($contactid > 0)) {
156
+	if (!($contactid > 0)) {
157 157
 		$error++;
158 158
 		$langs->load("errors");
159 159
 		setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Contact")), null, 'errors');
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			}
178 178
 		}
179 179
 
180
-		$affecttotask=GETPOST('tasksavailable', 'intcomma');
180
+		$affecttotask = GETPOST('tasksavailable', 'intcomma');
181 181
 		if (!empty($affecttotask)) {
182 182
 			require_once DOL_DOCUMENT_ROOT.'/projet/class/task.class.php';
183 183
 			$task_to_affect = explode(',', $affecttotask);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
 				foreach ($task_to_affect as $task_id) {
186 186
 					if (GETPOSTISSET('person_'.$task_id) && GETPOST('person_'.$task_id, 'san_alpha')) {
187 187
 						$tasksToAffect = new Task($db);
188
-						$result=$tasksToAffect->fetch($task_id);
188
+						$result = $tasksToAffect->fetch($task_id);
189 189
 						if ($result < 0) {
190 190
 							setEventMessages($tasksToAffect->error, null, 'errors');
191 191
 						} else {
Please login to merge, or discard this patch.
htdocs/admin/mails_templates.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 require_once DOL_DOCUMENT_ROOT.'/core/class/html.formaccounting.class.php';
44 44
 
45 45
 // Load translation files required by the page
46
-$langsArray=array("errors", "admin", "mails", "languages");
46
+$langsArray = array("errors", "admin", "mails", "languages");
47 47
 
48 48
 if (!empty($conf->adherent->enabled)) {
49
-	$langsArray[]='members';
49
+	$langsArray[] = 'members';
50 50
 }
51 51
 if (!empty($conf->eventorganization->enabled)) {
52
-	$langsArray[]='eventorganization';
52
+	$langsArray[] = 'eventorganization';
53 53
 }
54 54
 
55 55
 $langs->loadLangs($langsArray);
@@ -978,7 +978,7 @@  discard block
 block discarded – undo
978 978
 							$okforextended = true;
979 979
 							if (empty($conf->global->FCKEDITOR_ENABLE_MAIL))
980 980
 								$okforextended = false;
981
-							$doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (! empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
981
+							$doleditor = new DolEditor($tmpfieldlist.'-'.$rowid, (!empty($obj->{$tmpfieldlist}) ? $obj->{$tmpfieldlist} : ''), '', 140, 'dolibarr_mailings', 'In', 0, false, $okforextended, ROWS_6, '90%');
982 982
 							print $doleditor->Create(1);
983 983
 						}
984 984
 						print '</td>';
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 					print $form->selectyesno($value, (isset($obj->{$value}) ? $obj->{$value}:''), 1);
1256 1256
 				}
1257 1257
 			} else {
1258
-				print '<input type="text" '.$size.'class="flat'.($class ? ' '.$class : '').'" value="'.(isset($obj->{$value}) ? $obj->{$value}:'').'" name="'. $value .'">';
1258
+				print '<input type="text" '.$size.'class="flat'.($class ? ' '.$class : '').'" value="'.(isset($obj->{$value}) ? $obj->{$value}:'').'" name="'.$value.'">';
1259 1259
 			}
1260 1260
 			print '</td>';
1261 1261
 		}
Please login to merge, or discard this patch.