Completed
Branch develop (c24f26)
by
unknown
26:13
created
htdocs/don/payment/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -216,7 +216,7 @@
 block discarded – undo
216 216
 		if (!$disable_delete) {
217 217
 			print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), '', 1);
218 218
 		} else {
219
-			print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, [ 'attr' => ['classOverride' => 'butActionRefused']]);
219
+			print dolGetButtonAction($langs->trans("CantRemovePaymentWithOneInvoicePaid"), $langs->trans('Delete'), '', $_SERVER["PHP_SELF"].'?id='.$object->id.'#', '', 1, ['attr' => ['classOverride' => 'butActionRefused']]);
220 220
 		}
221 221
 	}
222 222
 }
Please login to merge, or discard this patch.
htdocs/accountancy/tpl/export_journal.tpl.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,5 +72,5 @@
 block discarded – undo
72 72
 }
73 73
 
74 74
 if (empty($downloadMode)) {
75
-	header('Content-Disposition: attachment;filename=' . $completefilename);
75
+	header('Content-Disposition: attachment;filename='.$completefilename);
76 76
 }
Please login to merge, or discard this patch.
htdocs/accountancy/admin/card.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 			setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Label")), null, 'errors');
77 77
 			$action = 'create';
78 78
 		} else {
79
-			$sql = "SELECT pcg_version FROM " . MAIN_DB_PREFIX . "accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
79
+			$sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid = ".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
80 80
 
81
-			dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
81
+			dol_syslog('accountancy/admin/card.php:: $sql='.$sql);
82 82
 			$result = $db->query($sql);
83 83
 			$obj = $db->fetch_object($result);
84 84
 
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
 			if (!$error) {
124 124
 				setEventMessages("RecordCreatedSuccessfully", null, 'mesgs');
125 125
 				$urltogo = $backtopage ? $backtopage : DOL_URL_ROOT.'/accountancy/admin/account.php';
126
-				header("Location: " . $urltogo);
126
+				header("Location: ".$urltogo);
127 127
 				exit;
128 128
 			}
129 129
 		}
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 			$sql = "SELECT pcg_version FROM ".MAIN_DB_PREFIX."accounting_system WHERE rowid=".((int) getDolGlobalInt('CHARTOFACCOUNTS'));
143 143
 
144
-			dol_syslog('accountancy/admin/card.php:: $sql=' . $sql);
144
+			dol_syslog('accountancy/admin/card.php:: $sql='.$sql);
145 145
 			$result2 = $db->query($sql);
146 146
 			$obj = $db->fetch_object($result2);
147 147
 
@@ -171,8 +171,8 @@  discard block
 block discarded – undo
171 171
 			$result = $object->update($user);
172 172
 
