Completed
Branch develop (b2bad1)
by
unknown
25:32
created
htdocs/user/param_ihm.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
 	print '<td>';
383 383
 	$s = picto_from_langcode(getDolGlobalString('MAIN_LANG_DEFAULT'));
384 384
 	print $s ? $s.' ' : '';
385
-	print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT')));
385
+	print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT')));
386 386
 	print '</td>';
387 387
 	print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "");
388 388
 	print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
 	// Max size of short lists
437 437
 	print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeShortList").'</td>';
438
-	print '<td>' . getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>';
438
+	print '<td>'.getDolGlobalString('MAIN_SIZE_SHORTLIST_LIMIT').'</td>';
439 439
 	print '<td class="nowrap" width="20%"><input class="oddeven" name="check_MAIN_SIZE_SHORTLIST_LIMIT" id="check_MAIN_SIZE_SHORTLIST_LIMIT" type="checkbox" '.(!empty($object->conf->MAIN_SIZE_SHORTLIST_LIMIT) ? " checked" : "");
440 440
 	print empty($dolibarr_main_demo) ? '' : ' disabled="disabled"'; // Disabled for demo
441 441
 	print '> <label for="check_MAIN_SIZE_SHORTLIST_LIMIT">'.$langs->trans("UsePersonalValue").'</label></td>';
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
 	print '<td>';
505 505
 	$s = picto_from_langcode(getDolGlobalString('MAIN_LANG_DEFAULT'));
506 506
 	print($s ? $s.' ' : '');
507
-	print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_" . getDolGlobalString('MAIN_LANG_DEFAULT')));
507
+	print(getDolGlobalString('MAIN_LANG_DEFAULT') == 'auto' ? $form->textwithpicto($langs->trans("Automatic"), $langs->trans("AutoDetectLang")) : $langs->trans("Language_".getDolGlobalString('MAIN_LANG_DEFAULT')));
508 508
 	print '</td>';
509 509
 	print '<td class="nowrap"><input class="oddeven" type="checkbox" disabled '.(!empty($object->conf->MAIN_LANG_DEFAULT) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>';
510 510
 	print '<td>';
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 	print '<tr class="oddeven"><td>'.$langs->trans("MAIN_CHECKBOX_LEFT_COLUMN").'</td>';
565 565
 	print '<td>'.(getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN') ? $langs->trans("Yes") : $langs->trans("No")).'</td>';
566 566
 	print '<td class="nowrap" width="20%"><input class="oddeven" type="checkbox" disabled '.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? " checked" : "").'> '.$langs->trans("UsePersonalValue").'</td>';
567
-	print '<td>'.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ?( $object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans("Yes") : $langs->trans("No")) : '&nbsp;').'</td></tr>';
567
+	print '<td>'.(isset($object->conf->MAIN_CHECKBOX_LEFT_COLUMN) ? ($object->conf->MAIN_CHECKBOX_LEFT_COLUMN == 1 ? $langs->trans("Yes") : $langs->trans("No")) : '&nbsp;').'</td></tr>';
568 568
 
569 569
 	// Max size for lists
570 570
 	print '<tr class="oddeven"><td>'.$langs->trans("MaxSizeList").'</td>';
Please login to merge, or discard this patch.
htdocs/accountancy/class/accountancycategory.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -640,7 +640,7 @@  discard block
 block discarded – undo
640 640
 
