Completed
Branch develop (01d7e2)
by
unknown
24:53
created
htdocs/core/lib/website.lib.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
  */
34 34
 function dolStripPhpCode($str, $replacewith = '')
35 35
 {
36
-	$str = str_replace('<?=', '<?php echo', $str);	// replace a bad practive
36
+	$str = str_replace('<?=', '<?php echo', $str); // replace a bad practive
37 37
 
38 38
 	$newstr = '';
39 39
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 {
80 80
 	$str = str_replace('<?=', '<?php echo', $str);
81 81
 	$str = str_replace('<?php', '__LTINTPHP__', $str);
82
-	$str = str_replace('<?', '<?php', $str);			// replace the short_open_tag. It is recommended to set this to Off in php.ini
82
+	$str = str_replace('<?', '<?php', $str); // replace the short_open_tag. It is recommended to set this to Off in php.ini
83 83
 	$str = str_replace('__LTINTPHP__', '<?php', $str);
84 84
 
85 85
 	$newstr = '';
@@ -286,7 +286,7 @@  discard block
 block discarded – undo
286 286
 	global $db, $langs, $conf, $user;
287 287
 	global $dolibarr_main_url_root, $dolibarr_main_data_root;
288 288
 	global $website;
289
-	global $includehtmlcontentopened;	// $includehtmlcontentopened is the level of includes (start at 0 for main page, 1 for first level include, ...)
289
+	global $includehtmlcontentopened; // $includehtmlcontentopened is the level of includes (start at 0 for main page, 1 for first level include, ...)
290 290
 	'@phan-var-force Website $website';
291 291
 
292 292
 	$nbrep = 0;
@@ -332,9 +332,9 @@  discard block
 block discarded – undo
332 332
 		// at end we replace the '!~!~!~' only if we are in final parent page.
333 333
 		$content = preg_replace('/(href=")\/?([^:\"\!]*)\.php\?([^#\"<>]*)(#[^\"<>]*)?\"/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2&\3\4"', $content, -1, $nbrep);
334 334
 		// Replace occurrence like _service_XXX.php with dolibarr URL
335
-		$content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_service_\2\1', $content, -1, $nbrep);
335
+		$content = preg_replace('/([\'"])_service_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_service_\2\1', $content, -1, $nbrep);
336 336
 		// Replace occurrence like _library_XXX.php with dolibarr URL
337
-		$content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~' . DOL_URL_ROOT . '/public/website/index.php?website=' . $website->ref . '&pageref=_library_\2\1', $content, -1, $nbrep);
337
+		$content = preg_replace('/([\'"])_library_([^\'"]+)\.php\1/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=_library_\2\1', $content, -1, $nbrep);
338 338
 		// Replace relative link without .php like /xxx#aaa or /xxx with dolibarr URL:  ...href="....php"
339 339
 		$content = preg_replace('/(href=")\/?([a-zA-Z0-9\-_#]+)(\"|\?)/', '\1!~!~!~'.DOL_URL_ROOT.'/public/website/index.php?website='.$website->ref.'&pageref=\2\3', $content, -1, $nbrep);
340 340
 
@@ -432,7 +432,7 @@  discard block
 block discarded – undo
432 432
 	}
433 433
 
434 434
 	if (getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY')) {
435
-		$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite ' . getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content);
435
+		$content = str_replace('<body id="bodywebsite" class="bodywebsite', '<body id="bodywebsite" class="bodywebsite '.getDolGlobalString('WEBSITE_ADD_CSS_TO_BODY'), $content);
436 436
 	}
437 437
 
438 438
 	$content = dolReplaceSmileyCodeWithUTF8($content);
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 			$sql .= " WHERE rowid = ".((int) $websiteid);
470 470
 
471 471
 			$resql = $db->query($sql);
472
-			if (! $resql) {
472
+			if (!$resql) {
473 473
 				return -1;
474 474
 			}
475 475
 		}
@@ -558,7 +558,7 @@  discard block
 block discarded – undo
558 558
 			unset($tmpwebsitepage);
559 559
 		}
