Completed
Branch develop (30080e)
by
unknown
16:47
created
htdocs/compta/prelevement/card.php 1 patch
Braces   +15 added lines, -6 removed lines patch added patch discarded remove patch
@@ -315,16 +315,25 @@
 block discarded – undo
315 315
 		$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
316 316
 		if (empty($reshook)) {
317 317
 			if (empty($object->date_trans)) {
318
-				if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send);
319
-				else print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send);
318
+				if ($object->type == 'bank-transfer') {
319
+					print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->send);
320
+				} else {
321
+					print dolGetButtonAction($langs->trans("SetToStatusSent"), '', 'default', 'card.php?action=settransmitted&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->send);
322
+				}
320 323
 			}
321 324
 			if (!empty($object->date_trans) && empty($object->date_credit)) {
322
-				if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("ClassDebited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit);
323
-				else print dolGetButtonAction($langs->trans("ClassCredited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit);
325
+				if ($object->type == 'bank-transfer') {
326
+					print dolGetButtonAction($langs->trans("ClassDebited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->debit);
327
+				} else {
328
+					print dolGetButtonAction($langs->trans("ClassCredited"), '', 'default', 'card.php?action=setcredited&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->credit);
329
+				}
324 330
 			}
325 331
 
326
-			if ($object->type == 'bank-transfer') print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->create);
327
-			else print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->creer);
332
+			if ($object->type == 'bank-transfer') {
333
+				print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->paymentbybanktransfer->create);
334
+			} else {
335
+				print dolGetButtonAction($langs->trans("Delete"), '', 'delete', 'card.php?action=delete&token='.newToken().'&id='.$object->id, '', $user->rights->prelevement->bons->creer);
336
+			}
328 337
 		}
329 338
 		print '</div>';
330 339
 	}
Please login to merge, or discard this patch.
htdocs/accountancy/journal/bankjournal.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -314,7 +314,9 @@
 block discarded – undo
314 314
 			}
315 315
 			// Now loop on each link of record in bank (code similar to bankentries_list.php)
