Completed
Branch develop (30080e)
by
unknown
16:47
created
htdocs/hrm/evaluation_agenda.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -100,7 +100,9 @@
 block discarded – undo
100 100
 if (!isModEnabled('hrm')) {
101 101
 	accessforbidden();
102 102
 }
103
-if (!$permissiontoread) accessforbidden();
103
+if (!$permissiontoread) {
104
+	accessforbidden();
105
+}
104 106
 
105 107
 
106 108
 /*
Please login to merge, or discard this patch.
htdocs/partnership/partnership_list.php 1 patch
Braces   +15 added lines, -5 removed lines patch added patch discarded remove patch
@@ -89,7 +89,9 @@  discard block
 block discarded – undo
89 89
 
90 90
 $managedfor	= getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR', 'thirdparty');
91 91
 
92
-if ($managedfor != 'member' && $sortfield == 'd.datefin') $sortfield = '';
92
+if ($managedfor != 'member' && $sortfield == 'd.datefin') {
93
+	$sortfield = '';
94
+}
93 95
 
94 96
 // Default sort order (if not yet defined by previous GETPOST)
95 97
 if (!$sortfield) {
@@ -155,10 +157,18 @@  discard block
 block discarded – undo
155 157
 //if ($user->socid > 0) accessforbidden();
156 158
 //if ($user->socid > 0) $socid = $user->socid;
157 159
 //$result = restrictedArea($user, 'partnership', $object->id);
158
-if (empty($conf->partnership->enabled)) accessforbidden();
159
-if (empty($permissiontoread)) accessforbidden();
160
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
161
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
160
+if (empty($conf->partnership->enabled)) {
161
+	accessforbidden();
162
+}
163
+if (empty($permissiontoread)) {
164
+	accessforbidden();
165
+}
166
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
167
+	accessforbidden();
168
+}
169
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
170
+	accessforbidden();
171
+}
162 172
 
163 173
 
164 174
 /*
Please login to merge, or discard this patch.
htdocs/public/ticket/view.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -206,7 +206,9 @@
 block discarded – undo
206 206
 $triggersendname = 'TICKET_SENTBYMAIL';
207 207
 $paramname = 'id';
208 208
 $autocopy = 'MAIN_MAIL_AUTOCOPY_TICKET_TO'; // used to know the automatic BCC to add
209
-if (!empty($object->dao->id)) $trackid = 'tic'.$object->dao->id;
209
+if (!empty($object->dao->id)) {
210
+	$trackid = 'tic'.$object->dao->id;
211
+}
210 212
 include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
211 213
 
212 214
 
Please login to merge, or discard this patch.
dev/tools/spider.php 1 patch
Braces   +28 added lines, -18 removed lines patch added patch discarded remove patch
@@ -55,7 +55,9 @@  discard block
 block discarded – undo
55 55
 	$metaData=getDocMetaData($doc);
56 56
 	foreach ($links as $i) {
57 57
 		$link=$i->getAttribute('href');
58
-		if (ignoreLink($link)) continue;
58
+		if (ignoreLink($link)) {
59
+			continue;
60
+		}
59 61
 		$link=convertLink($url, $link);
60 62
 		if (!in_array($link, $crawledLinks)) {
61 63
 			$crawledLinks[]=$link;
@@ -63,9 +65,10 @@  discard block
 block discarded – undo
63 65
 			insertIntoDatabase($link, $pageTitle, $metaData, $depth);
64 66
 		}
65 67
 	}
66
-	foreach ($crawling as $crawlURL)
67
-		followLink($crawlURL, $depth+1);
68
-}
68
+	foreach ($crawling as $crawlURL) {
69
+			followLink($crawlURL, $depth+1);
70
+	}
71
+	}
69 72
 
70 73
 /**
71 74
  * @param  string $site Site
@@ -74,15 +77,17 @@  discard block
 block discarded – undo
74 77
  */
75 78
 function convertLink($site, $path)
76 79
 {
77
-	if (substr_compare($path, "//", 0, 2)==0)
78
-		return parse_url($site)['scheme'].$path;
79
-	elseif (substr_compare($path, "http://", 0, 7)==0
80
+	if (substr_compare($path, "//", 0, 2)==0) {
81
+			return parse_url($site)['scheme'].$path;
82
+	} elseif (substr_compare($path, "http://", 0, 7)==0
80 83
 		or substr_compare($path, "https://", 0, 8)==0
81 84
 		or substr_compare($path, "www.", 0, 4)==0
82
-	)
83
-		return $path;
84
-	else return $site.'/'.$path;
85
-}
85
+	) {
86
+			return $path;
87
+	} else {
88
+		return $site.'/'.$path;
89
+	}
90
+	}
86 91
 