641 641
 		if (is_array($cpt)) {
642 642
 			foreach ($cpt as $cptcursor) {
643
-				if (! is_null($cptcursor)) {
643
+				if (!is_null($cptcursor)) {
644 644
 					if ($listofaccount) {
645 645
 						$listofaccount .= ",";
646 646
 					}
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
 
791 791
 		$sql = "SELECT c.rowid, c.code, c.label, c.formula, c.position, c.category_type, c.sens";
792 792
 		$sql .= " FROM ".$this->db->prefix().$this->table_element." as c";
793
-		$sql .= " WHERE c.active = " . (int) $active;
793
+		$sql .= " WHERE c.active = ".(int) $active;
794 794
 		$sql .= " AND c.fk_report=".((int) $id_report);
795 795
 		$sql .= " AND c.entity = ".$conf->entity;
796 796
 		if ($categorytype >= 0) {
Please login to merge, or discard this patch.
htdocs/core/lib/pdf.lib.php 1 patch
Spacing   +22 added lines, -24 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 	//$metric=$arrayformat['unit'];
182 182
 
183 183
 	//$pdfa = false; // PDF default version
184
-	$pdfa = getDolGlobalInt('PDF_USE_A', 0); 	// PDF/A-1 ou PDF/A-3
184
+	$pdfa = getDolGlobalInt('PDF_USE_A', 0); // PDF/A-1 ou PDF/A-3
185 185
 
186 186
 	if (!getDolGlobalString('MAIN_DISABLE_TCPDI') && class_exists('TCPDI')) {
187 187
 		$pdf = new TCPDI($pagetype, $metric, $format, true, 'UTF-8', false, $pdfa);
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
 				$stringaddress .= ($stringaddress ? "\n" : '').$tmp.': '.$outputlangs->convToOutputCharset($sourcecompany->idprof6);
536 536
 			}
537 537
 			if (getDolGlobalString('PDF_ADD_MORE_AFTER_SOURCE_ADDRESS')) {
538
-				$stringaddress .= ($stringaddress ? "\n" : '') . getDolGlobalString('PDF_ADD_MORE_AFTER_SOURCE_ADDRESS');
538
+				$stringaddress .= ($stringaddress ? "\n" : '').getDolGlobalString('PDF_ADD_MORE_AFTER_SOURCE_ADDRESS');
539 539
 			}
540 540
 		}
541 541
 
@@ -645,7 +645,7 @@  discard block
 block discarded – undo
645 645
 				if ($usecontact && is_object($targetcontact) && getDolGlobalInt('MAIN_USE_COMPANY_NAME_OF_CONTACT')) {
646 646
 					$targetcontact->fetch_thirdparty();
647 647
 					if (!empty($targetcontact->thirdparty->id) && $targetcontact->thirdparty->tva_intra) {
648
-						$stringaddress .= ($stringaddress ? "\n" : '') . $outputlangs->transnoentities("VATIntraShort") . ': ' . $outputlangs->convToOutputCharset($targetcontact->thirdparty->tva_intra);
648
+						$stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcontact->thirdparty->tva_intra);
649 649
 					}
650 650
 				} elseif (!empty($targetcompany->tva_intra)) {
651 651
 					$stringaddress .= ($stringaddress ? "\n" : '').$outputlangs->transnoentities("VATIntraShort").': '.$outputlangs->convToOutputCharset($targetcompany->tva_intra);
@@ -732,7 +732,7 @@  discard block
 block discarded – undo
732 732
 
733 733
 	// Add a background image on document only if good setup of const
734 734
 	if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF') && (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF') != '-1')) {		// Warning, this option make TCPDF generation being crazy and some content disappeared behind the image
735
-		$filepath = $conf->mycompany->dir_output.'/logos/' . getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF');
735
+		$filepath = $conf->mycompany->dir_output.'/logos/'.getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF');
736 736
 		if (file_exists($filepath)) {
737 737
 			$pdf->SetAutoPageBreak(0, 0); // Disable auto pagebreak before adding image
738 738
 			if (getDolGlobalString('MAIN_USE_BACKGROUND_ON_PDF_ALPHA')) {
@@ -1031,7 +1031,7 @@  discard block
 block discarded – undo
1031 1031
 	$outputlangs->load("dict");
1032 1032
 	$line = '';
1033 1033
 	$reg = array();
1034
-	$marginwithfooter = 0;  // Return value
1034
+	$marginwithfooter = 0; // Return value
1035 1035
 
1036 1036
 	$dims = $pdf->getPageDimensions();
1037 1037
 
@@ -1164,7 +1164,7 @@  discard block
 block discarded – undo
1164 1164
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof5);
1165 1165
 	}
1166 1166
 	// Prof Id 6
1167
-	if (!empty($fromcompany->idprof6) &&  $fromcompany->idprof6) {
1167
+	if (!empty($fromcompany->idprof6) && $fromcompany->idprof6) {
1168 1168
 		$field = $outputlangs->transcountrynoentities("ProfId6", $fromcompany->country_code);
1169 1169
 		if (preg_match('/\((.*)\)/i', $field, $reg)) {
1170 1170
 			$field = $reg[1];
@@ -1172,7 +1172,7 @@  discard block
 block discarded – undo
1172 1172
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof6);
1173 1173
 	}
1174 1174
 	// Prof Id 7
1175
-	if (!empty($fromcompany->idprof7) &&  $fromcompany->idprof7) {
1175
+	if (!empty($fromcompany->idprof7) && $fromcompany->idprof7) {
1176 1176
 		$field = $outputlangs->transcountrynoentities("ProfId7", $fromcompany->country_code);
1177 1177
 		if (preg_match('/\((.*)\)/i', $field, $reg)) {
1178 1178
 			$field = $reg[1];
@@ -1180,7 +1180,7 @@  discard block
 block discarded – undo
1180 1180
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof7);
1181 1181
 	}
1182 1182
 	// Prof Id 8
1183
-	if (!empty($fromcompany->idprof8) &&  $fromcompany->idprof8) {
1183
+	if (!empty($fromcompany->idprof8) && $fromcompany->idprof8) {
1184 1184
 		$field = $outputlangs->transcountrynoentities("ProfId8", $fromcompany->country_code);
1185 1185
 		if (preg_match('/\((.*)\)/i', $field, $reg)) {
1186 1186
 			$field = $reg[1];
@@ -1188,7 +1188,7 @@  discard block
 block discarded – undo
1188 1188
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof8);
1189 1189
 	}
1190 1190
 	// Prof Id 9
1191
-	if (!empty($fromcompany->idprof9) &&  $fromcompany->idprof9) {
1191
+	if (!empty($fromcompany->idprof9) && $fromcompany->idprof9) {
1192 1192
 		$field = $outputlangs->transcountrynoentities("ProfId9", $fromcompany->country_code);
1193 1193
 		if (preg_match('/\((.*)\)/i', $field, $reg)) {
1194 1194
 			$field = $reg[1];
@@ -1196,7 +1196,7 @@  discard block
 block discarded – undo
1196 1196
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof9);
1197 1197
 	}
1198 1198
 	// Prof Id 10
1199
-	if (!empty($fromcompany->idprof10) &&  $fromcompany->idprof10) {
1199
+	if (!empty($fromcompany->idprof10) && $fromcompany->idprof10) {
1200 1200
 		$field = $outputlangs->transcountrynoentities("ProfId10", $fromcompany->country_code);
1201 1201
 		if (preg_match('/\((.*)\)/i', $field, $reg)) {
1202 1202
 			$field = $reg[1];
@@ -1204,7 +1204,7 @@  discard block
 block discarded – undo
1204 1204
 		$line4 .= ($line4 ? " - " : "").$field.": ".$outputlangs->convToOutputCharset($fromcompany->idprof10);
1205 1205
 	}
1206 1206
 	// IntraCommunautary VAT
1207
-	if (!empty($fromcompany->tva_intra)  && $fromcompany->tva_intra != '') {
1207
+	if (!empty($fromcompany->tva_intra) && $fromcompany->tva_intra != '') {
1208 1208
 		$line4 .= ($line4 ? " - " : "").$outputlangs->transnoentities("VATIntraShort").": ".$outputlangs->convToOutputCharset($fromcompany->tva_intra);
1209 1209
 	}
1210 1210
 
@@ -1375,7 +1375,7 @@  discard block
 block discarded – undo
1375 1375
 
1376 1376
 	$pagination = $pdf->PageNo().' / '.$pdf->getAliasNbPages();
1377 1377
 	$fontRenderCorrection = 0;
1378
-	if (in_array(pdf_getPDFFont($outputlangs), array('freemono',  'DejaVuSans'))) {
1378
+	if (in_array(pdf_getPDFFont($outputlangs), array('freemono', 'DejaVuSans'))) {
1379 1379
 		$fontRenderCorrection = 10;
1380 1380
 	}
1381 1381
 	$pdf->MultiCell(18 + $fontRenderCorrection, 2, $pagination, 0, 'R', 0);
@@ -1472,7 +1472,7 @@  discard block
 block discarded – undo
1472 1472
 
1473 1473
 		if (getDolGlobalString('MARGIN_TOP_ZERO_UL')) {
1474 1474
 			$pdf->setListIndentWidth(5);
1475
-			$TMarginList = ['ul' => [['h' => 0.1, ],['h' => 0.1, ]], 'li' => [['h' => 0.1, ],],];
1475
+			$TMarginList = ['ul' => [['h' => 0.1, ], ['h' => 0.1, ]], 'li' => [['h' => 0.1, ], ], ];
1476 1476
 			$pdf->setHtmlVSpace($TMarginList);
1477 1477
 		}
1478 1478
 
@@ -1514,7 +1514,7 @@  discard block
 block discarded – undo
1514 1514
 		$prodser = new Product($db);
1515 1515
 
1516 1516
 		if (getDolGlobalString('PRODUIT_CUSTOMER_PRICES') || getDolGlobalString('PRODUIT_CUSTOMER_PRICES_AND_MULTIPRICES')) {
1517
-			include_once DOL_DOCUMENT_ROOT . '/product/class/productcustomerprice.class.php';
1517
+			include_once DOL_DOCUMENT_ROOT.'/product/class/productcustomerprice.class.php';
1518 1518
 		}
1519 1519
 	}
1520 1520
 
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
 		$desc = str_replace('(DEPOSIT)', $outputlangs->trans('Deposit'), $desc);
1562 1562
 	}
1563 1563
 
1564
-	$libelleproduitservice = '';  // Default value
1564
+	$libelleproduitservice = ''; // Default value
1565 1565
 	if (!getDolGlobalString('PDF_HIDE_PRODUCT_LABEL_IN_SUPPLIER_LINES')) {
1566 1566
 		// Description short of product line
1567 1567
 		$libelleproduitservice = $label;
@@ -1595,8 +1595,7 @@  discard block
 block discarded – undo
1595 1595
 					$libelleproduitservice = dol_concatdesc(
1596 1596
 						dol_concatdesc($libelleproduitservice, " * ".$subprodval[3]),
1597 1597
 						(!empty($qtyText) ?
1598
-							$outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText :
1599
-							$outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])
1598
+							$outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText : $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])
1600 1599
 					);
1601 1600
 				}
1602 1601
 			} else {
@@ -1604,8 +1603,7 @@  discard block
 block discarded – undo
1604 1603
 					$libelleproduitservice = dol_concatdesc(
1605 1604
 						dol_concatdesc($libelleproduitservice, " * ".$subprodval[5].(($subprodval[5] && $subprodval[3]) ? ' - ' : '').$subprodval[3]),
1606 1605
 						(!empty($qtyText) ?
1607
-							$outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText :
1608
-							$outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])
1606
+							$outputlangs->trans('Qty').':'.$qtyText.' x '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1].'= '.$outputlangs->trans('QtyTot').':'.$subprodval[1] * $qtyText : $outputlangs->trans('Qty').' '.$outputlangs->trans('AssociatedProducts').':'.$subprodval[1])
1609 1607
 					);
1610 1608
 				}
1611 1609
 			}