173 173
 			if ($result > 0) {
174
-				$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"] . "?id=" . $id);
175
-				header("Location: " . $urltogo);
174
+				$urltogo = $backtopage ? $backtopage : ($_SERVER["PHP_SELF"]."?id=".$id);
175
+				header("Location: ".$urltogo);
176 176
 				exit();
177 177
 			} elseif ($result == -2) {
178 178
 				setEventMessages($langs->trans("ErrorAccountNumberAlreadyExists", $object->account_number), null, 'errors');
@@ -264,14 +264,14 @@  discard block
 block discarded – undo
264 264
 	print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
265 265
 	// autosuggest from existing account types if found
266 266
 	print '<datalist id="pcg_type_datalist">';
267
-	$sql = "SELECT DISTINCT pcg_type FROM " . MAIN_DB_PREFIX . "accounting_account";
268
-	$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
269
-	$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')';		// Always limit to current entity. No sharing in accountancy.
267
+	$sql = "SELECT DISTINCT pcg_type FROM ".MAIN_DB_PREFIX."accounting_account";
268
+	$sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'";
269
+	$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
270 270
 	$sql .= ' LIMIT 50000'; // just as a sanity check
271 271
 	$resql = $db->query($sql);
272 272
 	if ($resql) {
273 273
 		while ($obj = $db->fetch_object($resql)) {
274
-			print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
274
+			print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">';
275 275
 		}
276 276
 	}
277 277
 	print '</datalist>';
@@ -341,14 +341,14 @@  discard block
 block discarded – undo
341 341
 			print '<input type="text" name="pcg_type" list="pcg_type_datalist" value="'.dol_escape_htmltag(GETPOSTISSET('pcg_type') ? GETPOST('pcg_type', 'alpha') : $object->pcg_type).'">';
342 342
 			// autosuggest from existing account types if found
343 343
 			print '<datalist id="pcg_type_datalist">';
344
-			$sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
345
-			$sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
346
-			$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')';		// Always limit to current entity. No sharing in accountancy.
344
+			$sql = 'SELECT DISTINCT pcg_type FROM '.MAIN_DB_PREFIX.'accounting_account';
345
+			$sql .= " WHERE fk_pcg_version = '".$db->escape($accountsystem->ref)."'";
346
+			$sql .= ' AND entity in ('.getEntity('accounting_account', 0).')'; // Always limit to current entity. No sharing in accountancy.
347 347
 			$sql .= ' LIMIT 50000'; // just as a sanity check
348 348
 			$resql = $db->query($sql);
349 349
 			if ($resql) {
350 350
 				while ($obj = $db->fetch_object($resql)) {
351
-					print '<option value="' . dol_escape_htmltag($obj->pcg_type) . '">';
351
+					print '<option value="'.dol_escape_htmltag($obj->pcg_type).'">';
352 352
 				}
353 353
 			}
354 354
 			print '</datalist>';
Please login to merge, or discard this patch.
htdocs/compta/tva/card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 				}
253 253
 			}
254 254
 			if (empty($error)) {
255
-				header("Location: card.php?id=" . $object->id);
255
+				header("Location: card.php?id=".$object->id);
256 256
 				exit;
257 257
 			}