87 92
 /**
88 93
  * @param  string $url URL
@@ -117,8 +122,9 @@  discard block
 block discarded – undo
117 122
 function getDocTitle(&$doc, $url)
118 123
 {
119 124
 	$titleNodes=$doc->getElementsByTagName('title');
120
-	if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue))
121
-		return $url;
125
+	if (count($titleNodes)==0 or !isset($titleNodes[0]->nodeValue)) {
126
+			return $url;
127
+	}
122 128
 	$title=str_replace('', '\n', $titleNodes[0]->nodeValue);
123 129
 	return (strlen($title)<1)?$url:$title;
124 130
 }
@@ -131,11 +137,15 @@  discard block
 block discarded – undo
131 137
 {
132 138
 	$metaData=array();
133 139
 	$metaNodes=$doc->getElementsByTagName('meta');
134
-	foreach ($metaNodes as $node)
135
-		$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
136
-	if (!isset($metaData['description']))
137
-		$metaData['description']='No Description Available';
138
-	if (!isset($metaData['keywords'])) $metaData['keywords']='';
140
+	foreach ($metaNodes as $node) {
141
+			$metaData[$node->getAttribute("name")] = $node->getAttribute("content");
142
+	}
143
+	if (!isset($metaData['description'])) {
144
+			$metaData['description']='No Description Available';
145
+	}
146
+	if (!isset($metaData['keywords'])) {
147
+		$metaData['keywords']='';
148
+	}
139 149
 	return array(
140 150
 		'keywords'=>str_replace('', '\n', $metaData['keywords']),
141 151
 		'description'=>str_replace('', '\n', $metaData['description'])
Please login to merge, or discard this patch.
dev/tools/test/namespacemig/bbb.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,9 +25,11 @@
 block discarded – undo
25 25
 	 *
26 26
 	 * @return void
27 27
 	 */
28
-	public function do()
28
+	public function do {
29
+		()
29 30
 	{
30 31
 		global $globalaaa, $globalbbb;
32
+	}
31 33
 		echo 'dobbb'."\n";
32 34
 		$globalaaa.='+bbb';
33 35
 		$globalbbb.='+bbb';
Please login to merge, or discard this patch.
dev/tools/test/namespacemig/aaa.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,8 +27,10 @@
 block discarded – undo
27 27
 	 *
28 28
 	 * @return void
29 29
 	 */
30
-	public function do()
30
+	public function do {
31
+		()
31 32
 	{
32 33
 		echo 'doaaa'."\n";
33 34
 	}
35
+	}
34 36
 }
Please login to merge, or discard this patch.
htdocs/salaries/class/salary.class.php 1 patch
Braces   +39 added lines, -13 removed lines patch added patch discarded remove patch
@@ -201,7 +201,9 @@  discard block
 block discarded – undo
201 201
 		if (!$notrigger) {
202 202
 			// Call trigger
203 203
 			$result = $this->call_trigger('SALARY_MODIFY', $user);
204
-			if ($result < 0) $error++;
204
+			if ($result < 0) {
205
+				$error++;
206
+			}
205 207
 			// End call triggers
206 208
 		}
207 209
 
@@ -382,7 +384,9 @@  discard block
 block discarded – undo
382 384
 		$sql .= ", salary";
383 385
 		$sql .= ", fk_typepayment";
384 386
 		$sql .= ", fk_account";
385
-		if ($this->note) $sql .= ", note";
387
+		if ($this->note) {
388
+			$sql .= ", note";
389
+		}
386 390
 		$sql .= ", label";
387 391
 		$sql .= ", datesp";
388 392
 		$sql .= ", dateep";
@@ -400,7 +404,9 @@  discard block
 block discarded – undo
400 404
 		$sql .= ", ".($this->salary > 0 ? ((double) $this->salary) : "null");
401 405
 		$sql .= ", ".($this->type_payment > 0 ? ((int) $this->type_payment) : 0);
402 406
 		$sql .= ", ".($this->accountid > 0 ? ((int) $this->accountid) : "null");
403
-		if ($this->note) $sql .= ", '".$this->db->escape($this->note)."'";
407
+		if ($this->note) {
408
+			$sql .= ", '".$this->db->escape($this->note)."'";
409
+		}
404 410
 		$sql .= ", '".$this->db->escape($this->label)."'";
405 411
 		$sql .= ", '".$this->db->idate($this->datesp)."'";
406 412
 		$sql .= ", '".$this->db->idate($this->dateep)."'";