@@ -1708,11 +1706,11 @@  discard block
 block discarded – undo
1708 1706
 								break;
1709 1707
 
1710 1708
 							case 2:
1711
-								$ref_prodserv = $productCustomerPrice->ref_customer . ' (' . $outputlangs->transnoentitiesnoconv('InternalRef') . ' ' . $ref_prodserv . ')';
1709
+								$ref_prodserv = $productCustomerPrice->ref_customer.' ('.$outputlangs->transnoentitiesnoconv('InternalRef').' '.$ref_prodserv.')';
1712 1710
 								break;
1713 1711
 
1714 1712
 							default:
1715
-								$ref_prodserv = $ref_prodserv . ' (' . $outputlangs->transnoentitiesnoconv('RefCustomer') . ' ' . $productCustomerPrice->ref_customer . ')';
1713
+								$ref_prodserv = $ref_prodserv.' ('.$outputlangs->transnoentitiesnoconv('RefCustomer').' '.$productCustomerPrice->ref_customer.')';
1716 1714
 						}
1717 1715
 					}
1718 1716
 				}
@@ -2575,7 +2573,7 @@  discard block
 block discarded – undo
2575 2573
 						}
2576 2574
 					}
2577 2575
 					$refListsTxt .= (!empty($refListsTxt) ? ' ' : '');
