Completed
Branch develop (bdd8dc)
by
unknown
22:55
created
htdocs/core/modules/modHoliday.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -303,7 +303,7 @@
 block discarded – undo
303 303
 		$this->import_icon[$r] = 'holiday';
304 304
 		$this->import_tables_array[$r] = array('d' => MAIN_DB_PREFIX.'holiday');
305 305
 		$this->import_fields_array[$r] = array(
306
-			'd.ref' => 'Ref*', 'd.fk_user' => 'UserID*', 'd.fk_type' => 'TypeOfLeaveId*','d.fk_validator' => 'ApprovedBy*',
306
+			'd.ref' => 'Ref*', 'd.fk_user' => 'UserID*', 'd.fk_type' => 'TypeOfLeaveId*', 'd.fk_validator' => 'ApprovedBy*',
307 307
 			'd.date_debut' => 'DateStart*', 'd.date_fin' => 'DateEnd*', 'd.halfday' => 'HalfDay', 'd.description' => 'Description*',
308 308
 			'd.date_create' => 'DateCreation*'
309 309
 		);
Please login to merge, or discard this patch.
htdocs/filefunc.inc.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 	define('DOL_APPLICATION_TITLE', 'Dolibarr');
40 40
 }
41 41
 
42
-require_once 'version.inc.php';		// Define the DOL_VERSION
42
+require_once 'version.inc.php'; // Define the DOL_VERSION
43 43
 
44 44
 
45 45
 // Define syslog constants
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 // Define localization of conf file
126 126
 // --- Start of part replaced by Dolibarr packager makepack-dolibarr
127 127
 $conffile = "conf/conf.php";
128
-$conffiletoshow = "htdocs/conf/conf.php";	// Used into the include
128
+$conffiletoshow = "htdocs/conf/conf.php"; // Used into the include
129 129
 // For debian/redhat like systems
130 130
 //$conffile = "/etc/dolibarr/conf.php";
131 131
 //$conffiletoshow = "/etc/dolibarr/conf.php";
Please login to merge, or discard this patch.
htdocs/webportal/controllers/document.controller.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 * \brief       This file is a controller for documents
24 24
 */
25 25
 
26
-require_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
26
+require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
27 27
 
28 28
 