@@ -428,9 +434,13 @@  discard block
 block discarded – undo
428 434
 
429 435
 				// Call trigger
430 436
 				$result = $this->call_trigger('SALARY_CREATE', $user);
431
-				if ($result < 0) $error++;
437
+				if ($result < 0) {
438
+					$error++;
439
+				}
432 440
 				// End call triggers
433
-			} else $error++;
441
+			} else {
442
+				$error++;
443
+			}
434 444
 
435 445
 			if (!$error) {
436 446
 				$this->db->commit();
@@ -503,7 +513,10 @@  discard block
 block discarded – undo
503 513
 		global $dolibarr_main_authentication, $dolibarr_main_demo;
504 514
 		global $menumanager;
505 515
 
506
-		if (!empty($conf->dol_no_mouse_hover)) $notooltip = 1; // Force disable tooltips
516
+		if (!empty($conf->dol_no_mouse_hover)) {
517
+			$notooltip = 1;
518
+		}
519
+		// Force disable tooltips
507 520
 
508 521
 		$result = '';
509 522
 		$params = [
@@ -564,8 +577,11 @@  discard block
 block discarded – undo
564 577
 		$hookmanager->initHooks(array('salarypayment'));
565 578
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
566 579
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
567
-		if ($reshook > 0) $result = $hookmanager->resPrint;
568
-		else $result .= $hookmanager->resPrint;
580
+		if ($reshook > 0) {
581
+			$result = $hookmanager->resPrint;
582
+		} else {
583
+			$result .= $hookmanager->resPrint;
584
+		}
569 585
 
570 586
 		return $result;
571 587
 	}
@@ -591,7 +607,9 @@  discard block
 block discarded – undo
591 607
 			$amount = 0;
592 608
 
593 609
 			$obj = $this->db->fetch_object($resql);
594
-			if ($obj) $amount = $obj->amount ? $obj->amount : 0;
610
+			if ($obj) {
611
+				$amount = $obj->amount ? $obj->amount : 0;
612
+			}
595 613
 
596 614
 			$this->db->free($resql);
597 615
 			return $amount;
@@ -718,15 +736,23 @@  discard block
 block discarded – undo
718 736
 			//$langs->load("mymodule");
719 737
 			$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
720 738
 			$this->labelStatus[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
721
-			if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
739
+			if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
740
+				$this->labelStatus[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
741
+			}
722 742
 			$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv('BillStatusNotPaid');
723 743
 			$this->labelStatusShort[self::STATUS_PAID] = $langs->transnoentitiesnoconv('BillStatusPaid');
724
-			if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) $this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
744
+			if ($status == self::STATUS_UNPAID && $alreadypaid <> 0) {
745
+				$this->labelStatusShort[self::STATUS_UNPAID] = $langs->transnoentitiesnoconv("BillStatusStarted");
746
+			}
725 747
 		}
726 748
 
727 749
 		$statusType = 'status1';
728
-		if ($status == 0 && $alreadypaid <> 0) $statusType = 'status3';
729
-		if ($status == 1) $statusType = 'status6';
750
+		if ($status == 0 && $alreadypaid <> 0) {
751
+			$statusType = 'status3';
752
+		}
753
+		if ($status == 1) {
754
+			$statusType = 'status6';
755
+		}
730 756
 
731 757
 		return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
732 758
 	}
Please login to merge, or discard this patch.
htdocs/salaries/class/paymentsalary.class.php 1 patch
Braces   +63 added lines, -20 removed lines patch added patch discarded remove patch
@@ -139,15 +139,34 @@  discard block
 block discarded – undo
139 139
 		}
140 140
 
141 141
 		// Clean parameters
142
-		if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary;
143
-		if (isset($this->amount)) $this->amount = trim($this->amount);
144
-		if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment;
145
-		if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
146
-		if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
147
-		if (isset($this->note)) $this->note = trim($this->note);
148
-		if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
149
-		if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author;
150
-		if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
142
+		if (isset($this->fk_salary)) {
143
+			$this->fk_salary = (int) $this->fk_salary;
144
+		}
145
+		if (isset($this->amount)) {
146
+			$this->amount = trim($this->amount);
147
+		}
148
+		if (isset($this->fk_typepayment)) {
149
+			$this->fk_typepayment = (int) $this->fk_typepayment;
150
+		}
151
+		if (isset($this->num_paiement)) {
152
+			$this->num_paiement = trim($this->num_paiement);
153
+		}
154
+		// deprecated
155
+		if (isset($this->num_payment)) {
156
+			$this->num_payment = trim($this->num_payment);
157
+		}
158
+		if (isset($this->note)) {
159
+			$this->note = trim($this->note);
160
+		}
161
+		if (isset($this->fk_bank)) {
162
+			$this->fk_bank = (int) $this->fk_bank;
163
+		}
164
+		if (isset($this->fk_user_author)) {
165
+			$this->fk_user_author = (int) $this->fk_user_author;
166
+		}
167
+		if (isset($this->fk_user_modif)) {
168
+			$this->fk_user_modif = (int) $this->fk_user_modif;
169
+		}
151 170
 