2578
-					if (! is_object($order)) {
2576
+					if (!is_object($order)) {
2579 2577
 						$refListsTxt .= $outputlangs->transnoentities($elementobject->ref);
2580 2578
 					} else {
2581 2579
 						$refListsTxt .= $outputlangs->convToOutputCharset($order->ref).($order->ref_client ? ' ('.$order->ref_client.')' : '');
@@ -2602,7 +2600,7 @@  discard block
 block discarded – undo
2602 2600
 					}
2603 2601
 				}
2604 2602
 
2605
-				if (! is_object($order)) {
2603
+				if (!is_object($order)) {
2606 2604
 					$linkedobjects[$objecttype]['ref_title'] = $outputlangs->transnoentities("RefSending");
2607 2605
 					if (empty($linkedobjects[$objecttype]['ref_value'])) {
2608 2606
 						$linkedobjects[$objecttype]['ref_value'] = '';
@@ -2706,7 +2704,7 @@  discard block
 block discarded – undo
2706 2704
 				if (isset($hookmanager->resArray['linetotalremise'])) {
2707 2705
 					return (float) $hookmanager->resArray['linetotalremise'];
2708 2706
 				} else {
2709
-					return (float) $hookmanager->resPrint;	// For backward compatibility
2707
+					return (float) $hookmanager->resPrint; // For backward compatibility
2710 2708
 				}
2711 2709
 			}
2712 2710
 		}
Please login to merge, or discard this patch.
htdocs/core/modules/DolibarrModules.class.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
 	const KEY_ID = 0;
143 143
 	const KEY_LABEL = 1;
144
-	const KEY_TYPE = 2;	// deprecated
144
+	const KEY_TYPE = 2; // deprecated
145 145
 	const KEY_DEFAULT = 3;
146 146
 	const KEY_FIRST_LEVEL = 4;
147 147
 	const KEY_SECOND_LEVEL = 5;
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
 				$moduleNameInConf = 'supplier_proposal';
722 722
 			}