316 316
 			foreach ($links as $key => $val) {
317
-				if ($links[$key]['type'] == 'user' && !$is_sc) continue;
317
+				if ($links[$key]['type'] == 'user' && !$is_sc) {
318
+					continue;
319
+				}
318 320
 				if (in_array($links[$key]['type'], array('sc', 'payment_sc', 'payment', 'payment_supplier', 'payment_vat', 'payment_expensereport', 'banktransfert', 'payment_donation', 'member', 'payment_loan', 'payment_salary', 'payment_various'))) {
319 321
 					// So we excluded 'company' and 'user' here. We want only payment lines
320 322
 
Please login to merge, or discard this patch.
htdocs/fichinter/index.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,9 @@
 block discarded – undo
114 114
 	print '<table class="noborder nohover centpercent">';
115 115
 	print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n";
116 116
 	$listofstatus = array(Fichinter::STATUS_DRAFT, Fichinter::STATUS_VALIDATED);
117
-	if (!empty($conf->global->FICHINTER_CLASSIFY_BILLED)) $listofstatus[] = Fichinter::STATUS_BILLED;
117
+	if (!empty($conf->global->FICHINTER_CLASSIFY_BILLED)) {
118
+		$listofstatus[] = Fichinter::STATUS_BILLED;
119
+	}
118 120
 
119 121
 	foreach ($listofstatus as $status) {
120 122
 		$dataseries[] = array($fichinterstatic->LibStatut($status, 1), (isset($vals[$status]) ? (int) $vals[$status] : 0));
Please login to merge, or discard this patch.
htdocs/core/lib/files.lib.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1003,7 +1003,9 @@  discard block
 block discarded – undo
1003 1003
 				$files = dol_dir_list($newpathofdestdir);
1004 1004
 				if (!empty($files) && is_array($files)) {
1005 1005
 					foreach ($files as $key => $file) {
1006
-						if (!file_exists($file["fullname"])) continue;
1006
+						if (!file_exists($file["fullname"])) {
1007
+							continue;
1008
+						}
1007 1009
 						$filepath = $file["path"];
1008 1010
 						$oldname = $file["name"];
1009 1011
 
@@ -1718,7 +1720,9 @@  discard block
 block discarded – undo
1718 1720
 					// Update index table of files (llx_ecm_files)
1719 1721
 					if ($donotupdatesession == 1) {
1720 1722
 						$sharefile = 0;
1721
-						if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) $sharefile = 1;
1723
+						if ($TFile['type'][$i] == 'application/pdf' && strpos($_SERVER["REQUEST_URI"], 'product') !== false && !empty($conf->global->PRODUCT_ALLOW_EXTERNAL_DOWNLOAD)) {
1724
+							$sharefile = 1;
1725
+						}
1722 1726
 						$result = addFileIntoDatabaseIndex($upload_dir, basename($destfile).($resupload == 2 ? '.noexe' : ''), $TFile['name'][$i], 'uploaded', $sharefile, $object);
1723 1727
 						if ($result < 0) {
1724 1728
 							if ($allowoverwrite) {
@@ -1873,8 +1877,12 @@  discard block
 block discarded – undo
1873 1877
 				dol_syslog('Error: object ' . get_class($object) . ' has no table_element attribute.');
1874 1878
 				return -1;
1875 1879
 			}
1876
-			if (isset($object->src_object_description)) $ecmfile->description = $object->src_object_description;
1877
-			if (isset($object->src_object_keywords)) $ecmfile->keywords = $object->src_object_keywords;
1880
+			if (isset($object->src_object_description)) {
1881
+				$ecmfile->description = $object->src_object_description;
1882
+			}
1883
+			if (isset($object->src_object_keywords)) {
1884
+				$ecmfile->keywords = $object->src_object_keywords;
1885
+			}
1878 1886
 		}
1879 1887
 
1880 1888
 		if (!empty($conf->global->MAIN_FORCE_SHARING_ON_ANY_UPLOADED_FILE)) {
Please login to merge, or discard this patch.
htdocs/holiday/card_group.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -335,7 +335,9 @@
 block discarded – undo
335 335
 								if ($AutoSendMail && !$error) {
336 336
 									// send a mail to the user
337 337
 									$returnSendMail = sendMail($result, $cancreate, $now, $autoValidation);
338
-									if (!empty($returnSendMail->msg))  setEventMessage($returnSendMail->msg, $returnSendMail->style);
338
+									if (!empty($returnSendMail->msg)) {
339
+										setEventMessage($returnSendMail->msg, $returnSendMail->style);
340
+									}
339 341
 								}
340 342
 							}
341 343
 						}
Please login to merge, or discard this patch.
htdocs/compta/accounting-files.php 1 patch
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -181,7 +181,9 @@  discard block
 block discarded – undo
181 181
 			$sql .= " WHERE datef between ".$wheretail;
182 182
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
183 183
 			$sql .= " AND t.fk_statut <> ".Facture::STATUS_DRAFT;
184
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
184
+			if (!empty($projectid)) {
185
+				$sql .= " AND fk_projet = ".((int) $projectid);
186
+			}
185 187
 		}
186 188
 		// Vendor invoices
187 189
 		if (GETPOST('selectsupplierinvoices') && !empty($listofchoices['selectsupplierinvoices']['perms'])) {
@@ -193,7 +195,9 @@  discard block
 block discarded – undo
193 195
 			$sql .= " WHERE datef between ".$wheretail;
194 196
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
195 197
 			$sql .= " AND t.fk_statut <> ".FactureFournisseur::STATUS_DRAFT;
196
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
198
+			if (!empty($projectid)) {
199
+				$sql .= " AND fk_projet = ".((int) $projectid);
200
+			}
197 201
 		}
198 202
 		// Expense reports
199 203
 		if (GETPOST('selectexpensereports') && !empty($listofchoices['selectexpensereports']['perms']) && empty($projectid)) {
@@ -216,7 +220,9 @@  discard block
 block discarded – undo
216 220
 			$sql .= " WHERE datedon between ".$wheretail;
217 221
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
218 222
 			$sql .= " AND t.fk_statut <> ".Don::STATUS_DRAFT;
219
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
223
+			if (!empty($projectid)) {
224
+				$sql .= " AND fk_projet = ".((int) $projectid);
225
+			}
220 226
 		}
221 227
 		// Payments of salaries
222 228
 		if (GETPOST('selectpaymentsofsalaries') && !empty($listofchoices['selectpaymentsofsalaries']['perms'])) {
@@ -228,7 +234,9 @@  discard block
 block discarded – undo
228 234
 			$sql .= " WHERE datep between ".$wheretail;
229 235
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
230 236
 			//$sql.=" AND fk_statut <> ".PaymentSalary::STATUS_DRAFT;
231
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
237
+			if (!empty($projectid)) {
238
+				$sql .= " AND fk_projet = ".((int) $projectid);
239
+			}
232 240
 		}
233 241
 		// Social contributions
234 242
 		if (GETPOST('selectsocialcontributions') && !empty($listofchoices['selectsocialcontributions']['perms'])) {
@@ -240,7 +248,9 @@  discard block
 block discarded – undo
240 248
 			$sql .= " WHERE t.date_ech between ".$wheretail;
241 249
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
242 250
 			//$sql.=" AND fk_statut <> ".ChargeSociales::STATUS_DRAFT;
243
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
251
+			if (!empty($projectid)) {
252
+				$sql .= " AND fk_projet = ".((int) $projectid);
253
+			}
244 254
 		}
245 255
 		// Various payments
246 256
 		if (GETPOST('selectvariouspayment') && !empty($listofchoices['selectvariouspayment']['perms'])) {
@@ -251,7 +261,9 @@  discard block
 block discarded – undo
251 261
 			$sql .= " FROM ".MAIN_DB_PREFIX."payment_various as t";
252 262
 			$sql .= " WHERE datep between ".$wheretail;
253 263
 			$sql .= " AND t.entity IN (".$db->sanitize($entity == 1 ? '0,1' : $entity).')';
254
-			if (!empty($projectid)) $sql .= " AND fk_projet = ".((int) $projectid);
264
+			if (!empty($projectid)) {
265
+				$sql .= " AND fk_projet = ".((int) $projectid);
266
+			}
255 267
 		}
256 268
 		// Loan payments
257 269
 		if (GETPOST('selectloanspayment') && !empty($listofchoices['selectloanspayment']['perms']) && empty($projectid)) {
Please login to merge, or discard this patch.
htdocs/core/class/extrafields.class.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1860,7 +1860,9 @@
 block discarded – undo
1860 1860
 						}
1861 1861
 					}
1862 1862
 				}
1863
-				if (!empty($toprint)) $value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
1863
+				if (!empty($toprint)) {
1864
+					$value = '<div class="select2-container-multi-dolibarr" style="width: 90%;"><ul class="select2-choices-dolibarr">'.implode(' ', $toprint).'</ul></div>';
1865
+				}
1864 1866
 			} else {
1865 1867
 				dol_syslog(get_class($this).'::showOutputField error '.$this->db->lasterror(), LOG_WARNING);
1866 1868
 			}
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_note.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,9 @@
 block discarded – undo
