Completed
Branch develop (ac6154)
by
unknown
17:16
created
htdocs/modulebuilder/template/myobject_contact.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -149,7 +149,9 @@
 block discarded – undo
149 149
 if (!isModEnabled("mymodule")) {
150 150
 	accessforbidden();
151 151
 }
152
-if (!$permissiontoread) accessforbidden();
152
+if (!$permissiontoread) {
153
+	accessforbidden();
154
+}
153 155
 
154 156
 
155 157
 /*
Please login to merge, or discard this patch.
htdocs/margin/customerMargins.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
 $startdate = $enddate = '';
67 67
 if (GETPOST('startdatemonth')) {
68
-	$startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'),  GETPOST('startdateday', 'int'),  GETPOST('startdateyear', 'int'));
68
+	$startdate = dol_mktime(0, 0, 0, GETPOST('startdatemonth', 'int'), GETPOST('startdateday', 'int'), GETPOST('startdateyear', 'int'));
69 69
 }
70 70
 if (GETPOST('enddatemonth')) {
71 71
 	$enddate = dol_mktime(23, 59, 59, GETPOST('enddatemonth', 'int'), GETPOST('enddateday', 'int'), GETPOST('enddateyear'));
Please login to merge, or discard this patch.
htdocs/theme/eldy/global.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
66 66
 	print "/* For dark mode */\n";
67 67
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
68
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
68
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
69 69
 	} else {
70 70
 		print "@media not print {";
71 71
 	}
@@ -5052,7 +5052,7 @@  discard block
 block discarded – undo
5052 5052
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
5053 5053
 	print "/* For dark mode */\n";
5054 5054
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
5055
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
5055
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
5056 5056
 	} else {
5057 5057
 		print "@media not print {";
5058 5058
 	}
Please login to merge, or discard this patch.
htdocs/theme/md/btn.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
 if (!empty($conf->global->THEME_DARKMODEENABLED)) {
19 19
 	print "/* For dark mode */\n";
20 20
 	if ($conf->global->THEME_DARKMODEENABLED != 2) {
21
-		print "@media (prefers-color-scheme: dark) {";	// To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
21
+		print "@media (prefers-color-scheme: dark) {"; // To test, click on the 3 dots menu, then Other options then Display then emulate prefer-color-schemes
22 22
 	} else {
23 23
 		print "@media not print {";
24 24
 	}
Please login to merge, or discard this patch.
htdocs/loan/class/paymentloan.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 		$sql .= " note_public=".(isset($this->note_public) ? "'".$this->db->escape($this->note_public)."'" : "null").",";
346 346
 		$sql .= " fk_bank=".(isset($this->fk_bank) ? ((int) $this->fk_bank) : "null").",";
347 347
 		$sql .= " fk_user_creat=".(isset($this->fk_user_creat) ? ((int) $this->fk_user_creat) : "null").",";
348
-		$sql .= " fk_user_modif=".(isset($this->fk_user_modif) ?((int) $this->fk_user_modif) : "null");
348
+		$sql .= " fk_user_modif=".(isset($this->fk_user_modif) ? ((int) $this->fk_user_modif) : "null");
349 349
 		$sql .= " WHERE rowid=".((int) $this->id);
350 350
 
351 351
 		$this->db->begin();
@@ -655,7 +655,7 @@  discard block
 block discarded – undo
655 655
 		$result .= $linkend;
656 656
 
657 657
 		global $action;
658
-		$hookmanager->initHooks(array($this->element . 'dao'));
658
+		$hookmanager->initHooks(array($this->element.'dao'));
659 659
 		$parameters = array('id'=>$this->id, 'getnomurl' => &$result);
660 660
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
661 661
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/partnership/partnership_agenda.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,18 @@
 block discarded – undo
83 83
 //if ($user->socid > 0) accessforbidden();
84 84
 //if ($user->socid > 0) $socid = $user->socid;
85 85
 //$result = restrictedArea($user, 'partnership', $object->id);
86
-if (empty($conf->partnership->enabled)) accessforbidden();
87
-if (empty($permissiontoread)) accessforbidden();
88
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
89
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
86
+if (empty($conf->partnership->enabled)) {
87
+	accessforbidden();
88
+}
89
+if (empty($permissiontoread)) {
90
+	accessforbidden();
91
+}
92
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
93
+	accessforbidden();
94
+}
95
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
96
+	accessforbidden();
97
+}
90 98
 