560 560
 		if ($result > 0) {
561
-			$currenturi = $_SERVER["REQUEST_URI"];	// Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483
561
+			$currenturi = $_SERVER["REQUEST_URI"]; // Example: /public/website/index.php?website=mywebsite.com&pageref=mywebsite-home&nocache=1708177483
562 562
 			$regtmp = array();
563 563
 			if (preg_match('/&pageref=([^&]+)/', $currenturi, $regtmp)) {
564 564
 				if ($regtmp[0] == $containerref) {
@@ -581,7 +581,7 @@  discard block
 block discarded – undo
581 581
 	if ($newurl) {
582 582
 		if (!empty($parameters)) {
583 583
 			$separator = (parse_url($newurl, PHP_URL_QUERY) == null) ? '?' : '&';
584
-			$newurl = $newurl . $separator . http_build_query($parameters);
584
+			$newurl = $newurl.$separator.http_build_query($parameters);
585 585
 		}
586 586
 		if ($permanent) {
587 587
 			header("Status: 301 Moved Permanently", false, 301);
@@ -946,7 +946,7 @@  discard block
 block discarded – undo
946 946
 		$hashtags = trim(implode(' #', array_map('trim', explode(',', $websitepage->keywords))));
947 947
 
948 948
 		// Open Graph
949
-		$out .= '<meta name="og:type" content="website">'."\n";	// TODO If blogpost, use type article
949
+		$out .= '<meta name="og:type" content="website">'."\n"; // TODO If blogpost, use type article
950 950
 		$out .= '<meta name="og:title" content="'.$websitepage->title.'">'."\n";
951 951
 		if ($websitepage->image) {
952 952
 			$out .= '<meta name="og:image" content="'.$website->virtualhost.$image.'">'."\n";
@@ -1058,9 +1058,9 @@  discard block
 block discarded – undo
1058 1058
 	$sql = "SELECT COUNT(rowid) as nb";
1059 1059
 	$sql .= " FROM ".MAIN_DB_PREFIX."ecm_files";
1060 1060
 	$sql .= " WHERE entity IN (".getEntity($object->element).")";
1061
-	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id);	// Filter on object
1061
+	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object
1062 1062
 	$sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1);
1063
-	$sql .= " AND share IS NOT NULL";	// Only image that are public
1063
+	$sql .= " AND share IS NOT NULL"; // Only image that are public
1064 1064
 
1065 1065
 	$resql = $db->query($sql);
1066 1066
 	if ($resql) {
@@ -1097,7 +1097,7 @@  discard block
 block discarded – undo
1097 1097
 	$sql = "SELECT rowid, ref, share, filename, cover, position";
1098 1098
 	$sql .= " FROM ".MAIN_DB_PREFIX."ecm_files";
1099 1099
 	$sql .= " WHERE entity IN (".getEntity($object->element).")";
1100
-	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id);	// Filter on object
1100
+	$sql .= " AND src_object_type = '".$db->escape($object->element)."' AND src_object_id = ".((int) $object->id); // Filter on object
1101 1101
 	$sql .= " AND ".$db->regexpsql('filename', $regexforimg, 1);
1102 1102
 	$sql .= ($cover ? "" : " AND cover <> 1");
1103 1103
 	if ($cover == 1) {
@@ -1394,7 +1394,7 @@  discard block
 block discarded – undo
1394 1394
 {
1395 1395
 	$dom = new DOMDocument();
1396 1396
 
1397
-	libxml_use_internal_errors(false);	// Avoid to fill memory with xml errors
1397
+	libxml_use_internal_errors(false); // Avoid to fill memory with xml errors
1398 1398
 	if (LIBXML_VERSION < 20900) {
1399 1399
 		// Avoid load of external entities (security problem).
1400 1400
 		// Required only if LIBXML_VERSION < 20900
Please login to merge, or discard this patch.
htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 								$body_assignee = 'TicketAssignedEmailBody';
87 87
 								$see_ticket_assignee = 'SeeThisTicketIntomanagementInterface';
88 88
 
89
-								$old_MAIN_MAIL_AUTOCOPY_TO = null;  // For static analysis
89
+								$old_MAIN_MAIL_AUTOCOPY_TO = null; // For static analysis
90 90
 								if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO')) {
91 91
 									$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO');
92 92
 									$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 									 * @param array{source:string,id:int,rowid:int,email:string,civility:string,firstname:string,lastname:string,labeltype:string,libelle:string,socid:int,code:string,status:int,statuscontact:int,fk_c_typecontact:int,phone:string,phone_mobile:string,phone_perso?:string,nom:string} $contact
315 315
 									 * @return bool
316 316
 									 */
317
-									static function ($contact) {
317
+									static function($contact) {
318 318
 										return in_array($contact['source'], ['external', 'thirdparty']);
319 319
 									}
320 320
 								),
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
 						}
334 334
 
335 335
 						if ($contactObj === null) {
336
-							$error_msg = $langs->trans('Error'). ': ';
336
+							$error_msg = $langs->trans('Error').': ';
337 337
 							$error_msg .= $langs->transnoentities('TicketWrongContact');
338 338
 							setEventMessages($error_msg, [], 'errors');
339 339
 							$ok = 0;
@@ -416,7 +416,7 @@  discard block
 block discarded – undo
416 416
 		$message_admin .= '<p>'.$langs->trans('Message').' : <br><br>'.$message.'</p><br>';
417 417
 		$message_admin .= '<p><a href="'.dol_buildpath('/ticket/card.php', 2).'?track_id='.$object->track_id.'">'.$langs->trans('SeeThisTicketIntomanagementInterface').'</a></p>';
418 418
 
419
-		$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ' : '') . '<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
419
+		$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' ' : '').'<'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
420 420
 
421 421
 		$trackid = 'tic'.$object->id;
422 422
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
 				}
488 488
 
489 489
 				if ($qualified) {
490
-					$message_customer .= '<li>' . $langs->trans($key) . ' : ' . $value . '</li>';
490
+					$message_customer .= '<li>'.$langs->trans($key).' : '.$value.'</li>';
491 491
 				}
492 492
 			}
493 493
 		}
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 			$message_customer .= '<p>'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmailNoInterface').'</p>';
509 509
 		}
510 510
 
511
-		$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM') . ' ' : '').'<' . getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
511
+		$from = (getDolGlobalString('MAIN_INFO_SOCIETE_NOM') ? getDolGlobalString('MAIN_INFO_SOCIETE_NOM').' ' : '').'<'.getDolGlobalString('TICKET_NOTIFICATION_EMAIL_FROM').'>';
512 512
 
513 513
 		$trackid = 'tic'.$object->id;
514 514
 
Please login to merge, or discard this patch.
htdocs/core/modules/societe/mod_codecompta_aquarium.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@  discard block
 block discarded – undo
109 109
 		$texte .= '<input type="hidden" name="param1" value="COMPANY_AQUARIUM_MASK_SUPPLIER">';
110 110
 		$texte .= '<input type="hidden" name="param2" value="COMPANY_AQUARIUM_MASK_CUSTOMER">';
111 111
 		$texte .= '<table class="nobordernopadding" width="100%">';
112
-		$s1 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value1" value="' . getDolGlobalString('COMPANY_AQUARIUM_MASK_SUPPLIER').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name);
113
-		$s2 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value2" value="' . getDolGlobalString('COMPANY_AQUARIUM_MASK_CUSTOMER').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name);
112
+		$s1 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value1" value="'.getDolGlobalString('COMPANY_AQUARIUM_MASK_SUPPLIER').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name);
113
+		$s2 = $form->textwithpicto('<input type="text" class="flat" size="4" name="value2" value="'.getDolGlobalString('COMPANY_AQUARIUM_MASK_CUSTOMER').'">', $tooltip, 1, 'help', 'valignmiddle', 0, 3, $this->name);
114 114
 		$texte .= '<tr><td>';
115 115
 		// trans remove html entities
116 116
 		$texte .= $langs->trans("ModuleCompanyCodeCustomer".$this->name, '{s2}')."<br>\n";
@@ -121,11 +121,11 @@  discard block
 block discarded – undo
121 121
 			$texte .= $langs->trans('RemoveSpecialChars').' = '.yn(1)."<br>\n";
122 122
 		}
123 123
 		if (getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')) {
124
-			$texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = ' . getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')."<br>\n";
124
+			$texte .= $langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')."<br>\n";
125 125
 		}
