Completed
Branch develop (758ccb)
by
unknown
17:59
created
htdocs/compta/deplacement/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
 }
76 76
 $result = restrictedArea($user, 'deplacement', $id, '');
77 77
 
78
-$permissiontoadd = $user->hasRight('deplacement', 'creer');	// Used by the include of actions_dellink.inc.php
78
+$permissiontoadd = $user->hasRight('deplacement', 'creer'); // Used by the include of actions_dellink.inc.php
79 79
 
80 80
 
81 81
 /*
Please login to merge, or discard this patch.
htdocs/compta/bank/various_payment/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@
 block discarded – undo
70 70
 $upload_dir = $conf->bank->dir_output.'/'.dol_sanitizeFileName($object->id);
71 71
 $modulepart = 'banque';
72 72
 
73
-$permissiontoadd = $user->hasRight('banque', 'modifier');	// Used by the include of actions_dellink.inc.php
73
+$permissiontoadd = $user->hasRight('banque', 'modifier'); // Used by the include of actions_dellink.inc.php
74 74
 
75 75
 
76 76
 
Please login to merge, or discard this patch.
htdocs/compta/bank/account_statement_document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 	$found = true;
120 120
 }
121 121
 
122
-$permissiontoadd = $user->hasRight('banque', 'modifier');	// Used by the include of actions_dellink.inc.php
122
+$permissiontoadd = $user->hasRight('banque', 'modifier'); // Used by the include of actions_dellink.inc.php
123 123
 
124 124
 
125 125
 /*
Please login to merge, or discard this patch.
htdocs/compta/bank/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 
77 77
 $result = restrictedArea($user, 'banque', $object->id, 'bank_account', '', '');
78 78
 
79
-$permissiontoadd = $user->hasRight('banque', 'modifier');	// Used by the include of actions_dellink.inc.php
79
+$permissiontoadd = $user->hasRight('banque', 'modifier'); // Used by the include of actions_dellink.inc.php
80 80
 
81 81
 
82 82
 /*
Please login to merge, or discard this patch.
htdocs/commande/card.php 1 patch
Spacing   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -79,18 +79,18 @@  discard block
 block discarded – undo
79 79
 
80 80
 
81 81
 $id        = (GETPOST('id', 'int') ? GETPOST('id', 'int') : GETPOST('orderid', 'int'));
82
-$ref       =  GETPOST('ref', 'alpha');
83
-$socid     =  GETPOST('socid', 'int');
84
-$action    =  GETPOST('action', 'aZ09');
85
-$cancel    =  GETPOST('cancel', 'alpha');
86
-$confirm   =  GETPOST('confirm', 'alpha');
82
+$ref       = GETPOST('ref', 'alpha');
83
+$socid     = GETPOST('socid', 'int');
84
+$action    = GETPOST('action', 'aZ09');
85
+$cancel    = GETPOST('cancel', 'alpha');
86
+$confirm   = GETPOST('confirm', 'alpha');
87 87
 $backtopage = GETPOST('backtopage', 'alpha');
88 88
 
89
-$lineid    =  GETPOST('lineid', 'int');
90
-$contactid =  GETPOST('contactid', 'int');
91
-$projectid =  GETPOST('projectid', 'int');
92
-$origin    =  GETPOST('origin', 'alpha');
93
-$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int'));    // For backward compatibility
89
+$lineid    = GETPOST('lineid', 'int');
90
+$contactid = GETPOST('contactid', 'int');
91
+$projectid = GETPOST('projectid', 'int');
92
+$origin    = GETPOST('origin', 'alpha');
93
+$originid  = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
94 94
 $rank      = (GETPOST('rank', 'int') > 0) ? GETPOST('rank', 'int') : -1;
95 95
 
96 96
 // PDF
@@ -115,26 +115,26 @@  discard block
 block discarded – undo
115 115
 $extrafields->fetch_name_optionals_label($object->table_element);
116 116
 
117 117
 // Load object
118
-include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php';     // Must be include, not include_once
118
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
119 119
 
120 120
 // Permissions / Rights
121
-$usercanread    =  $user->hasRight("commande", "lire");
122
-$usercancreate  =  $user->hasRight("commande", "creer");
123
-$usercandelete  =  $user->hasRight("commande", "supprimer");
121
+$usercanread    = $user->hasRight("commande", "lire");
122
+$usercancreate  = $user->hasRight("commande", "creer");
123
+$usercandelete  = $user->hasRight("commande", "supprimer");
124 124
 
125 125
 // Advanced permissions
126
-$usercanclose       =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
127
-$usercanvalidate    =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
128
-$usercancancel      =  ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
129
-$usercansend        =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
130
-$usercangeneretedoc =   (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
126
+$usercanclose       = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !empty($usercancreate)) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'close')));
127
+$usercanvalidate    = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'validate')));
128
+$usercancancel      = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $usercancreate) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight('commande', 'order_advance', 'annuler')));
129
+$usercansend        = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'send'));
130
+$usercangeneretedoc = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || $user->hasRight('commande', 'order_advance', 'generetedoc'));
131 131
 
132 132
 $usermustrespectpricemin    = ((getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && !$user->hasRight('produit', 'ignore_price_min_advance')) || !getDolGlobalString('MAIN_USE_ADVANCED_PERMS'));
133 133
 $usercancreatepurchaseorder = ($user->hasRight('fournisseur', 'commande', 'creer') || $user->hasRight('supplier_order', 'creer'));
134 134
 
135
-$permissionnote    = $usercancreate;     //  Used by the include of actions_setnotes.inc.php
136
-$permissiondellink = $usercancreate;     //  Used by the include of actions_dellink.inc.php
137
-$permissiontoadd   = $usercancreate;     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
135
+$permissionnote    = $usercancreate; //  Used by the include of actions_setnotes.inc.php
136
+$permissiondellink = $usercancreate; //  Used by the include of actions_dellink.inc.php
137
+$permissiontoadd   = $usercancreate; //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
138 138
 
139 139
 
140 140
 $error = 0;
@@ -179,11 +179,11 @@  discard block
 block discarded – undo
179 179
 		$action = '';
180 180
 	}
181 181
 
182
-	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php';    // Must be include, not include_once
182
+	include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
183 183
 
184
-	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
184
+	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
185 185
 
186
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
186
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
187 187
 
188 188
 	// Action clone object
189 189
 	if ($action == 'confirm_clone' && $confirm == 'yes' && $usercancreate) {
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
 		$pu_ht = '';
674 674
 		$pu_ttc = '';
675 675
 		$pu_ht_devise = '';
676
-		$pu_ttc_devise  = '';
676
+		$pu_ttc_devise = '';
677 677
 
678 678
 		if (GETPOST('price_ht') !== '') {
679 679
 			$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
@@ -817,8 +817,8 @@  discard block
 block discarded – undo
817 817
 						if (count($prodcustprice->lines) > 0) {
818 818
 							$pu_ht = price($prodcustprice->lines[0]->price);
819 819
 							$pu_ttc = price($prodcustprice->lines[0]->price_ttc);
820
-							$price_min =  price($prodcustprice->lines[0]->price_min);
821
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
820
+							$price_min = price($prodcustprice->lines[0]->price_min);
821
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
822 822
 							$price_base_type = $prodcustprice->lines[0]->price_base_type;
823 823
 							$tva_tx = $prodcustprice->lines[0]->tva_tx;
824 824
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
@@ -917,8 +917,8 @@  discard block
 block discarded – undo
917 917
 				}
918 918
 
919 919
 				//If text set in desc is the same as product descpription (as now it's preloaded) we add it only one time
920
-				if ($product_desc==$desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
921
-					$product_desc='';
920
+				if ($product_desc == $desc && getDolGlobalString('PRODUIT_AUTOFILL_DESC')) {
921
+					$product_desc = '';
922 922
 				}
923 923
 
924 924
 				if (!empty($product_desc) && getDolGlobalString('MAIN_NO_CONCAT_DESCRIPTION')) {
@@ -1341,7 +1341,7 @@  discard block
 block discarded – undo
1341 1341
 					GETPOST('generate_deposit', 'alpha') == 'on' && !empty($deposit_percent_from_payment_terms)
1342 1342
 					&& isModEnabled('facture') && $user->hasRight('facture', 'creer')
1343 1343
 				) {
1344
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
1344
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
1345 1345
 
1346 1346
 					$date = dol_mktime(0, 0, 0, GETPOST('datefmonth', 'int'), GETPOST('datefday', 'int'), GETPOST('datefyear', 'int'));
1347 1347
 					$forceFields = array();
@@ -1354,7 +1354,7 @@  discard block
 block discarded – undo
1354 1354
 
1355 1355
 					if ($deposit) {
1356 1356
 						setEventMessage('DepositGenerated');
1357
-						$locationTarget = DOL_URL_ROOT . '/compta/facture/card.php?id=' . $deposit->id;
1357
+						$locationTarget = DOL_URL_ROOT.'/compta/facture/card.php?id='.$deposit->id;
1358 1358
 					} else {
1359 1359
 						$error++;
1360 1360
 						setEventMessages($object->error, $object->errors, 'errors');
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
 				}
1363 1363
 
1364 1364
 				// Define output language
1365
-				if (! $error) {
1365
+				if (!$error) {
1366 1366
 					$db->commit();
1367 1367
 
1368 1368
 					if (!getDolGlobalString('MAIN_DISABLE_PDF_AUTOUPDATE')) {
@@ -1390,7 +1390,7 @@  discard block
 block discarded – undo
1390 1390
 					}
1391 1391
 
1392 1392
 					if ($locationTarget) {
1393
-						header('Location: ' . $locationTarget);
1393
+						header('Location: '.$locationTarget);
1394 1394
 						exit;
1395 1395
 					}
1396 1396
 				} else {
@@ -1813,7 +1813,7 @@  discard block
 block discarded – undo
1813 1813
 	print '<form name="crea_commande" action="'.$_SERVER["PHP_SELF"].'" method="POST">';
1814 1814
 	print '<input type="hidden" name="token" value="'.newToken().'">';
1815 1815
 	print '<input type="hidden" name="action" value="add">';
1816
-	print '<input type="hidden" name="changecompany" value="0">';	// will be set to 1 by javascript so we know post is done after a company change
1816
+	print '<input type="hidden" name="changecompany" value="0">'; // will be set to 1 by javascript so we know post is done after a company change
1817 1817
 	print '<input type="hidden" name="remise_percent" value="'.$soc->remise_percent.'">';
1818 1818
 	print '<input type="hidden" name="origin" value="'.$origin.'">';
1819 1819
 	print '<input type="hidden" name="originid" value="'.$originid.'">';
@@ -1991,7 +1991,7 @@  discard block
 block discarded – undo
1991 1991
 		// Other attributes
1992 1992
 		$parameters = array();
1993 1993
 		if (!empty($origin) && !empty($originid) && is_object($objectsrc)) {
1994
-			$parameters['objectsrc'] =  $objectsrc;
1994
+			$parameters['objectsrc'] = $objectsrc;
1995 1995
 		}
1996 1996
 		$parameters['socid'] = $socid;
1997 1997
 
@@ -2208,7 +2208,7 @@  discard block
 block discarded – undo
2208 2208
 			$nbMandated = 0;
2209 2209
 			foreach ($object->lines as $line) {
2210 2210
 				$res = $line->fetch_product();
2211
-				if ($res  > 0) {
2211
+				if ($res > 0) {
2212 2212
 					if ($line->product->isService() && $line->product->isMandatoryPeriod() && (empty($line->date_start) || empty($line->date_end))) {
2213 2213
 						$nbMandated++;
2214 2214
 						break;
@@ -2227,7 +2227,7 @@  discard block
 block discarded – undo
2227 2227
 				$deposit_percent_from_payment_terms = getDictionaryValue('c_payment_term', 'deposit_percent', $object->cond_reglement_id);
2228 2228
 
2229 2229
 				if (!empty($deposit_percent_from_payment_terms) && isModEnabled('facture') && $user->hasRight('facture', 'creer')) {
2230
-					require_once DOL_DOCUMENT_ROOT . '/compta/facture/class/facture.class.php';
2230
+					require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
2231 2231
 
2232 2232
 					$object->fetchObjectLinked();
2233 2233
 
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
 		$morehtmlref = '<div class="refidno">';
2439 2439
 		// Ref customer
2440 2440
 		$morehtmlref .= $form->editfieldkey("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string', '', 0, 1);
2441
-		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2441
+		$morehtmlref .= $form->editfieldval("RefCustomer", 'ref_client', $object->ref_client, $object, $usercancreate, 'string'.(isset($conf->global->THIRDPARTY_REF_INPUT_SIZE) ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
2442 2442
 		// Thirdparty
2443 2443
 		$morehtmlref .= '<br>'.$soc->getNomUrl(1, 'customer');
2444 2444
 		if (!getDolGlobalString('MAIN_DISABLE_OTHER_LINK') && $object->thirdparty->id > 0) {
@@ -2761,55 +2761,55 @@  discard block
 block discarded – undo
2761 2761
 
2762 2762
 			$alert = '';
2763 2763
 			if (getDolGlobalString('ORDER_MANAGE_MIN_AMOUNT') && $object->total_ht < $object->thirdparty->order_min_amount) {
2764
-				$alert = ' ' . img_warning($langs->trans('OrderMinAmount') . ': ' . price($object->thirdparty->order_min_amount));
2764
+				$alert = ' '.img_warning($langs->trans('OrderMinAmount').': '.price($object->thirdparty->order_min_amount));
2765 2765
 			}
2766 2766
 
2767 2767
 			print '<tr>';
2768
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
2769
-			print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2768
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
2769
+			print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2770 2770
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2771 2771
 				// Multicurrency Amount HT
2772
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2772
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2773 2773
 			}
2774 2774
 			print '</tr>';
2775 2775
 
2776 2776
 			print '<tr>';
2777
-			print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
2778
-			print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2777
+			print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
2778
+			print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2779 2779
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2780 2780
 				// Multicurrency Amount VAT
2781
-				print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2781
+				print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2782 2782
 			}
2783 2783
 			print '</tr>';
2784 2784
 
2785 2785
 			// Amount Local Taxes
2786 2786
 			if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
2787 2787
 				print '<tr>';
2788
-				print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
2789
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2788
+				print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
2789
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2790 2790
 				if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2791
-					print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2791
+					print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2792 2792
 				}
2793 2793
 				print '</tr>';
2794 2794
 
2795 2795
 				// Amount Local Taxes
2796 2796
 				if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
2797 2797
 					print '<tr>';
2798
-					print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
2799
-					print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
2798
+					print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
2799
+					print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
2800 2800
 					if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2801
-						print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
2801
+						print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
2802 2802
 					}
2803 2803
 					print '</tr>';
2804 2804
 				}
2805 2805
 			}
2806 2806
 
2807 2807
 			print '<tr>';
2808
-			print '<td>' . $langs->trans('AmountTTC') . '</td>';
2809
-			print '<td class="valuefield nowrap right amountcard">' . price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency) . '</td>';
2808
+			print '<td>'.$langs->trans('AmountTTC').'</td>';
2809
+			print '<td class="valuefield nowrap right amountcard">'.price($object->total_ttc, 1, '', 1, -1, -1, $conf->currency).'</td>';
2810 2810
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
2811 2811
 				// Multicurrency Amount TTC
2812
-				print '<td class="valuefield nowrap right amountcard">' . price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code) . '</td>';
2812
+				print '<td class="valuefield nowrap right amountcard">'.price($object->multicurrency_total_ttc, 1, '', 1, -1, -1, $object->multicurrency_code).'</td>';
2813 2813
 			}
2814 2814
 			print '</tr>'."\n";
2815 2815
 
@@ -2926,7 +2926,7 @@  discard block
 block discarded – undo
2926 2926
 						if ($usercansend) {
2927 2927
 							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER["PHP_SELF"].'?action=presend&token='.newToken().'&id='.$object->id.'&mode=init#formmailbeforetitle', '');
2928 2928
 						} else {
2929
-							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF']. '#', '', false);
2929
+							print dolGetButtonAction('', $langs->trans('SendMail'), 'email', $_SERVER['PHP_SELF'].'#', '', false);
2930 2930
 						}
2931 2931
 					}
2932 2932
 				}
@@ -2995,7 +2995,7 @@  discard block
 block discarded – undo
2995 2995
 						}*/
