Completed
Branch develop (c23a95)
by
unknown
18:46
created
htdocs/core/boxes/box_produits.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -150,9 +150,9 @@
 block discarded – undo
150 150
 					$productstatic->accountancy_code_buy_export = $objp->accountancy_code_buy_export;
151 151
 					$productstatic->date_modification = $datem;
152 152
 
153
-					$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read');
153
+					$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read');
154 154
 					if ($productstatic->isService()) {
155
-						$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read');
155
+						$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read');
156 156
 					}
157 157
 
158 158
 					$this->info_box_contents[$line][] = array(
Please login to merge, or discard this patch.
htdocs/core/boxes/box_graph_ticket_by_severity.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -83,8 +83,8 @@  discard block
 block discarded – undo
83 83
 		$badgeStatus7 = '#baa32b';
84 84
 		$badgeStatus8 = '#993013';
85 85
 		$badgeStatus9 = '#e7f0f0';
86
-		if (file_exists(DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php')) {
87
-			include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php';
86
+		if (file_exists(DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php')) {
87
+			include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
88 88
 		}
89 89
 		$this->max = $max;
90 90
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 		$colorseriesstat = array();
102 102
 		if ($user->hasRight('ticket', 'read')) {
103 103
 			$sql = "SELECT cts.rowid, cts.label, cts.code";
104
-			$sql .= " FROM " . MAIN_DB_PREFIX . "c_ticket_severity as cts";
104
+			$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_severity as cts";
105 105
 			$sql .= " WHERE cts.active = 1";
106 106
 			$sql .= $this->db->order('cts.rowid', 'ASC');
107 107
 			$resql = $this->db->query($sql);
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
 			$dataseries = array();
139 139
 			$data = array();
140 140
 			$sql = "SELECT t.severity_code, COUNT(t.severity_code) as nb";
141
-			$sql .= " FROM " . MAIN_DB_PREFIX . "ticket as t";
141
+			$sql .= " FROM ".MAIN_DB_PREFIX."ticket as t";
142 142
 			$sql .= " WHERE t.fk_statut <> 8";
143 143
 			$sql .= " GROUP BY t.severity_code";
144 144
 			$resql = $this->db->query($sql);
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 				}
153 153
 				foreach ($listofoppcode as $rowid => $code) {
154 154
 					$dataseries[] = array(
155
-						'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort' . $code, 'c_ticket_severity', 'code', 'label', $code),
155
+						'label' => $langs->getLabelFromKey($this->db, 'TicketSeverityShort'.$code, 'c_ticket_severity', 'code', 'label', $code),
156 156
 						'data' => (empty($data[$code]) ? 0 : $data[$code])
157 157
 					);
158 158
 				}
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 					$stringtoprint .= $px1->show($totalnb ? 0 : 1);
191 191
 				}
192 192
 				$stringtoprint .= '</div>';
193
-				$this->info_box_contents[][]=array(
193
+				$this->info_box_contents[][] = array(
194 194
 					'td' => 'class="center"',
195 195
 					'text' => $stringtoprint
196 196
 				);
Please login to merge, or discard this patch.
htdocs/core/triggers/interface_95_modWebhook_WebhookTriggers.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@
 block discarded – undo
122 122
 
123 123
 				$response = getURLContent($tmpobject->url, 'POST', $jsonstr, 1, array(), array('http', 'https'), 0, -1);
124 124
 				if (empty($response['curl_error_no']) && $response['http_code'] >= 200 && $response['http_code'] < 300) {
125
-					$nbPosts ++;
125
+					$nbPosts++;
126 126
 				} else {
127
-					$errors ++;
127
+					$errors++;
128 128
 					dol_syslog("Failed to get url with httpcode=".(!empty($response['http_code']) ? $response['http_code'] : "")." curl_error_no=".(!empty($response['curl_error_no']) ? $response['curl_error_no'] : ""), LOG_DEBUG);
129 129
 				}
130 130
 			}
Please login to merge, or discard this patch.
htdocs/core/db/pgsql.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -756,10 +756,10 @@
 block discarded – undo
756 756
 	public function regexpsql($subject, $pattern, $sqlstring = false)
757 757
 	{
758 758
 		if ($sqlstring) {
759
-			return "(". $subject ." ~ '" . $pattern . "')";
759
+			return "(".$subject." ~ '".$pattern."')";
760 760
 		}
761 761
 
762
-		return "('". $subject ."' ~ '" . $pattern . "')";
762
+		return "('".$subject."' ~ '".$pattern."')";
763 763
 	}
764 764
 
765 765
 
Please login to merge, or discard this patch.
htdocs/core/db/DoliDB.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,10 +119,10 @@
 block discarded – undo
119 119
 	public function regexpsql($subject, $pattern, $sqlstring = false)
120 120
 	{
121 121
 		if ($sqlstring) {
122
-			return "(". $subject ." REGEXP '" . $pattern . "')";
122
+			return "(".$subject." REGEXP '".$pattern."')";
123 123
 		}
124 124
 
125
-		return "('". $subject ."' REGEXP '" . $pattern . "')";
125
+		return "('".$subject."' REGEXP '".$pattern."')";
126 126
 	}
127 127
 
128 128
 
Please login to merge, or discard this patch.
htdocs/core/ajax/selectsearchbox.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@
 block discarded – undo
113 113
 if (isModEnabled('supplier_proposal') && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_PROPAL_DISABLED) && $user->hasRight('supplier_proposal', 'lire')) {
114 114
 	$arrayresult['searchintosupplierpropal'] = array('position'=>100, 'img'=>'object_supplier_proposal', 'label'=>$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_proposal', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierProposals", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/supplier_proposal/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
115 115
 }
116
-if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') &&  $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
116
+if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'commande', 'lire')) || (isModEnabled('supplier_order') && $user->hasRight('supplier_order', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_ORDER_DISABLED)) {
117 117
 	$arrayresult['searchintosupplierorder'] = array('position'=>110, 'img'=>'object_supplier_order', 'label'=>$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'text'=>img_picto('', 'object_supplier_order', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoSupplierOrders", $search_boxvalue), 'url'=>DOL_URL_ROOT.'/fourn/commande/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
118 118
 }
119 119
 if (((isModEnabled('fournisseur') && empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight('fournisseur', 'facture', 'lire')) || (isModEnabled('supplier_invoice') && $user->hasRight('supplier_invoice', 'lire'))) && empty($conf->global->MAIN_SEARCHFORM_SUPPLIER_INVOICE_DISABLED)) {
Please login to merge, or discard this patch.
htdocs/core/ajax/row.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 	if ($reshook > 0) {
133 133
 		$perm = $hookmanager->resArray['perm'];
134 134
 	}
135
-	if (! $perm) {
135
+	if (!$perm) {
136 136
 		// We should not be here. If we are not allowed to reorder rows, feature should not be visible on script.
137 137
 		// If we are here, it is a hack attempt, so we report a warning.
138 138
 		print 'Bad permission to modify position of lines for object in table '.$table_element_line;
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
 
155 155
 	// Reorder line to have position of children lines sharing same counter than parent lines
156 156
 	// This should be useless because there is no need to have children sharing same counter than parent, but well, it's cleaner into database.
157
-	if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande','fk_contrat'))) {
157
+	if (in_array($fk_element, array('fk_facture', 'fk_propal', 'fk_commande', 'fk_contrat'))) {
158 158
 		$result = $row->line_order(true);
159 159
 	}
160 160
 } else {
Please login to merge, or discard this patch.
htdocs/core/lib/product.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@  discard block
 block discarded – undo
38 38
 	$langs->load("products");
39 39
 
40 40
 	$label = $langs->trans('Product');
41
-	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('product', 'product_advance', 'read_prices'):$user->hasRight('product', 'read');
41
+	$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('product', 'product_advance', 'read_prices') : $user->hasRight('product', 'read');
42 42
 
43 43
 	if ($object->isService()) {
44 44
 		$label = $langs->trans('Service');
45
-		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS')?$user->hasRight('service', 'service_advance', 'read_prices'):$user->hasRight('service', 'read');
45
+		$usercancreadprice = getDolGlobalString('MAIN_USE_ADVANCED_PERMS') ? $user->hasRight('service', 'service_advance', 'read_prices') : $user->hasRight('service', 'read');
46 46
 	}
47 47
 
48 48
 	$h = 0;
@@ -276,10 +276,10 @@  discard block
 block discarded – undo
276 276
 		if (!empty($object->note_public)) {
277 277
 			$nbNote++;
278 278
 		}
279
-		$head[$h][0] = DOL_URL_ROOT .'/product/stock/productlot_note.php?id=' . $object->id;
279
+		$head[$h][0] = DOL_URL_ROOT.'/product/stock/productlot_note.php?id='.$object->id;
280 280
 		$head[$h][1] = $langs->trans('Notes');
281 281
 		if ($nbNote > 0) {
282
-			$head[$h][1] .= '<span class="badge marginleftonlyshort">' . $nbNote . '</span>';
282
+			$head[$h][1] .= '<span class="badge marginleftonlyshort">'.$nbNote.'</span>';
283 283
 		}
284 284
 		$head[$h][2] = 'note';
285 285
 		$h++;
Please login to merge, or discard this patch.
htdocs/core/lib/fourn.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,10 +175,10 @@
 block discarded – undo
175 175
 			$dispachedLines = $object->getDispachedLines(1);
176 176
 			$nbDispachedLines = count($dispachedLines);
177 177
 
178
-			for ($line = 0 ; $line < $nbDispachedLines; $line++) {
178
+			for ($line = 0; $line < $nbDispachedLines; $line++) {
179 179
 				$sumQtyAllreadyDispatched = $sumQtyAllreadyDispatched + $dispachedLines[$line]['qty'];
180 180
 			}
181
-			for ($line = 0 ; $line < $nbLinesOrdered; $line++) {
181
+			for ($line = 0; $line < $nbLinesOrdered; $line++) {
182 182
 				//If line is a product of conf to manage stocks for services
183 183
 				if ($object->lines[$line]->product_type == 0 || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) {
184 184
 					$sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty;
Please login to merge, or discard this patch.