152 171
 		$totalamount = 0;
153 172
 		foreach ($this->amounts as $key => $value) {  // How payment is dispatch
@@ -158,7 +177,10 @@  discard block
 block discarded – undo
158 177
 		$totalamount = price2num($totalamount);
159 178
 
160 179
 		// Check parameters
161
-		if ($totalamount == 0) return -1; // On accepte les montants negatifs pour les rejets de prelevement mais pas null
180
+		if ($totalamount == 0) {
181
+			return -1;
182
+		}
183
+		// On accepte les montants negatifs pour les rejets de prelevement mais pas null
162 184
 
163 185
 
164 186
 		$this->db->begin();
@@ -207,7 +229,9 @@  discard block
 block discarded – undo
207 229
 		}
208 230
 
209 231
 		$result = $this->call_trigger('PAYMENTSALARY_CREATE', $user);
210
-		if ($result < 0) $error++;
232
+		if ($result < 0) {
233
+			$error++;
234
+		}
211 235
 
212 236
 		if ($totalamount != 0 && !$error) {
213 237
 			$this->amount = $totalamount;
@@ -303,15 +327,34 @@  discard block
 block discarded – undo
303 327
 
304 328
 		// Clean parameters
305 329
 
306
-		if (isset($this->fk_salary)) $this->fk_salary = (int) $this->fk_salary;
307
-		if (isset($this->amount)) $this->amount = trim($this->amount);
308
-		if (isset($this->fk_typepayment)) $this->fk_typepayment = (int) $this->fk_typepayment;
309
-		if (isset($this->num_paiement)) $this->num_paiement = trim($this->num_paiement); // deprecated
310
-		if (isset($this->num_payment)) $this->num_payment = trim($this->num_payment);
311
-		if (isset($this->note)) $this->note = trim($this->note);
312
-		if (isset($this->fk_bank)) $this->fk_bank = (int) $this->fk_bank;
313
-		if (isset($this->fk_user_author)) $this->fk_user_author = (int) $this->fk_user_author;
314
-		if (isset($this->fk_user_modif)) $this->fk_user_modif = (int) $this->fk_user_modif;
330
+		if (isset($this->fk_salary)) {
331
+			$this->fk_salary = (int) $this->fk_salary;
332
+		}
333
+		if (isset($this->amount)) {
334
+			$this->amount = trim($this->amount);
335
+		}
336
+		if (isset($this->fk_typepayment)) {
337
+			$this->fk_typepayment = (int) $this->fk_typepayment;
338
+		}
339
+		if (isset($this->num_paiement)) {
340
+			$this->num_paiement = trim($this->num_paiement);
341
+		}
342
+		// deprecated
343
+		if (isset($this->num_payment)) {
344
+			$this->num_payment = trim($this->num_payment);
345
+		}
346
+		if (isset($this->note)) {
347
+			$this->note = trim($this->note);
348
+		}
349
+		if (isset($this->fk_bank)) {
350
+			$this->fk_bank = (int) $this->fk_bank;
351
+		}
352
+		if (isset($this->fk_user_author)) {
353
+			$this->fk_user_author = (int) $this->fk_user_author;
354
+		}
355
+		if (isset($this->fk_user_modif)) {
356
+			$this->fk_user_modif = (int) $this->fk_user_modif;
357
+		}
315 358
 
316 359
 		// Check parameters
317 360
 		// Put here code to add control on parameters values
Please login to merge, or discard this patch.
htdocs/salaries/list.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -719,7 +719,9 @@
 block discarded – undo
719 719
 
720 720
 		// Payment mode
721 721
 		print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($langs->trans("PaymentTypeShort".$obj->payment_code)).'">';
722
-		if (!empty($obj->payment_code)) print $langs->trans("PaymentTypeShort".$obj->payment_code);
722
+		if (!empty($obj->payment_code)) {
723
+			print $langs->trans("PaymentTypeShort".$obj->payment_code);
724
+		}
723 725
 		print '</td>';
724 726
 		if (!$i) {
725 727
 			$totalarray['nbfield']++;
Please login to merge, or discard this patch.