29 29
 /**
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 		}
153 153
 
154 154
 		// Security: Delete string ../ or ..\ into $original_file
155
-		$original_file = preg_replace('/\.\.+/', '..', $original_file);    // Replace '... or more' with '..'
155
+		$original_file = preg_replace('/\.\.+/', '..', $original_file); // Replace '... or more' with '..'
156 156
 		$original_file = str_replace('../', '/', $original_file);
157 157
 		$original_file = str_replace('..\\', '/', $original_file);
158 158
 
@@ -169,13 +169,13 @@  discard block
 block discarded – undo
169 169
 		// check config access
170 170
 		// and file mime type (only PDF)
171 171
 		// and check login access
172
-		if (getDolGlobalInt('WEBPORTAL_' . $moduleNameUpperEn . '_LIST_ACCESS')
172
+		if (getDolGlobalInt('WEBPORTAL_'.$moduleNameUpperEn.'_LIST_ACCESS')
173 173
 			&& in_array($type, array('application/pdf'))
174 174
 			&& ($context->logged_thirdparty && $context->logged_thirdparty->id > 0)
175 175
 			&& $context->logged_thirdparty->id == $socId
176 176
 		) {
177 177
 			if (isModEnabled($moduleName) && isset($conf->{$moduleName}->multidir_output[$entity])) {
178
-				$original_file = $conf->{$moduleName}->multidir_output[$entity] . '/' . $original_file;
178
+				$original_file = $conf->{$moduleName}->multidir_output[$entity].'/'.$original_file;
179 179
 				$accessallowed = 1;
180 180
 			}
181 181
 		}
@@ -190,13 +190,13 @@  discard block
 block discarded – undo
190 190
 		// Security:
191 191
 		// We refuse directory transversal change and pipes in file names
192 192
 		if (preg_match('/\.\./', $fullpath_original_file) || preg_match('/[<>|]/', $fullpath_original_file)) {
193
-			dol_syslog("Refused to deliver file " . $fullpath_original_file);
194
-			print "ErrorFileNameInvalid: " . dol_escape_htmltag($original_file);
193
+			dol_syslog("Refused to deliver file ".$fullpath_original_file);
194
+			print "ErrorFileNameInvalid: ".dol_escape_htmltag($original_file);
195 195
 			exit;
196 196
 		}
197 197
 
198 198
 		// Find the subdirectory name as the reference
199
-		$refname = basename(dirname($original_file) . "/");
199
+		$refname = basename(dirname($original_file)."/");
200 200
 
201 201
 		$filename = basename($fullpath_original_file);
202 202
 		$filename = preg_replace('/\.noexe$/i', '', $filename);
@@ -207,8 +207,8 @@  discard block
 block discarded – undo
207 207
 
208 208
 		// This test if file exists should be useless. We keep it to find bug more easily
209 209
 		if (!file_exists($fullpath_original_file_osencoded)) {
210
-			dol_syslog("ErrorFileDoesNotExists: " . $fullpath_original_file);
211
-			print "ErrorFileDoesNotExists: " . $original_file;
210
+			dol_syslog("ErrorFileDoesNotExists: ".$fullpath_original_file);
211
+			print "ErrorFileDoesNotExists: ".$original_file;
212 212
 			exit;
213 213
 		}
214 214
 
@@ -217,8 +217,8 @@  discard block
 block discarded – undo
217 217
 		if ($fileSizeMax && $fileSize > ($fileSizeMax * 1024)) {
218 218
 			// FIX: Convert limit from Ko to bytes for proper comparison
219 219
 			$fileSizeKb = round($fileSize / 1024, 2);
220
-			dol_syslog('ErrorFileSizeTooLarge: ' . $fileSize . ' bytes (' . $fileSizeKb . ' Kb) - max allowed: ' . $fileSizeMax . ' Kb');
221
-			print 'ErrorFileSizeTooLarge: ' . $fileSizeKb . ' Kb (max ' . $fileSizeMax . ' Kb)';
220
+			dol_syslog('ErrorFileSizeTooLarge: '.$fileSize.' bytes ('.$fileSizeKb.' Kb) - max allowed: '.$fileSizeMax.' Kb');
221
+			print 'ErrorFileSizeTooLarge: '.$fileSizeKb.' Kb (max '.$fileSizeMax.' Kb)';
222 222
 			exit;
223 223
 		}
224 224
 
@@ -230,9 +230,9 @@  discard block
 block discarded – undo
230 230
 		$object = new stdClass();
231 231
 		$reshook = $hookmanager->executeHooks('downloadDocument', $parameters, $object, $action); // Note that $action and $object may have been
232 232
 		if ($reshook < 0) {
233
-			$errors = $hookmanager->error . (is_array($hookmanager->errors) ? (!empty($hookmanager->error) ? ', ' : '') . implode(', ', $hookmanager->errors) : '');
234
-			dol_syslog("document.php - Errors when executing the hook 'downloadDocument' : " . $errors);
235
-			print "ErrorDownloadDocumentHooks: " . $errors;
233
+			$errors = $hookmanager->error.(is_array($hookmanager->errors) ? (!empty($hookmanager->error) ? ', ' : '').implode(', ', $hookmanager->errors) : '');
234
+			dol_syslog("document.php - Errors when executing the hook 'downloadDocument' : ".$errors);
235
+			print "ErrorDownloadDocumentHooks: ".$errors;
236 236
 			exit;
237 237
 		}
238 238
 
@@ -310,19 +310,19 @@  discard block
 block discarded – undo
310 310
 		top_httphead($type);
311 311
 		header('Content-Description: File Transfer');
312 312
 		if ($encoding) {
313
-			header('Content-Encoding: ' . $encoding);
313
+			header('Content-Encoding: '.$encoding);
314 314
 		}
315 315
 		// Add MIME Content-Disposition from RFC 2183 (inline=automatically displayed, attachment=need user action to open)
316 316
 		if ($attachment) {
317
-			header('Content-Disposition: attachment; filename="' . $filename . '"');
317
+			header('Content-Disposition: attachment; filename="'.$filename.'"');
318 318
 		} else {
319
-			header('Content-Disposition: inline; filename="' . $filename . '"');
319
+			header('Content-Disposition: inline; filename="'.$filename.'"');
320 320
 		}
321 321
 		header('Cache-Control: Public, must-revalidate');
322 322
 		header('Pragma: public');
323 323
 
324 324
 		// Send file now
325
-		header('Content-Length: ' . dol_filesize($fullpath_original_file));
325
+		header('Content-Length: '.dol_filesize($fullpath_original_file));
326 326
 		readfileLowMemory($fullpath_original_file_osencoded);
327 327
 	}
328 328
 }
Please login to merge, or discard this patch.
htdocs/product/stock/class/api_productlots.class.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 
21 21
 use Luracast\Restler\RestException;
22 22
 
23
-require_once DOL_DOCUMENT_ROOT . '/product/stock/class/productlot.class.php';
23
+require_once DOL_DOCUMENT_ROOT.'/product/stock/class/productlot.class.php';
24 24
 
25 25
 /**
26 26
  * API class for Product lots
@@ -269,7 +269,7 @@  discard block
 block discarded – undo
269 269
 		if ($result) {
270 270
 			$this->productlot->fetch_optionals();
271 271
 			$this->productlot->fetch_userassigned();
272
-			$this->productlot->oldcopy = clone $this->productlot;  // @phan-suppress-current-line PhanTypeMismatchProperty
272
+			$this->productlot->oldcopy = clone $this->productlot; // @phan-suppress-current-line PhanTypeMismatchProperty
273 273
 		}
274 274
 		if (!$result) {
275 275
 			throw new RestException(404, 'productlot not found');
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 		$result = $this->productlot->fetch($id);
327 327
 		if ($result) {
328 328
 			$this->productlot->fetch_optionals();
329
-			$this->productlot->oldcopy = clone $this->productlot;  // @phan-suppress-current-line PhanTypeMismatchProperty
329
+			$this->productlot->oldcopy = clone $this->productlot; // @phan-suppress-current-line PhanTypeMismatchProperty
330 330
 		}
331 331
 
332 332
 		if (!$result) {
Please login to merge, or discard this patch.
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,7 +161,9 @@  discard block
 block discarded – undo
161 161
 
162 162
 		while ($i < $max) {
163 163
 			$obj = $this->db->fetch_object($res);
164
-			if (!$obj) break;
164
+			if (!$obj) {
165
+				break;
166
+			}
165 167
 
166 168
 			$pl = new Productlot($this->db);
167 169
 			if ($pl->fetch((int) $obj->rowid) > 0) {
@@ -176,7 +178,9 @@  discard block
 block discarded – undo
176 178
 			$totRes = $this->db->query($sqlTotals);
177 179
 			if ($totRes) {
178 180
 				$row = $this->db->fetch_object($totRes);
179
-				if ($row && isset($row->total)) $total = (int) $row->total;
181
+				if ($row && isset($row->total)) {
182
+					$total = (int) $row->total;
183
+				}
180 184
 			}
181 185
 
182 186
 			// Evite division par zéro
Please login to merge, or discard this patch.
htdocs/version.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,5 +43,5 @@
 block discarded – undo
43 43
 // DOL_VERSION is now a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
44 44
 
45 45
 if (!defined('CERTIF_LNE')) {
46
-	define('CERTIF_LNE', '1');	// Set to 1 if the beta version is a candidate for certification or if the stable version has been certified. Use 2 for debug to force LNE features.
46
+	define('CERTIF_LNE', '1'); // Set to 1 if the beta version is a candidate for certification or if the stable version has been certified. Use 2 for debug to force LNE features.
47 47
 }
Please login to merge, or discard this patch.
htdocs/fourn/facture/list.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 $search_multicurrency_montant_ht = GETPOST('search_multicurrency_montant_ht', 'alpha');
94 94
 $search_multicurrency_montant_vat = GETPOST('search_multicurrency_montant_vat', 'alpha');
95 95
 $search_multicurrency_montant_ttc = GETPOST('search_multicurrency_montant_ttc', 'alpha');
96
-$search_status = GETPOST('search_status', 'intcomma');	// Can be '' or a numeric
96
+$search_status = GETPOST('search_status', 'intcomma'); // Can be '' or a numeric
97 97
 $search_paymentmode = GETPOST('search_paymentmode', 'intcomma');
98 98
 $search_paymentcond = GETPOST('search_paymentcond') ? GETPOSTINT('search_paymentcond') : '';
99 99
 $search_vat_reverse_charge = GETPOST('search_vat_reverse_charge', 'alpha');
@@ -692,10 +692,10 @@  discard block
 block discarded – undo
692 692
 	$sql .= " AND f.vat_reverse_charge = ".((int) $search_vat_reverse_charge);
693 693
 }
694 694
 if ($search_date_start) {
695
-	$sql .= " AND f.datef >= '" . $db->idate($search_date_start) . "'";
695
+	$sql .= " AND f.datef >= '".$db->idate($search_date_start)."'";
696 696
 }
697 697
 if ($search_date_end) {
698
-	$sql .= " AND f.datef <= '" . $db->idate($search_date_end) . "'";
698
+	$sql .= " AND f.datef <= '".$db->idate($search_date_end)."'";
699 699
 }
700 700
 if ($search_note_public) {
701 701
 	$sql .= " AND f.note_public LIKE '%".$db->escape($db->escapeforlike($search_note_public))."%'";
@@ -704,10 +704,10 @@  discard block
 block discarded – undo
704 704
 	$sql .= " AND f.note_private LIKE '%".$db->escape($db->escapeforlike($search_note_private))."%'";
705 705
 }
706 706
 if ($search_datelimit_start) {
707
-	$sql .= " AND f.date_lim_reglement >= '" . $db->idate($search_datelimit_start) . "'";
707
+	$sql .= " AND f.date_lim_reglement >= '".$db->idate($search_datelimit_start)."'";
708 708
 }
709 709
 if ($search_datelimit_end) {
710
-	$sql .= " AND f.date_lim_reglement <= '" . $db->idate($search_datelimit_end) . "'";
710
+	$sql .= " AND f.date_lim_reglement <= '".$db->idate($search_datelimit_end)."'";
711 711
 }
712 712
 if ($option == 'late') {
713 713
 	$sql .= " AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->fournisseur->warning_delay)."'";
@@ -737,7 +737,7 @@  discard block
 block discarded – undo
737 737
 			if ($searchCategorySupplierInvoiceOperator == 0) {
738 738
 				$searchCategorySupplierInvoiceSqlList[] = " EXISTS (SELECT ck.fk_supplier_invoice FROM ".MAIN_DB_PREFIX."categorie_supplier_invoice as ck WHERE f.rowid = ck.fk_supplier_invoice AND ck.fk_categorie = ".((int) $searchCategorySupplierInvoice).")";
739 739
 			} else {
740
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplierInvoice);
740
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplierInvoice);
741 741
 			}
742 742
 		}
743 743
 	}
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
 			if ($searchCategorySupplierOperator == 0) {
768 768
 				$searchCategorySupplierSqlList[] = " EXISTS (SELECT ck.fk_soc FROM ".MAIN_DB_PREFIX."categorie_fournisseur as ck WHERE s.rowid = ck.fk_soc AND ck.fk_categorie = ".((int) $searchCategorySupplier).")";
769 769
 			} else {
770
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategorySupplier);
770
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategorySupplier);
771 771
 			}
772 772
 		}
773 773
 	}
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 			if ($searchCategoryProductOperator == 0) {
798 798
 				$searchCategoryProductSqlList[] = " EXISTS (SELECT ck.fk_product FROM ".MAIN_DB_PREFIX."categorie_product as ck, ".MAIN_DB_PREFIX."facture_fourn_det as fd WHERE fd.fk_facture_fourn = f.rowid AND fd.fk_product = ck.fk_product AND ck.fk_categorie = ".((int) $searchCategoryProduct).")";
799 799
 			} else {
800
-				$listofcategoryid .= ($listofcategoryid ? ', ' : '') .((int) $searchCategoryProduct);
800
+				$listofcategoryid .= ($listofcategoryid ? ', ' : '').((int) $searchCategoryProduct);
801 801
 			}
802 802
 		}
803 803
 	}
@@ -904,8 +904,8 @@  discard block
 block discarded – undo
904 904
 llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'bodyforlist mod-fourn-facture page-list');
905 905
 
906 906
 if ($search_fk_fac_rec_source) {
907
-	require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture-rec.class.php';
908
-	require_once DOL_DOCUMENT_ROOT . '/core/lib/invoice.lib.php';
907
+	require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture-rec.class.php';
908
+	require_once DOL_DOCUMENT_ROOT.'/core/lib/invoice.lib.php';
909 909
 	$object = new FactureFournisseurRec($db);
910 910
 	$object->fetch((int) $search_fk_fac_rec_source);
911 911
 
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
 	$param .= '&search_type_thirdparty='.$search_type_thirdparty;
1056 1056
 }
1057 1057
 if ($search_fk_fac_rec_source) {
1058
-	$param .= '&search_fk_fac_rec_source=' . (int) $search_fk_fac_rec_source;
1058
+	$param .= '&search_fk_fac_rec_source='.(int) $search_fk_fac_rec_source;
1059 1059
 }
1060 1060
 
1061 1061
 // Add $param from extra fields
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
 }
1189 1189
 
1190 1190
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1191
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1191
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1192 1192
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1193 1193
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1194 1194
 
Please login to merge, or discard this patch.