51 51
 
52 52
 // Load object
53 53
 include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once  // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
54
-if ($id > 0 || !empty($ref)) $upload_dir = $conf->stocktransfer->multidir_output[$object->entity]."/".$object->id;
54
+if ($id > 0 || !empty($ref)) {
55
+	$upload_dir = $conf->stocktransfer->multidir_output[$object->entity]."/".$object->id;
56
+}
55 57
 
56 58
 $permissionnote = $user->rights->stocktransfer->stocktransfer->write; // Used by the include of actions_setnotes.inc.php
57 59
 $permissiontoadd = $user->rights->stocktransfer->stocktransfer->write; // Used by the include of actions_addupdatedelete.inc.php
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_contact.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,7 +35,9 @@  discard block
 block discarded – undo
35 35
 $action = GETPOST('action', 'alpha');
36 36
 
37 37
 // Security check
38
-if ($user->socid) $socid = $user->socid;
38
+if ($user->socid) {
39
+	$socid = $user->socid;
40
+}
39 41
 
40 42
 $result = restrictedArea($user, 'stocktransfer', $id, '', 'stocktransfer');
41 43
 
@@ -175,7 +177,9 @@  discard block
 block discarded – undo
175 177
 	$dirtpls = array_merge($conf->modules_parts['tpl'], array('/core/tpl'));
176 178
 	foreach ($dirtpls as $reldir) {
177 179
 		$res = @include dol_buildpath($reldir.'/contacts.tpl.php');
178
-		if ($res) break;
180
+		if ($res) {
181
+			break;
182
+		}
179 183
 	}
180 184
 }
181 185
 
Please login to merge, or discard this patch.