258 258
 		}
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 		} else {
308 308
 			$result = $object->fetch($id);
309 309
 
310
-			$object->amount	= $amount;
310
+			$object->amount = $amount;
311 311
 
312 312
 			$result = $object->update($user);
313 313
 			if ($result <= 0) {
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 
470 470
 	// Auto create payment
471 471
 	print '<tr><td><label for="auto_create_paiement">'.$langs->trans('AutomaticCreationPayment').'</label></td>';
472
-	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" ' . (empty($auto_create_payment) ? '' : 'checked="checked"') . ' value="1"></td></tr>'."\n";
472
+	print '<td><input id="auto_create_paiement" name="auto_create_paiement" type="checkbox" '.(empty($auto_create_payment) ? '' : 'checked="checked"').' value="1"></td></tr>'."\n";
473 473
 
474 474
 	print '<tr class="hide_if_no_auto_create_payment">';
475 475
 	print '<td class="fieldrequired">'.$langs->trans("DatePayment").'</td><td>';
@@ -609,9 +609,9 @@  discard block
 block discarded – undo
609 609
 	print '</td></tr>';
610 610
 
611 611
 	if ($action == 'edit') {
612
-		print '<tr><td class="fieldrequired">' . $langs->trans("Amount") . '</td><td><input name="amount" size="10" value="' . price($object->amount) . '"></td></tr>';
612
+		print '<tr><td class="fieldrequired">'.$langs->trans("Amount").'</td><td><input name="amount" size="10" value="'.price($object->amount).'"></td></tr>';
613 613
 	} else {
614
-		print '<tr><td>' . $langs->trans("Amount") . '</td><td>' . price($object->amount) . '</td></tr>';
614
+		print '<tr><td>'.$langs->trans("Amount").'</td><td>'.price($object->amount).'</td></tr>';
615 615
 	}
616 616
 
617 617
 	// Mode of payment
Please login to merge, or discard this patch.
htdocs/compta/bank/class/paymentvarious.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 				$this->type_payment         = $obj->fk_typepayment;
307 307
 				$this->num_payment          = $obj->num_payment;
308 308
 				$this->label                = $obj->label;
309
-				$this->note                 = $obj->note_private;	// For backward compatibility
309
+				$this->note                 = $obj->note_private; // For backward compatibility
310 310
 				$this->note_private         = $obj->note_private;
311 311
 				$this->subledger_account    = $obj->subledger_account;
312 312
 				$this->accountancy_code     = $obj->accountancy_code;
@@ -486,7 +486,7 @@  discard block
 block discarded – undo
486 486
 		$sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : 0);
487 487
 		$sql .= ", ".((int) $user->id);
488 488
 		$sql .= ", '".$this->db->idate($now)."'";
489
-		$sql .= ", NULL";	// Filled later
489
+		$sql .= ", NULL"; // Filled later
490 490
 		$sql .= ", ".((int) $conf->entity);
491 491
 		$sql .= ")";
492 492
 
Please login to merge, or discard this patch.
htdocs/compta/prelevement/class/ligneprelevement.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,8 +45,8 @@
 block discarded – undo
45 45
 
46 46
 	const STATUS_DRAFT = 0;
47 47
 	const STATUS_NOT_USED = 1;
48
-	const STATUS_CREDITED = 2;		// STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
49
-	const STATUS_DEBITED = 2;		// STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
48
+	const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
49
+	const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
50 50
 	const STATUS_REJECTED = 3;
51 51
 
52 52
 
Please login to merge, or discard this patch.
htdocs/user/passwordforgotten.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -142,12 +142,12 @@
 block discarded – undo
142 142
 			$messagewarning .= '</div>';
143 143
 
144 144
 			if ($result <= 0 && $edituser->error == 'USERNOTFOUND') {
145
-				usleep(20000);	// add delay to simulate setPassword() and send_password() actions delay (0.02s)
145
+				usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s)
146 146
 				$message .= $messagewarning;
147 147
 				$username = '';
148 148
 			} else {
149 149
 				if (empty($edituser->email)) {
150
-					usleep(20000);	// add delay to simulate setPassword() and send_password() actions delay (0.02s)
150
+					usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s)
151 151
 					$message .= $messagewarning;
152 152
 				} else {
153 153
 					$newpassword = $edituser->setPassword($user, '', 1);
Please login to merge, or discard this patch.
htdocs/admin/const.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -199,12 +199,12 @@  discard block
 block discarded – undo
199 199
 print '<div class="div-table-responsive-no-min">';
200 200
 print '<table class="noborder centpercent">';
201 201
 print '<tr class="liste_titre">';
202
-print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '') . "\n";
202
+print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n";
203 203
 print getTitleFieldOfList("Value", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
204 204
 print getTitleFieldOfList("Comment", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder);
205
-print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
205
+print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
206 206
 if (isModEnabled('multicompany') && !$user->entity) {
207
-	print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ') . "\n";
207
+	print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
208 208
 }
209 209
 print getTitleFieldOfList("", 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
210 210
 print "</tr>\n";
@@ -227,12 +227,12 @@  discard block
 block discarded – undo
227 227
 // Limit to superadmin
228 228
 if (isModEnabled('multicompany') && !$user->entity) {
229 229
 	print '<td>';
230
-	print '<input type="text" class="flat" size="1" name="entity" value="' . $conf->entity . '">';
230
+	print '<input type="text" class="flat" size="1" name="entity" value="'.$conf->entity.'">';
231 231
 	print '</td>';
232 232
 	print '<td class="center">';
233 233
 } else {
234 234
 	print '<td class="center">';
235
-	print '<input type="hidden" name="entity" value="' . $conf->entity . '">';
235
+	print '<input type="hidden" name="entity" value="'.$conf->entity.'">';
236 236
 }
237 237
 print '<input type="submit" class="button button-add small" id="add" name="add" value="'.$langs->trans("Add").'">';
238 238
 print "</td>\n";
Please login to merge, or discard this patch.
htdocs/includes/odtphp/zip/PclZipProxy.php 4 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@
 block discarded – undo
21 21
 	protected $openned = false;
22 22
 	protected $filename;
23 23
 	protected $pclzip;
24
-    /**
25
-     * Class constructor
26
-     *
27
-     * @throws PclZipProxyException
28
-     */
24
+	/**
25
+	 * Class constructor
26
+	 *
27
+	 * @throws PclZipProxyException
28
+	 */
29 29
 	public function __construct($forcedir='')
30 30
 	{
31 31
 		if (! class_exists('PclZip')) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 			|| !file_exists($filename)) {
122 122
 			return false;
123 123
 		}
124
-		if (isSet($localname)) {
124
+		if (isset($localname)) {
125 125
 			$localname = preg_replace("/(?:\.|\/)*(.*)/", "\\1", $localname);
126 126
 			$localpath = dirname($localname);
127 127
 			$tmpfilename = $this->tmpdir . '/' . basename($localname);
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if (! defined('ODTPHP_PATHTOPCLZIP')) {
2
+if (!defined('ODTPHP_PATHTOPCLZIP')) {
3 3
 	define('ODTPHP_PATHTOPCLZIP', DOL_DOCUMENT_ROOT.'/includes/odtphp/zip/pclzip/');
4 4
 }
5 5
 require_once ODTPHP_PATHTOPCLZIP.'pclzip.lib.php';
@@ -28,13 +28,13 @@  discard block
 block discarded – undo
28 28
      *
29 29
      * @throws PclZipProxyException
30 30
      */
31
-	public function __construct($forcedir='')
31
+	public function __construct($forcedir = '')
32 32
 	{
33
-		if (! class_exists('PclZip')) {
33
+		if (!class_exists('PclZip')) {
34 34
 			throw new PclZipProxyException('PclZip class not loaded - PclZip library
35 35
 			 is required for using PclZipProxy'); ;
36 36
 		}
37
-		if ($forcedir) $this->tmpdir=preg_replace('|[//\/]$|','',$forcedir);	// $this->tmpdir must not contains / at the end
37
+		if ($forcedir) $this->tmpdir = preg_replace('|[//\/]$|', '', $forcedir); // $this->tmpdir must not contains / at the end
38 38
 	}
39 39
 
40 40
 	/**
@@ -91,11 +91,11 @@  discard block
 block discarded – undo
91 91
 		}
92 92
 		$localname = preg_replace("/(?:\.|\/)*(.*)/", "\\1", $localname);
93 93
 		$localpath = dirname($localname);
94
-		$tmpfilename = $this->tmpdir . '/' . basename($localname);
94
+		$tmpfilename = $this->tmpdir.'/'.basename($localname);
95 95
 		if (false !== file_put_contents($tmpfilename, $contents)) {
96 96
 			//print "tmpfilename=".$tmpfilename;
97 97
 			//print "localname=".$localname;
98
-			$res=$this->pclzip->delete(PCLZIP_OPT_BY_NAME, $localname);
98
+			$res = $this->pclzip->delete(PCLZIP_OPT_BY_NAME, $localname);
99 99
 			$add = $this->pclzip->add($tmpfilename,
100 100
 				PCLZIP_OPT_REMOVE_PATH, $this->tmpdir,
101 101
 				PCLZIP_OPT_ADD_PATH, $localpath);
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 		if (isSet($localname)) {
127 127
 			$localname = preg_replace("/(?:\.|\/)*(.*)/", "\\1", $localname);
128 128
 			$localpath = dirname($localname);
129
-			$tmpfilename = $this->tmpdir . '/' . basename($localname);
129
+			$tmpfilename = $this->tmpdir.'/'.basename($localname);
130 130
 		} else {
131 131
 			$localname = basename($filename);
132
-			$tmpfilename = $this->tmpdir . '/' . $localname;
132
+			$tmpfilename = $this->tmpdir.'/'.$localname;
133 133
 			$localpath = '';
134 134
 		}
135 135
 		if (file_exists($filename)) {
Please login to merge, or discard this patch.
Braces   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,10 @@
 block discarded – undo
34 34
 			throw new PclZipProxyException('PclZip class not loaded - PclZip library
35 35
 			 is required for using PclZipProxy'); ;
36 36
 		}
37
-		if ($forcedir) $this->tmpdir=preg_replace('|[//\/]$|','',$forcedir);	// $this->tmpdir must not contains / at the end
37
+		if ($forcedir) {
38
+			$this->tmpdir=preg_replace('|[//\/]$|','',$forcedir);
39
+		}
40
+		// $this->tmpdir must not contains / at the end
38 41
 	}
39 42
 
40 43
 	/**
Please login to merge, or discard this patch.