2996 2996
 					} else {
2997 2997
 						$langs->load("errors");
2998
-						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
2998
+						print dolGetButtonAction($langs->trans('ErrorModuleSetupNotComplete'), $langs->trans('CreateShipment'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
2999 2999
 					}
3000 3000
 				}
3001 3001
 
@@ -3053,7 +3053,7 @@  discard block
 block discarded – undo
3053 3053
 					if ($numshipping == 0) {
3054 3054
 						print dolGetButtonAction('', $langs->trans('Delete'), 'delete', $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id, '');
3055 3055
 					} else {
3056
-						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF']. '#', '', false);
3056
+						print dolGetButtonAction($langs->trans('ShippingExist'), $langs->trans('Delete'), 'default', $_SERVER['PHP_SELF'].'#', '', false);
3057 3057
 					}
3058 3058
 				}
3059 3059
 			}
Please login to merge, or discard this patch.
htdocs/commande/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@
 block discarded – undo
52 52
 
53 53
 $result = restrictedArea($user, 'commande', $id, '');
54 54
 
55
-$usercancreate  =  $user->hasRight("commande", "creer");
55
+$usercancreate  = $user->hasRight("commande", "creer");
56 56
 
57 57
 $permissionnote = $user->hasRight('commande', 'creer'); // Used by the include of actions_setnotes.inc.php