126 126
 
127 127
 		if (getDolGlobalString('COMPANY_AQUARIUM_NO_PREFIX')) {
128
-			$texte .= $langs->trans('COMPANY_AQUARIUM_NO_PREFIX').' = ' . getDolGlobalString('COMPANY_AQUARIUM_NO_PREFIX')."<br>\n";
128
+			$texte .= $langs->trans('COMPANY_AQUARIUM_NO_PREFIX').' = '.getDolGlobalString('COMPANY_AQUARIUM_NO_PREFIX')."<br>\n";
129 129
 		}
130 130
 		$texte .= '</td>';
131 131
 		$texte .= '<td class="right"><input type="submit" class="button button-edit reposition smallpaddingimp" name="modify" value="'.$langs->trans("Modify").'"></td>';
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 		}
197 197
 		// Apply a regex replacement pattern on code if COMPANY_AQUARIUM_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed.
198 198
 		if (getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX')) {	// Example: $conf->global->COMPANY_AQUARIUM_CLEAN_REGEX='^..(..)..';
199
-			$codetouse = preg_replace('/' . getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX').'/', '\1\2\3', (string) $codetouse);
199
+			$codetouse = preg_replace('/'.getDolGlobalString('COMPANY_AQUARIUM_CLEAN_REGEX').'/', '\1\2\3', (string) $codetouse);
200 200
 		}
201 201
 
202 202
 		$codetouse = $prefix.strtoupper((string) $codetouse);
Please login to merge, or discard this patch.
htdocs/comm/propal/class/propal.class.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 			}
669 669
 			$txlocaltax1 = price2num($txlocaltax1);
670 670
 			$txlocaltax2 = price2num($txlocaltax2);
671
-			$pa_ht = price2num($pa_ht);  // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
671
+			$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
672 672
 			if ($price_base_type == 'HT') {
673 673
 				$pu = $pu_ht;
674 674
 			} else {
@@ -916,7 +916,7 @@  discard block
 block discarded – undo
916 916
 		}
917 917
 		$txlocaltax1 = price2num($txlocaltax1);
918 918
 		$txlocaltax2 = price2num($txlocaltax2);
919
-		$pa_ht = price2num($pa_ht);  // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
919
+		$pa_ht = price2num($pa_ht); // do not convert to float here, it breaks the functioning of $pa_ht_isemptystring
920 920
 		if (empty($qty) && empty($special_code)) {
921 921
 			$special_code = 3; // Set option tag
922 922
 		}
@@ -1513,7 +1513,7 @@  discard block
 block discarded – undo