91 99
 
92 100
 
Please login to merge, or discard this patch.
htdocs/partnership/partnership_contact.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -83,10 +83,18 @@
 block discarded – undo
83 83
 //if ($user->socid > 0) accessforbidden();
84 84
 //if ($user->socid > 0) $socid = $user->socid;
85 85
 //$result = restrictedArea($user, 'partnership', $object->id);
86
-if (empty($conf->partnership->enabled)) accessforbidden();
87
-if (empty($permissiontoread)) accessforbidden();
88
-if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') accessforbidden();
89
-if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') accessforbidden();
86
+if (empty($conf->partnership->enabled)) {
87
+	accessforbidden();
88
+}
89
+if (empty($permissiontoread)) {
90
+	accessforbidden();
91
+}
92
+if ($object->id > 0 && !($object->fk_member > 0) && $managedfor == 'member') {
93
+	accessforbidden();
94
+}
95
+if ($object->id > 0 && !($object->fk_soc > 0) && $managedfor == 'thirdparty') {
96
+	accessforbidden();
97
+}
90 98
 
91 99
 
92 100
 
Please login to merge, or discard this patch.
htdocs/core/modules/security/generate/modGeneratePassPerso.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
 			return $pass;
195 195
 		}
196 196
 
197
-		return $this->getNewGeneratedPassword();	// warning, may generate infinite loop if conditions are not possible
197
+		return $this->getNewGeneratedPassword(); // warning, may generate infinite loop if conditions are not possible
198 198
 	}
199 199
 
200 200
 	/**
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	{
209 209
 		global $langs;
210 210
 
211
-		$this->initAll();	// For the case this method is called alone
211
+		$this->initAll(); // For the case this method is called alone
212 212
 
213 213
 		$password_a = preg_split('//u', $password, null, PREG_SPLIT_NO_EMPTY);
214 214
 		$maj = preg_split('//u', $this->Maj, null, PREG_SPLIT_NO_EMPTY);
Please login to merge, or discard this patch.
htdocs/salaries/class/paymentsalary.class.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 	}
582 582
 
583 583
 
584
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
584
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
585 585
 	/**
586 586
 	 *  Mise a jour du lien entre le paiement de  salaire et la ligne dans llx_bank generee
587 587
 	 *
@@ -590,7 +590,7 @@  discard block
 block discarded – undo
590 590
 	 */
591 591
 	public function update_fk_bank($id_bank)
592 592
 	{
593
-        // phpcs:enable
593
+		// phpcs:enable
594 594
 		$sql = "UPDATE ".MAIN_DB_PREFIX."payment_salary SET fk_bank = ".((int) $id_bank)." WHERE rowid = ".((int) $this->id);
595 595
 
596 596
 		dol_syslog(get_class($this)."::update_fk_bank", LOG_DEBUG);
@@ -669,7 +669,7 @@  discard block
 block discarded – undo
669 669
 		return $this->LibStatut($this->statut, $mode);
670 670
 	}
671 671
 
672
-    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
672
+	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
673 673
 	/**
674 674
 	 *  Return the status
675 675
 	 *
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
 	 */
680 680
 	public function LibStatut($status, $mode = 0)
681 681
 	{
682
-        // phpcs:enable
682
+		// phpcs:enable
683 683
 		global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
684 684
 
685 685
 		$langs->load('compta');
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
 							}
564 564
 							if ($result <= 0) {
565 565
 								$this->error = $this->db->lasterror();
566
-								dol_syslog(get_class($this) . '::addPaymentToBank ' . $this->error);
566
+								dol_syslog(get_class($this).'::addPaymentToBank '.$this->error);
567 567
 								$error++;
568 568
 							}
569 569
 						}
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
 				$label = $langs->trans("SalaryPayment");
779 779
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
780 780
 			}
781
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
781
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
782 782
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
783 783
 		} else {
784 784
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
Please login to merge, or discard this 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.