58 58
 
Please login to merge, or discard this patch.
dev/tools/rector/src/Renaming/EmptyUserRightsToFunction.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -85,17 +85,17 @@  discard block
 block discarded – undo
85 85
 			// node is !empty(...) so we set newnode to ...
86 86
 			$newnode = $node->expr->expr;
87 87
 
88
-			$tmpperm = $newnode->var;		//name of tmpperm is modulex
88
+			$tmpperm = $newnode->var; //name of tmpperm is modulex
89 89
 			if (is_null($tmpperm)) {
90 90
 				return null;
91 91
 			}
92 92
 
93
-			$tmprights = $tmpperm->var;		// name of tmprights is 'rights'
93
+			$tmprights = $tmpperm->var; // name of tmprights is 'rights'
94 94
 			if (is_null($tmprights)) {
95 95
 				return null;
96 96
 			}
97 97
 			if (!$this->isName($tmprights, 'rights')) {
98
-				$tmprights2 = $tmprights->var;	// name of tmprights is 'rights'
98
+				$tmprights2 = $tmprights->var; // name of tmprights is 'rights'
99 99
 				if (is_null($tmprights2)) {
100 100
 					return null;
101 101
 				}
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
 				$tmprights = $tmprights2;
106 106
 			}
107 107
 
108
-			$tmpuser = $tmprights->var;			// name of tmpuser is 'user'
108
+			$tmpuser = $tmprights->var; // name of tmpuser is 'user'
109 109
 			if (!$this->isName($tmpuser, 'user')) {
110 110
 				return null;
111 111
 			}