1513 1513
 			if ($objsoc->id > 0 && !empty($object->lines)) {
1514 1514
 				if ($update_prices === true && getDolGlobalString('PRODUIT_CUSTOMER_PRICES')) {
1515 1515
 					// If price per customer
1516
-					require_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1516
+					require_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1517 1517
 				}
1518 1518
 
1519 1519
 				foreach ($object->lines as $line) {
@@ -1546,9 +1546,9 @@  discard block
 block discarded – undo
1546 1546
 											foreach ($prodcustprice->lines as $k => $custprice_line) {
1547 1547
 												if ($custprice_line->date_begin <= $date_now && (empty($custprice_line->date_end) || $date_now <= $custprice_line->date_end)) {
1548 1548
 													$pu_ht = price($custprice_line->price);
1549
-													$tva_tx = ($custprice_line->default_vat_code ? $custprice_line->tva_tx . ' (' . $custprice_line->default_vat_code . ' )' : $custprice_line->tva_tx);
1549
+													$tva_tx = ($custprice_line->default_vat_code ? $custprice_line->tva_tx.' ('.$custprice_line->default_vat_code.' )' : $custprice_line->tva_tx);
1550 1550
 													if ($custprice_line->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
1551
-														$tva_tx .= ' (' . $custprice_line->default_vat_code . ')';
1551
+														$tva_tx .= ' ('.$custprice_line->default_vat_code.')';
1552 1552
 													}
1553 1553
 													$remise_percent = $custprice_line->discount_percent;
1554 1554
 													break;
@@ -1714,7 +1714,7 @@  discard block
 block discarded – undo
1714 1714
 				$this->ref_customer         = $obj->ref_client;
1715 1715
 				$this->ref_ext              = $obj->ref_ext;
1716 1716
 
1717
-				$this->total                = $obj->total_ttc;			// TODO deprecated
1717
+				$this->total                = $obj->total_ttc; // TODO deprecated
1718 1718
 				$this->total_ttc            = $obj->total_ttc;
1719 1719
 				$this->total_ht             = $obj->total_ht;
1720 1720
 				$this->total_tva            = $obj->total_tva;
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
 	 */
2633 2633
 	public function closeProposal($user, $status, $note_private = '', $notrigger = 0, $note_public = '')
2634 2634
 	{
2635
-		global $langs,$conf;
2635
+		global $langs, $conf;
2636 2636
 
2637 2637
 		$error = 0;
2638 2638
 		$now = dol_now();
@@ -2667,10 +2667,10 @@  discard block
 block discarded – undo
2667 2667
 		if ($resql) {
2668 2668
 			// Status self::STATUS_REFUSED by default
2669 2669
 			$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_CLOSED', $this->model_pdf);
2670
-			$trigger_name = 'PROPAL_CLOSE_REFUSED';		// used later in call_trigger()
2670
+			$trigger_name = 'PROPAL_CLOSE_REFUSED'; // used later in call_trigger()
2671 2671
 
2672 2672
 			if ($status == self::STATUS_SIGNED) {	// Status self::STATUS_SIGNED
2673
-				$trigger_name = 'PROPAL_CLOSE_SIGNED';	// used later in call_trigger()
2673
+				$trigger_name = 'PROPAL_CLOSE_SIGNED'; // used later in call_trigger()
2674 2674
 				$modelpdf = getDolGlobalString('PROPALE_ADDON_PDF_ODT_TOBILL') ? $conf->global->PROPALE_ADDON_PDF_ODT_TOBILL : $this->model_pdf;
2675 2675
 
2676 2676
 				// The connected company is classified as a client
@@ -2838,10 +2838,10 @@  discard block
 block discarded – undo
2838 2838
 
2839 2839
 		$this->db->begin();
2840 2840
 
2841
-		$sql = "UPDATE ". MAIN_DB_PREFIX . $this->table_element;
2842
-		$sql .= " SET fk_statut = " . self::STATUS_CANCELED . ",";
2843
-		$sql .= " fk_user_modif = " . ((int) $user->id);
2844
-		$sql .= " WHERE rowid = " . ((int) $this->id);
2841
+		$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element;
2842
+		$sql .= " SET fk_statut = ".self::STATUS_CANCELED.",";
2843
+		$sql .= " fk_user_modif = ".((int) $user->id);
2844
+		$sql .= " WHERE rowid = ".((int) $this->id);
2845 2845
 
2846 2846
 		dol_syslog(get_class($this)."::cancel", LOG_DEBUG);
2847 2847
 		if ($this->db->query($sql)) {
@@ -3204,7 +3204,7 @@  discard block
 block discarded – undo
3204 3204
 					}
3205 3205
 				}
3206 3206
 				if (file_exists($dir)) {
3207
-					$res = @dol_delete_dir_recursive($dir);		// delete files physically + into ecm tables
3207
+					$res = @dol_delete_dir_recursive($dir); // delete files physically + into ecm tables
3208 3208
 					if (!$res) {
3209 3209
 						$this->error = 'ErrorFailToDeleteDir';
3210 3210
 						$this->errors[] = $this->error;
@@ -3608,7 +3608,7 @@  discard block
 block discarded – undo
3608 3608
 		$this->multicurrency_code = $conf->currency;
3609 3609
 
3610 3610
 		// Lines
3611
-		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5);	// We can force the nb of lines to test from command line (but not more than 1000)
3611
+		$nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000)
3612 3612
 		$xnbp = 0;
3613 3613
 		while ($xnbp < $nbp) {
3614 3614
 			$line = new PropaleLigne($this->db);
@@ -3938,7 +3938,7 @@  discard block
 block discarded – undo
3938 3938
 		}
3939 3939
 
3940 3940
 		global $action;
3941
-		$hookmanager->initHooks(array($this->element . 'dao'));
3941
+		$hookmanager->initHooks(array($this->element.'dao'));
3942 3942
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
3943 3943
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
3944 3944
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/expensereport/card.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 }
164 164
 $result = restrictedArea($user, 'expensereport', $object->id, 'expensereport');
165 165
 
166
-$permissiontoadd = $user->hasRight('expensereport', 'creer');	// Used by the include of actions_dellink.inc.php
166
+$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php
167 167
 
168 168
 
169 169
 /*
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
 
315 315
 			if ($overlappingExpenseReportID > 0) {
316 316
 				$error++;
317
-				setEventMessages($langs->trans("ErrorDoubleDeclaration").' <a href="'.$_SERVER['PHP_SELF'].'?id='.$overlappingExpenseReportID.'">'. $langs->trans('ShowTrip').'</a>', null, 'errors');
317
+				setEventMessages($langs->trans("ErrorDoubleDeclaration").' <a href="'.$_SERVER['PHP_SELF'].'?id='.$overlappingExpenseReportID.'">'.$langs->trans('ShowTrip').'</a>', null, 'errors');
318 318
 				$action = 'create';
319 319
 			}
320 320
 		}
@@ -478,10 +478,10 @@  discard block
 block discarded – undo
478 478
 							$mesg = '';
479 479
 							$mesg .= $langs->transnoentities('ErrorFailedToSendMail', dol_escape_htmltag($emailFrom), dol_escape_htmltag($emailTo));
480 480
 							if (!empty($mailfile->error)) {
481
-								$mesg .= '<br>' . $mailfile->error;
481
+								$mesg .= '<br>'.$mailfile->error;
482 482
 							}
483 483
 							if (!empty($mailfile->errors) && is_array($mailfile->errors)) {
484
-								$mesg .= '<br>' . implode('<br>', $mailfile->errors);
484
+								$mesg .= '<br>'.implode('<br>', $mailfile->errors);
485 485
 							}
486 486
 							setEventMessages($mesg, null, 'errors');
487 487
 						} else {
@@ -2392,7 +2392,7 @@  discard block
 block discarded – undo
2392 2392
 							}
2393 2393
 						}
2394 2394
 
2395
-						$tredited = 'tredited';	// Case the addfile and linkto file is used for edit (used by following tpl)
2395
+						$tredited = 'tredited'; // Case the addfile and linkto file is used for edit (used by following tpl)
2396 2396
 						include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
2397 2397
 						include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
2398 2398
 
@@ -2447,7 +2447,7 @@  discard block
 block discarded – undo
2447 2447
 
2448 2448
 						// Quantity
2449 2449
 						print '<td class="right">';
2450
-						print '<input type="text" min="0" class="input_qty right maxwidth50"  name="qty" value="'.dol_escape_htmltag((string) $line->qty).'" />';  // We must be able to enter decimal qty
2450
+						print '<input type="text" min="0" class="input_qty right maxwidth50"  name="qty" value="'.dol_escape_htmltag((string) $line->qty).'" />'; // We must be able to enter decimal qty
2451 2451
 						print '</td>';
2452 2452
 
2453 2453
 						//print '<td class="right">'.$langs->trans('AmountHT').'</td>';
@@ -2552,7 +2552,7 @@  discard block
 block discarded – undo
2552 2552
 				print '</script>'."\n";
2553 2553
 				print '</td></tr>';
2554 2554
 
2555
-				$tredited = '';	// Case the addfile and linkto file is used for edit (used by following tpl)
2555
+				$tredited = ''; // Case the addfile and linkto file is used for edit (used by following tpl)
2556 2556
 				include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_linktofile.tpl.php';
2557 2557
 				include DOL_DOCUMENT_ROOT.'/expensereport/tpl/expensereport_addfile.tpl.php';
2558 2558
 
Please login to merge, or discard this patch.
htdocs/categories/class/categorie.class.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1328,14 +1328,14 @@  discard block
 block discarded – undo
1328 1328
 					|| preg_match('/'.$keyfilter3.'/', $fullpath) || preg_match('/'.$keyfilter4.'/', $fullpath));
1329 1329
 
1330 1330
 				if (($test && !$include) || (!$test && $include)) {
1331
-					unset($this->cats[$key]);  // @phpstan-ignore-line
1331
+					unset($this->cats[$key]); // @phpstan-ignore-line
1332 1332
 				}
1333 1333
 			}
1334 1334
 		}
1335 1335
 
1336 1336
 		dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG);
1337 1337
 
1338
-		$this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1);		// Sort on full label like "Label 1 >> Sublabel a >> Subsublabel"
1338
+		$this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1); // Sort on full label like "Label 1 >> Sublabel a >> Subsublabel"
1339 1339
 
1340 1340
 		return $this->cats;
1341 1341
 	}
@@ -1526,15 +1526,15 @@  discard block
 block discarded – undo
1526 1526
 				}
1527 1527
 
1528 1528
 				if ($url == '') {
1529
-					$link = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.((int) $cat->id).'&type='.urlencode($cat->type).'" class="'.($i < count($way) ? 'small ': '').$forced_color.'">';
1529
+					$link = '<a href="'.DOL_URL_ROOT.'/categories/viewcat.php?id='.((int) $cat->id).'&type='.urlencode($cat->type).'" class="'.($i < count($way) ? 'small ' : '').$forced_color.'">';
1530 1530
 					$linkend = '</a>';
1531 1531
 					$w[] = $link.(($addpicto && $i == 1) ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend;
1532 1532
 				} elseif ($url == 'none') {
1533
-					$link = '<span class="'.($i < count($way) ? 'small ': '').$forced_color.'">';
1533
+					$link = '<span class="'.($i < count($way) ? 'small ' : '').$forced_color.'">';
1534 1534
 					$linkend = '</span>';
1535 1535
 					$w[] = $link.(($addpicto && $i == 1) ? img_object('', 'category', 'class="paddingright"') : '').$cat->label.$linkend;
1536 1536
 				} else {
1537
-					$w[] = '<a class="'.($i < count($way) ? 'small ': '').$forced_color.'" href="'.DOL_URL_ROOT.'/'.$url.'?catid='.((int) $cat->id).'">'.($addpicto ? img_object('', 'category') : '').$cat->label.'</a>';
1537
+					$w[] = '<a class="'.($i < count($way) ? 'small ' : '').$forced_color.'" href="'.DOL_URL_ROOT.'/'.$url.'?catid='.((int) $cat->id).'">'.($addpicto ? img_object('', 'category') : '').$cat->label.'</a>';
1538 1538
 				}
1539 1539
 			}
1540 1540
 			$newcategwithpath = preg_replace('/colortoreplace/', $forced_color, implode('<span class="inline-block valignmiddle paddingleft paddingright '.$forced_color.'">'.$sep.'</span>', $w));
@@ -1593,7 +1593,7 @@  discard block
 block discarded – undo
1593 1593
 		$parents = $this->get_meres();
1594 1594
 		if (is_array($parents)) {
1595 1595
 			foreach ($parents as $parent) {
1596
-				$all_ways = $parent->get_all_ways();	// recursivity. TODO Add a protection for infinite loop
1596
+				$all_ways = $parent->get_all_ways(); // recursivity. TODO Add a protection for infinite loop
1597 1597
 				foreach ($all_ways as $way) {
1598 1598
 					$w = $way;
1599 1599
 					$w[] = $this;
@@ -1753,10 +1753,10 @@  discard block
 block discarded – undo
1753 1753
 	 */
1754 1754
 	public function isAnyPhotoAvailable($sdir)
1755 1755
 	{
1756
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
1757
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
1756
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
1757
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
1758 1758
 
1759
-		$sdir .= '/' . get_exdir($this->id, 2, 0, 0, $this, 'category') . $this->id . "/photos/";
1759
+		$sdir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'category').$this->id."/photos/";
1760 1760
 
1761 1761
 		$dir_osencoded = dol_osencode($sdir);
1762 1762
 		if (file_exists($dir_osencoded)) {
@@ -1766,7 +1766,7 @@  discard block
 block discarded – undo
1766 1766
 					if (!utf8_check($file)) {
1767 1767
 						$file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory
1768 1768
 					}
1769
-					if (dol_is_file($sdir . $file) && image_format_supported($file) >= 0) {
1769
+					if (dol_is_file($sdir.$file) && image_format_supported($file) >= 0) {
1770 1770
 						return true;
1771 1771
 					}
1772 1772
 				}
@@ -1889,7 +1889,7 @@  discard block
 block discarded – undo
1889 1889
 		$result .= $linkend;
1890 1890
 
1891 1891
 		global $action;
1892
-		$hookmanager->initHooks(array($this->element . 'dao'));
1892
+		$hookmanager->initHooks(array($this->element.'dao'));
1893 1893
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
1894 1894
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1895 1895
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/societe/class/societe.class.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -1082,8 +1082,8 @@  discard block
 block discarded – undo
1082 1082
 			$sql .= ", '".$this->db->escape($this->ip)."'";
1083 1083
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1084 1084
 				$sql .= ", ".(empty($this->vat_reverse_charge) ? '0' : '1');
1085
-				$sql .= ", '" . $this->db->escape($this->accountancy_code_buy) . "'";
1086
-				$sql .= ", '" . $this->db->escape($this->accountancy_code_sell) . "'";
1085
+				$sql .= ", '".$this->db->escape($this->accountancy_code_buy)."'";
1086
+				$sql .= ", '".$this->db->escape($this->accountancy_code_sell)."'";
1087 1087
 			}
1088 1088
 			$sql .= ")";
1089 1089
 
@@ -1136,7 +1136,7 @@  discard block
 block discarded – undo
1136 1136
 				}
1137 1137
 
1138 1138
 				if ($ret >= 0) {
1139
-					if (! $notrigger) {
1139
+					if (!$notrigger) {
1140 1140
 						// Call trigger
1141 1141
 						$result = $this->call_trigger('COMPANY_CREATE', $user);
1142 1142
 						if ($result < 0) {
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
 						if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) {
1385 1385
 							$langs->loadLangs(array("errors", 'compta'));
1386 1386
 							$error++;
1387
-							$this->errors[] = $langs->trans('CustomerAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1387
+							$this->errors[] = $langs->trans('CustomerAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')';
1388 1388
 						}
1389 1389
 					}
1390 1390
 
@@ -1392,7 +1392,7 @@  discard block
 block discarded – undo
1392 1392
 					if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_CUSTOMER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) {
1393 1393
 						$langs->loadLangs(array("errors", 'compta'));
1394 1394
 						$error++;
1395
-						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1395
+						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('CustomerAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')';
1396 1396
 					}
1397 1397
 				} elseif ($key == 'ACCOUNTANCY_CODE_SUPPLIER' && !empty($this->fournisseur)) {
1398 1398
 					// Check for unicity
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
 						if ($this->id_prof_exists($keymin, $vallabel, ($this->id > 0 ? $this->id : 0))) {
1401 1401
 							$langs->loadLangs(array("errors", 'compta'));
1402 1402
 							$error++;
1403
-							$this->errors[] = $langs->trans('SupplierAccountancyCodeShort') . " " . $langs->trans("ErrorProdIdAlreadyExist", $vallabel) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1403
+							$this->errors[] = $langs->trans('SupplierAccountancyCodeShort')." ".$langs->trans("ErrorProdIdAlreadyExist", $vallabel).' ('.$langs->trans("ForbiddenBySetupRules").')';
1404 1404
 						}
1405 1405
 					}
1406 1406
 
@@ -1408,7 +1408,7 @@  discard block
 block discarded – undo
1408 1408
 					if (getDolGlobalString('SOCIETE_ACCOUNTANCY_CODE_SUPPLIER_MANDATORY') && (!isset($vallabel) || trim($vallabel) === '')) {
1409 1409
 						$langs->loadLangs(array("errors", 'compta'));
1410 1410
 						$error++;
1411
-						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')) . ' (' . $langs->trans("ForbiddenBySetupRules") . ')';
1411
+						$this->errors[] = $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv('SupplierAccountancyCodeShort')).' ('.$langs->trans("ForbiddenBySetupRules").')';
1412 1412
 					}
1413 1413
 				}
1414 1414
 			}
@@ -1458,17 +1458,17 @@  discard block
 block discarded – undo
1458 1458
 		$now = dol_now();
1459 1459
 
1460 1460
 		// Clean parameters
1461
-		$this->id 			= $id;
1462
-		$this->entity 		= ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
1461
+		$this->id = $id;
1462
+		$this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity);
1463 1463
 		$this->name 		= $this->name ? trim($this->name) : trim((string) $this->nom);
1464 1464
 		$this->nom 			= $this->name; // For backward compatibility
1465
-		$this->name_alias 	= trim((string) $this->name_alias);
1465
+		$this->name_alias = trim((string) $this->name_alias);
1466 1466
 		$this->ref_ext		= (empty($this->ref_ext) ? '' : trim($this->ref_ext));
1467 1467
 		$this->address		= trim((string) $this->address);
1468 1468
 		$this->zip 			= trim((string) $this->zip);
1469 1469
 		$this->town 		= trim((string) $this->town);
1470
-		$this->state_id 	= (is_numeric($this->state_id)) ? (int) $this->state_id : 0;
1471
-		$this->country_id 	= ($this->country_id > 0) ? $this->country_id : 0;
1470
+		$this->state_id = (is_numeric($this->state_id)) ? (int) $this->state_id : 0;
1471
+		$this->country_id = ($this->country_id > 0) ? $this->country_id : 0;
1472 1472
 		$this->phone		= trim((string) $this->phone);
1473 1473
 		$this->phone		= preg_replace("/\s/", "", $this->phone);
1474 1474
 		$this->phone		= preg_replace("/\./", "", $this->phone);
@@ -1478,7 +1478,7 @@  discard block
 block discarded – undo
1478 1478
 		$this->fax			= trim((string) $this->fax);
1479 1479
 		$this->fax			= preg_replace("/\s/", "", $this->fax);
1480 1480
 		$this->fax			= preg_replace("/\./", "", $this->fax);
1481
-		$this->email		= trim((string) $this->email);
1481
+		$this->email = trim((string) $this->email);
1482 1482
 		$this->url			= $this->url ? clean_url($this->url, 0) : '';
1483 1483
 		$this->note_private = (empty($this->note_private) ? '' : trim($this->note_private));
1484 1484
 		$this->note_public  = (empty($this->note_public) ? '' : trim($this->note_public));
@@ -1647,7 +1647,7 @@  discard block
 block discarded – undo
1647 1647
 			$sql .= ",tva_assuj = ".($this->tva_assuj != '' ? "'".$this->db->escape((string) $this->tva_assuj)."'" : "null");
1648 1648
 			$sql .= ",tva_intra = '".$this->db->escape($this->tva_intra)."'";
1649 1649
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1650
-				$sql .= ",vat_reverse_charge = " . ($this->vat_reverse_charge != '' ? "'" . $this->db->escape((string) $this->vat_reverse_charge) . "'" : 0);
1650
+				$sql .= ",vat_reverse_charge = ".($this->vat_reverse_charge != '' ? "'".$this->db->escape((string) $this->vat_reverse_charge)."'" : 0);
1651 1651
 			}