723 723
 
724
-			unset($conf->modules[$moduleNameInConf]);	// Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
724
+			unset($conf->modules[$moduleNameInConf]); // Add this module in list of enabled modules so isModEnabled() will work (conf->module->enabled must no more be used)
725 725
 
726 726
 			return 1;
727 727
 		} else {
@@ -817,7 +817,7 @@  discard block
 block discarded – undo
817 817
 		$pathoffile = $this->getDescLongReadmeFound();
818 818
 
819 819
 		if ($pathoffile) {     // Mostly for external modules
820
-			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024);	// Max size loaded 1Mb
820
+			$content = file_get_contents($pathoffile, false, null, 0, 1024 * 1024); // Max size loaded 1Mb
821 821
 
822 822
 			if ((float) DOL_VERSION >= 6.0) {  // @phpstan-ignore-line
823 823
 				@include_once DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
 
1582 1582
 				$sql = "DELETE FROM ".MAIN_DB_PREFIX."boxes_def";
1583 1583
 				$sql .= " WHERE file = '".$this->db->escape($file)."'";
1584
-				$sql .= " AND entity = ".$conf->entity;		// Do not use getEntity here, we want to delete only in current company
1584
+				$sql .= " AND entity = ".$conf->entity; // Do not use getEntity here, we want to delete only in current company
1585 1585
 
1586 1586
 				dol_syslog(get_class($this)."::delete_boxes", LOG_DEBUG);
1587 1587
 				$resql = $this->db->query($sql);
@@ -1604,9 +1604,9 @@  discard block
 block discarded – undo
1604 1604
 	public function insert_cronjobs()
1605 1605
 	{
1606 1606
 		// phpcs:enable
1607
-		include_once DOL_DOCUMENT_ROOT . '/core/class/infobox.class.php';
1608
-		include_once DOL_DOCUMENT_ROOT . '/cron/class/cronjob.class.php';
1609
-		include_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
1607
+		include_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
1608
+		include_once DOL_DOCUMENT_ROOT.'/cron/class/cronjob.class.php';
1609
+		include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
1610 1610
 
1611 1611
 		global $conf, $user;
1612 1612
 
@@ -1617,7 +1617,7 @@  discard block
 block discarded – undo
1617 1617
 		$err = 0;
1618 1618
 
1619 1619
 		if (is_array($this->cronjobs)) {
1620
-			dol_syslog(get_class($this) . "::insert_cronjobs", LOG_DEBUG);
1620
+			dol_syslog(get_class($this)."::insert_cronjobs", LOG_DEBUG);
1621 1621
 
1622 1622
 			foreach ($this->cronjobs as $key => $value) {
1623 1623
 				$now = dol_now();
@@ -1644,7 +1644,7 @@  discard block
 block discarded – undo
1644 1644
 				$test = isset($value['test']) ? $value['test'] : ''; // Line must be enabled or not (so visible or not)
1645 1645
 
1646 1646
 				// Search if cron entry already present
1647
-				$sql = "SELECT count(*) as nb FROM " . MAIN_DB_PREFIX . "cronjob";
1647
+				$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."cronjob";
1648 1648
 				//$sql .= " WHERE module_name = '" . $this->db->escape(empty($this->rights_class) ? strtolower($this->name) : $this->rights_class) . "'";
1649 1649
 				$sql .= " WHERE label = '".$this->db->escape($label)."'";
1650 1650
 				/* unique key is on label,entity so no need for this test
@@ -1664,7 +1664,7 @@  discard block
 block discarded – undo
1664 1664
 					$sql .= " AND params = '" . $this->db->escape($params) . "'";
1665 1665
 				}
1666 1666
 				*/
1667
-				$sql .= " AND entity = " . ((int) $entity); // Must be exact entity
1667
+				$sql .= " AND entity = ".((int) $entity); // Must be exact entity
1668 1668
 
1669 1669
 				$result = $this->db->query($sql);
1670 1670
 				if (!$result) {
@@ -1990,9 +1990,9 @@  discard block
 block discarded – undo
1990 1990
 
1991 1991
 				// If the module is active
1992 1992
 				foreach ($this->rights as $key => $value) {
1993
-					$r_id = $this->rights[$key][self::KEY_ID];	// permission id in llx_rights_def (not unique because primary key is couple id-entity)
1993
+					$r_id = $this->rights[$key][self::KEY_ID]; // permission id in llx_rights_def (not unique because primary key is couple id-entity)
1994 1994
 					$r_label = $this->rights[$key][self::KEY_LABEL];
1995
-					$r_type	= $this->rights[$key][self::KEY_TYPE] ?? 'w';	// TODO deprecated
1995
+					$r_type = $this->rights[$key][self::KEY_TYPE] ?? 'w'; // TODO deprecated
1996 1996
 					$r_default = $this->rights[$key][self::KEY_DEFAULT] ?? 0;
1997 1997
 					$r_perms = $this->rights[$key][self::KEY_FIRST_LEVEL] ?? '';
1998 1998
 					$r_subperms = $this->rights[$key][self::KEY_SECOND_LEVEL] ?? '';
@@ -2016,7 +2016,7 @@  discard block
 block discarded – undo
2016 2016
 					}
2017 2017
 
2018 2018
 					// condition to show or hide a user right (default: 1) (eg isModEnabled('anothermodule') or ($conf->global->MAIN_FEATURES_LEVEL > 0) or etc..)
2019
-					$r_enabled	= $this->rights[$key][self::KEY_ENABLED] ?? '1';
2019
+					$r_enabled = $this->rights[$key][self::KEY_ENABLED] ?? '1';
2020 2020
 
2021 2021
 					// Search if perm already present
2022 2022
 					$sql = "SELECT count(*) as nb FROM ".MAIN_DB_PREFIX."rights_def";
@@ -2033,7 +2033,7 @@  discard block
 block discarded – undo
2033 2033
 							$sql .= ", libelle";
2034 2034
 							$sql .= ", module";
2035 2035
 							$sql .= ", module_origin";
2036
-							$sql .= ", type";	// TODO deprecated
2036
+							$sql .= ", type"; // TODO deprecated
2037 2037
 							$sql .= ", bydefault";
2038 2038
 							$sql .= ", perms";
2039 2039
 							$sql .= ", subperms";
@@ -2044,7 +2044,7 @@  discard block
 block discarded – undo
2044 2044
 							$sql .= ", '".$this->db->escape($r_label)."'";
2045 2045
 							$sql .= ", '".$this->db->escape($r_module)."'";
2046 2046
 							$sql .= ", '".$this->db->escape($r_module_origin)."'";
2047
-							$sql .= ", '".$this->db->escape($r_type)."'";	// TODO deprecated
2047
+							$sql .= ", '".$this->db->escape($r_type)."'"; // TODO deprecated
2048 2048
 							$sql .= ", ".((int) $r_default);
2049 2049
 							$sql .= ", '".$this->db->escape($r_perms)."'";
2050 2050
 							$sql .= ", '".$this->db->escape($r_subperms)."'";
@@ -2266,7 +2266,7 @@  discard block
 block discarded – undo
2266 2266
 
2267 2267
 		$sql = "DELETE FROM ".MAIN_DB_PREFIX."menu";
2268 2268
 		$sql .= " WHERE module = '".$this->db->escape($module)."'";
2269
-		$sql .= " AND menu_handler = 'all'";	// We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2269
+		$sql .= " AND menu_handler = 'all'"; // We delete only lines that were added manually or by the module activation. We keep entry added by menuhandler like 'auguria'
2270 2270
 		$sql .= " AND entity IN (0, ".$conf->entity.")";
2271 2271
 
2272 2272
 		dol_syslog(get_class($this)."::delete_menus", LOG_DEBUG);
@@ -2650,36 +2650,36 @@  discard block
 block discarded – undo
2650 2650
 		}
2651 2651
 
2652 2652
 		if ($this->isCoreOrExternalModule() == 'external' || preg_match('/development|experimental|deprecated/i', $version)) {
2653
-			$versionTitle =  $langs->trans("Version").' '.$this->getVersion(1);
2653
+			$versionTitle = $langs->trans("Version").' '.$this->getVersion(1);
2654 2654
 			if ($this->needUpdate) {
2655 2655
 				$versionTitle .= '<br>'.$langs->trans('ModuleUpdateAvailable').' : '.$this->lastVersion;
2656 2656
 			}
2657 2657
 
2658
-			$return .=  '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2659
-			$return .=  $this->getVersion(1);
2660
-			$return .=  '</span>';
2658
+			$return .= '<span class="info-box-icon-version'.($versiontrans ? ' '.$versiontrans : '').' classfortooltip" title="'.dol_escape_js($versionTitle).'" >';
2659
+			$return .= $this->getVersion(1);
2660
+			$return .= '</span>';
2661 2661
 		}
2662 2662
 
2663
-		$return .=  '</div>
2663
+		$return .= '</div>
2664 2664
 	    <div class="info-box-content info-box-text-module'.(!getDolGlobalString($const_name) ? '' : ' info-box-module-enabled'.($versiontrans ? ' info-box-content-warning' : '')).'">
2665 2665
 	    <span class="info-box-title">'.$this->getName().'</span>
2666 2666
 	    <span class="info-box-desc twolinesmax opacitymedium" title="'.dol_escape_htmltag($this->getDesc()).'">'.nl2br($this->getDesc()).'</span>';
2667 2667
 
2668
-		$return .=  '<div class="valignmiddle inline-block info-box-more">';
2668
+		$return .= '<div class="valignmiddle inline-block info-box-more">';
2669 2669
 		//if ($versiontrans) print img_warning($langs->trans("Version").' '.$this->getVersion(1)).' ';
2670
-		$return .=  '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
2671
-		$return .=  '</div><br>';
2672
-
2673
-		$return .=  '<div class="valignmiddle inline-block info-box-actions">';
2674
-		$return .=  '<div class="valignmiddle inline-block info-box-setup">';
2675
-		$return .=  $codetoconfig;
2676
-		$return .=  '</div>';
2677
-		$return .=  '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2678
-		$return .=  $codeenabledisable;
2679
-		$return .=  '</div>';
2680
-		$return .=  '</div>';
2681
-
2682
-		$return .=  '
2670
+		$return .= '<a class="valignmiddle inline-block" href="javascript:document_preview(\''.DOL_URL_ROOT.'/admin/modulehelp.php?id='.((int) $this->numero).'\',\'text/html\',\''.dol_escape_js($langs->trans("Module")).'\')">'.img_picto(($this->isCoreOrExternalModule() == 'external' ? $langs->trans("ExternalModule").' - ' : '').$langs->trans("ClickToShowDescription"), $imginfo).'</a>';
2671
+		$return .= '</div><br>';
2672
+
2673
+		$return .= '<div class="valignmiddle inline-block info-box-actions">';
2674
+		$return .= '<div class="valignmiddle inline-block info-box-setup">';
2675
+		$return .= $codetoconfig;
2676
+		$return .= '</div>';
2677
+		$return .= '<div class="valignmiddle inline-block marginleftonly marginrightonly">';
2678
+		$return .= $codeenabledisable;
2679
+		$return .= '</div>';
2680
+		$return .= '</div>';
2681
+
2682
+		$return .= '
2683 2683
 	    </div><!-- /.info-box-content -->
2684 2684
 	    </div><!-- /.info-box -->
2685 2685
 	    </div>';
@@ -2699,7 +2699,7 @@  discard block
 block discarded – undo
2699 2699
 	{
2700 2700
 		require_once DOL_DOCUMENT_ROOT.'/core/lib/geturl.lib.php';
2701 2701
 		if (!empty($this->url_last_version)) {
2702
-			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2702
+			$lastVersion = getURLContent($this->url_last_version, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2703 2703
 			if (isset($lastVersion['content']) && strlen($lastVersion['content']) < 30) {
2704 2704
 				// Security warning :  be careful with remote data content, the module editor could be hacked (or evil) so limit to a-z A-Z 0-9 _ . -
2705 2705
 				$this->lastVersion = preg_replace("/[^a-zA-Z0-9_\.\-]+/", "", $lastVersion['content']);
@@ -2738,7 +2738,7 @@  discard block
 block discarded – undo
2738 2738
 
2739 2739
 			$urlforblacklistmodules = 'https://ping.dolibarr.org/modules-blacklist.txt';
2740 2740
 
2741
-			$result = getURLContent($urlforblacklistmodules, 'GET', '', 1, array(), array('http', 'https'), 0);	// Accept http or https links on external remote server only
2741
+			$result = getURLContent($urlforblacklistmodules, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only
2742 2742
 			if (isset($result['content']) && $result['http_code'] == 200) {
2743 2743
 				$langs->load("errors");
2744 2744
 
Please login to merge, or discard this patch.
htdocs/core/menus/standard/eldy.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1702,7 +1702,7 @@  discard block
 block discarded – undo
1702 1702
 				$newmenu->add("/accountancy/admin/productaccount.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuProductsAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_product', 110);
1703 1703
 				$newmenu->add("/accountancy/admin/closure.php?mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("MenuClosureAccounts"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_closure', 120);
1704 1704
 				if (getDolGlobalInt('MAIN_FEATURES_LEVEL') >= 2) {
1705
-					$newmenu->add("/accountancy/admin/report_list.php?id=32&search_country_id=" . $mysoc->country_id . "&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingReport"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_report', 125);
1705
+					$newmenu->add("/accountancy/admin/report_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingReport"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_report', 125);
1706 1706
 				}
1707 1707
 				$newmenu->add("/accountancy/admin/categories_list.php?id=32&search_country_id=".$mysoc->country_id."&mainmenu=accountancy&leftmenu=accountancy_admin", $langs->trans("AccountingCategory"), 1, $user->hasRight('accounting', 'chartofaccount'), '', $mainmenu, 'accountancy_admin_chart', 130);
1708 1708
 			}
@@ -1772,7 +1772,7 @@  discard block
 block discarded – undo
1772 1772
 								$nature = "expensereports";
1773 1773
 							}
1774 1774
 							if ($objp->nature == 1 && isModEnabled('asset')) {
1775
-								$nature = "various";	// Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists.
1775
+								$nature = "various"; // Warning: The page /accountancy/journal/variousjournal.php is bugged. It read tables that does not exists.
1776 1776
 							}
1777 1777
 							if ($objp->nature == 8) {
1778 1778
 								$nature = "inventory";
@@ -1797,7 +1797,7 @@  discard block
 block discarded – undo
1797 1797
 									$journallabel = '<span class="opacitymedium">('.$langs->trans($objp->label).')</span>'; // Label of bank account in llx_accounting_journal
1798 1798
 								}
1799 1799
 
1800
-								$key = $langs->trans("AccountingJournalType".$objp->nature);	// $objp->nature is 1, 2, 3 ...
1800
+								$key = $langs->trans("AccountingJournalType".$objp->nature); // $objp->nature is 1, 2, 3 ...
1801 1801
 								$transferlabel = (($objp->nature && $key != "AccountingJournalType".$objp->nature) ? $key.($journallabelwithoutspan != $key ? ' '.$journallabel : '') : $journallabel);
1802 1802
 
1803 1803
 								$newmenu->add('/accountancy/journal/'.$nature.'journal.php?mainmenu=accountancy&leftmenu=accountancy_journal&id_journal='.$objp->rowid, $transferlabel, 2, $user->hasRight('accounting', 'comptarapport', 'lire'));
@@ -1864,7 +1864,7 @@  discard block
 block discarded – undo
1864 1864
 						if ($numr > 0) {
1865 1865
 							while ($i < $numr) {
1866 1866
 								$objp = $db->fetch_object($resql);
1867
-								$newmenu->add('/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report&id_report='.$objp->rowid, $langs->trans("Personalized") . " - " . $objp->label, 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1867
+								$newmenu->add('/compta/resultat/result.php?mainmenu=accountancy&leftmenu=accountancy_report&id_report='.$objp->rowid, $langs->trans("Personalized")." - ".$objp->label, 3, $user->hasRight('accounting', 'comptarapport', 'lire'));
1868 1868
 								$i++;
1869 1869
 							}
1870 1870
 						} else {
Please login to merge, or discard this patch.