@@ -126,19 +126,19 @@  discard block
 block discarded – undo
126 126
 
127 127
 		if ($node instanceof Node\Expr\Empty_) {
128 128
 			// node is empty(...) so we set newnode to ...
129
-			$newnode = $node->expr;			// name of node is perm
129
+			$newnode = $node->expr; // name of node is perm
130 130
 
131
-			$tmpperm = $newnode->var;		//name of tmpperm is modulex
131
+			$tmpperm = $newnode->var; //name of tmpperm is modulex
132 132
 			if (is_null($tmpperm)) {
133 133
 				return null;
134 134
 			}
135 135
 
136
-			$tmprights = $tmpperm->var;		// name of tmprights is 'rights'
136
+			$tmprights = $tmpperm->var; // name of tmprights is 'rights'
137 137
 			if (is_null($tmprights)) {
138 138
 				return null;
139 139
 			}
140 140
 			if (!$this->isName($tmprights, 'rights')) {
141
-				$tmprights2 = $tmprights->var;	// name of tmprights is 'rights'
141
+				$tmprights2 = $tmprights->var; // name of tmprights is 'rights'
142 142
 				if (is_null($tmprights2)) {
143 143
 					return null;
144 144
 				}
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 				$tmprights = $tmprights2;
149 149
 			}
150 150
 
151
-			$tmpuser = $tmprights->var;			// name of tmpuser is 'user'
151
+			$tmpuser = $tmprights->var; // name of tmpuser is 'user'
152 152
 			if (!$this->isName($tmpuser, 'user')) {
153 153
 				return null;
154 154
 			}
@@ -181,14 +181,14 @@  discard block
 block discarded – undo
181 181
 		return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
182 182
 			$booleanAnd,
183 183
 			// $conf->global == $value
184
-			function (Node $node): bool {
184
+			function(Node $node): bool {
185 185
 				if (!$node instanceof Equal) {
186 186
 					return \false;
187 187
 				}
188 188
 				return $this->isGlobalVar($node->left);
189 189
 			},
190 190
 			// !empty(...) || isset(...)
191
-			function (Node $node): bool {
191
+			function(Node $node): bool {
192 192
 				if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
193 193
 					return $this->isGlobalVar($node->expr->expr);
194 194
 				}
Please login to merge, or discard this patch.
dev/tools/rector/src/Renaming/EmptyGlobalToFunction.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -83,9 +83,9 @@  discard block
 block discarded – undo
83 83
 				return null;
84 84
 			}
85 85
 			// node is !empty(...) so we set newnode to ...
86
-			$newnode = $node->expr->expr;		// newnode is conf->global->...
86
+			$newnode = $node->expr->expr; // newnode is conf->global->...
87 87
 
88
-			$tmpglobal = $newnode->var;			// tmpglobal is global->...
88
+			$tmpglobal = $newnode->var; // tmpglobal is global->...
89 89
 			if (is_null($tmpglobal)) {
90 90
 				return null;
91 91
 			}
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 				return null;
94 94
 			}
95 95
 
96
-			$tmpconf = $tmpglobal->var;			// tmpconf is conf->
96
+			$tmpconf = $tmpglobal->var; // tmpconf is conf->
97 97
 			if (!$this->isName($tmpconf, 'conf')) {
98 98
 				return null;
99 99
 			}
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
 
115 115
 		if ($node instanceof Node\Expr\Empty_) {
116 116
 			// node is empty(...) so we set newnode to ...
117
-			$newnode = $node->expr;			// newnode is conf->global->...
117
+			$newnode = $node->expr; // newnode is conf->global->...
118 118
 
119
-			$tmpglobal = $newnode->var;		// tmpglobal is global->...
119
+			$tmpglobal = $newnode->var; // tmpglobal is global->...
120 120
 			if (is_null($tmpglobal)) {
121 121
 				return null;
122 122
 			}
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 				return null;
125 125
 			}
126 126
 
127
-			$tmpconf = $tmpglobal->var;		// tmpconf is conf->
127
+			$tmpconf = $tmpglobal->var; // tmpconf is conf->
128 128
 			if (!$this->isName($tmpconf, 'conf')) {
129 129
 				return null;
130 130
 			}
@@ -155,14 +155,14 @@  discard block
 block discarded – undo
155 155
 		return $this->binaryOpManipulator->matchFirstAndSecondConditionNode(
156 156
 			$booleanAnd,
157 157
 			// $conf->global == $value
158
-			function (Node $node): bool {
158
+			function(Node $node): bool {
159 159
 				if (!$node instanceof Equal) {
160 160
 					return \false;
161 161
 				}
162 162
 				return $this->isGlobalVar($node->left);
163 163
 			},
164 164
 			// !empty(...) || isset(...)
165
-			function (Node $node): bool {
165
+			function(Node $node): bool {
166 166
 				if ($node instanceof BooleanNot && $node->expr instanceof Empty_) {
167 167
 					return $this->isGlobalVar($node->expr->expr);
168 168
 				}
Please login to merge, or discard this patch.
dev/tools/rector/src/Renaming/UserRightsToFunction.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
 			return $node;
100 100
 		}
101 101
 
102
-		$caseok = false;	// Will be tru if we can make the replacement. We must not do it for assignement like when $user->right->aaa->bbb = ...
102
+		$caseok = false; // Will be tru if we can make the replacement. We must not do it for assignement like when $user->right->aaa->bbb = ...
103 103
 		$isInverse = false;
104 104
 		if ($node instanceof Node\Expr\BooleanNot) {
105 105
 			if (!$node->expr instanceof Node\Expr\Empty_) {
Please login to merge, or discard this patch.