1652 1652
 			$sql .= ",status = ".((int) $this->status);
1653 1653
 
@@ -1708,8 +1708,8 @@  discard block
 block discarded – undo
1708 1708
 			$sql .= ",supplier_order_min_amount= ".($this->supplier_order_min_amount != '' ? $this->supplier_order_min_amount : 'null');
1709 1709
 			$sql .= ",fk_prospectlevel='".$this->db->escape($this->fk_prospectlevel)."'";
1710 1710
 			if (!getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
1711
-				$sql .= ", accountancy_code_buy = '" . $this->db->escape($this->accountancy_code_buy) . "'";
1712
-				$sql .= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell) . "'";
1711
+				$sql .= ", accountancy_code_buy = '".$this->db->escape($this->accountancy_code_buy)."'";
1712
+				$sql .= ", accountancy_code_sell= '".$this->db->escape($this->accountancy_code_sell)."'";
1713 1713
 				if ($customer) {
1714 1714
 					$sql .= ", accountancy_code_customer_general = ".(!empty($this->accountancy_code_customer_general) ? "'".$this->db->escape($this->accountancy_code_customer_general)."'" : "null");
1715 1715
 					$sql .= ", code_compta = ".(!empty($this->code_compta_client) ? "'".$this->db->escape($this->code_compta_client)."'" : "null");
@@ -2107,7 +2107,7 @@  discard block
 block discarded – undo
2107 2107
 					$this->vat_reverse_charge = 0;
2108 2108
 				}
2109 2109
 
2110
-				$this->status				= $obj->status;
2110
+				$this->status = $obj->status;
2111 2111
 
2112 2112
 				// Local Taxes
2113 2113
 				$this->localtax1_assuj      = $obj->localtax1_assuj;
@@ -2134,7 +2134,7 @@  discard block
 block discarded – undo
2134 2134
 
2135 2135
 				$this->mode_reglement_id 	= $obj->mode_reglement;
2136 2136
 				$this->cond_reglement_id 	= $obj->cond_reglement;
2137
-				$this->deposit_percent		= $obj->deposit_percent;
2137
+				$this->deposit_percent = $obj->deposit_percent;
2138 2138
 				$this->transport_mode_id 	= $obj->transport_mode;
2139 2139
 				$this->mode_reglement_supplier_id 	= $obj->mode_reglement_supplier;
2140 2140
 				$this->cond_reglement_supplier_id 	= $obj->cond_reglement_supplier;
@@ -2700,7 +2700,7 @@  discard block
 block discarded – undo
2700 2700
 			$sortfield = 'u.lastname,u.firstname';
2701 2701
 		}
2702 2702
 		if (empty($sortorder)) {
2703
-			$sortorder = str_repeat('ASC,', count(explode(',', $sortfield)) - 1) . 'ASC';
2703
+			$sortorder = str_repeat('ASC,', count(explode(',', $sortfield)) - 1).'ASC';
2704 2704
 		}
2705 2705
 		$sql .= $this->db->order($sortfield, $sortorder);
2706 2706
 
@@ -2717,10 +2717,10 @@  discard block
 block discarded – undo
2717 2717
 					$reparray[$i]['firstname'] = $obj->firstname;
2718 2718
 					$reparray[$i]['email'] = $obj->email;
2719 2719
 					$reparray[$i]['phone'] = $obj->office_phone;
2720
-					$reparray[$i]['office_phone'] = $obj->office_phone;			// Pro phone
2720
+					$reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone
2721 2721
 					$reparray[$i]['office_fax'] = $obj->office_fax;
2722
-					$reparray[$i]['user_mobile'] = $obj->user_mobile;			// Pro mobile
2723
-					$reparray[$i]['personal_mobile'] = $obj->personal_mobile;	// Personal mobile
2722
+					$reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile
2723
+					$reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile
2724 2724
 					$reparray[$i]['job'] = $obj->job;
2725 2725
 					$reparray[$i]['statut'] = $obj->status; // deprecated
2726 2726
 					$reparray[$i]['status'] = $obj->status;
@@ -2933,7 +2933,7 @@  discard block
 block discarded – undo
2933 2933
 			$datas['status'] = ' '.$this->getLibStatut(5);
2934 2934
 		}
2935 2935
 		if (isset($this->client) && isset($this->fournisseur)) {
2936
-			$datas['type'] = ' &nbsp; ' . $this->getTypeUrl(1, '', 0, 'span');
2936
+			$datas['type'] = ' &nbsp; '.$this->getTypeUrl(1, '', 0, 'span');
2937 2937
 		}
2938 2938
 		$datas['name'] = '<br><b>'.$langs->trans('Name').':</b> '.dol_escape_htmltag(dol_string_nohtmltag($this->name));
2939 2939
 		if (!empty($this->name_alias) && empty($noaliasinname)) {
@@ -3001,9 +3001,9 @@  discard block
 block discarded – undo
3001 3001
 		}
3002 3002
 		// show categories for this record only in ajax to not overload lists
3003 3003
 		if (!$nofetch && isModEnabled('category') && $this->client) {
3004
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
3004
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
3005 3005
 			$form = new Form($this->db);
3006
-			$datas['categories_customer'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1);
3006
+			$datas['categories_customer'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_CUSTOMER, 1, 1);
3007 3007
 		}
3008 3008
 		if (!empty($this->code_fournisseur) && $this->fournisseur) {
3009 3009
 			$datas['suppliercode'] = '<br><b>'.$langs->trans('SupplierCode').':</b> '.$this->code_fournisseur;
@@ -3014,9 +3014,9 @@  discard block
 block discarded – undo
3014 3014
 		}
3015 3015
 		// show categories for this record only in ajax to not overload lists
3016 3016
 		if (!$nofetch && isModEnabled('category') && $this->fournisseur) {
3017
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
3017
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
3018 3018
 			$form = new Form($this->db);
3019
-			$datas['categories_supplier'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1);
3019
+			$datas['categories_supplier'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_SUPPLIER, 1, 1);
3020 3020
 		}
3021 3021
 
3022 3022
 		$datas['divclose'] = '</div>';
@@ -3564,7 +3564,7 @@  discard block
 block discarded – undo
3564 3564
 	{
3565 3565
 		// phpcs:enable
3566 3566
 		require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
3567
-		$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib WHERE type = 'ban' AND default_rib = 1 AND fk_soc = ". (int) $this->id;
3567
+		$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."societe_rib WHERE type = 'ban' AND default_rib = 1 AND fk_soc = ".(int) $this->id;
3568 3568
 		$resql = $this->db->query($sql);
3569 3569
 		if (!$resql) {
3570 3570
 			$this->error = $this->db->lasterror();
@@ -3954,7 +3954,7 @@  discard block
 block discarded – undo
3954 3954
 		global $langs;
3955 3955
 
3956 3956
 		if ($company_id > 0) {
3957
-			$sql = "SELECT parent FROM " . MAIN_DB_PREFIX . "societe WHERE rowid = ".((int) $company_id);
3957
+			$sql = "SELECT parent FROM ".MAIN_DB_PREFIX."societe WHERE rowid = ".((int) $company_id);
3958 3958
 			$resql = $this->db->query($sql);
3959 3959
 			if ($resql) {
3960 3960
 				if ($obj = $this->db->fetch_object($resql)) {
@@ -4251,7 +4251,7 @@  discard block
 block discarded – undo
4251 4251
 	public function isACompany()
4252 4252
 	{
4253 4253
 		// Define if third party is treated as company (or not) when nature is unknown
4254
-		$isACompany = getDolGlobalInt('MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES', 1);	// default if not set is 1 because it was like this in all past versions
4254
+		$isACompany = getDolGlobalInt('MAIN_UNKNOWN_CUSTOMERS_ARE_COMPANIES', 1); // default if not set is 1 because it was like this in all past versions
4255 4255
 
4256 4256
 		// Now try to guess using different tips
4257 4257
 		if (!empty($this->tva_intra)) {
@@ -4585,7 +4585,7 @@  discard block
 block discarded – undo
4585 4585
 		$country_code = $country_label = '';
4586 4586
 		if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
4587 4587
 			$tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
4588
-			$country_id =  (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4588
+			$country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4589 4589
 			if (!empty($tmp[1])) {   // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label"
4590 4590
 				$country_code = $tmp[1];
4591 4591
 				$country_label = $tmp[2];
@@ -5462,7 +5462,7 @@  discard block
 block discarded – undo
5462 5462
 		if (method_exists($this, 'getLibStatut')) {
5463 5463
 			$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
5464 5464
 		}
5465
-		$return .= '</div>';	// end info-box-content
5465
+		$return .= '</div>'; // end info-box-content
5466 5466
 		$return .= '</div>';
5467 5467
 		$return .= '</div>';
5468 5468
 
@@ -5565,7 +5565,7 @@  discard block
 block discarded – undo
5565 5565
 		global $conf, $langs, $hookmanager, $user, $action;
5566 5566
 
5567 5567
 		$error = 0;
5568
-		$soc_origin = new Societe($this->db);		// The thirdparty that we will delete
5568
+		$soc_origin = new Societe($this->db); // The thirdparty that we will delete
5569 5569
 
5570 5570
 		dol_syslog("mergeCompany merge thirdparty id=".$soc_origin_id." (will be deleted) into the thirdparty id=".$this->id);
5571 5571
 
Please login to merge, or discard this patch.