Completed
Branch develop (24d030)
by Laurent
20:10
created
htdocs/accountancy/customer/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 	$sql .= " FROM ".MAIN_DB_PREFIX."facturedet as l";
111 111
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
112 112
 	if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
113
-		$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
113
+		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = ".((int) $conf->entity);
114 114
 	}
115 115
 	$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."accounting_account as aa ON l.fk_code_ventilation = aa.rowid";
116 116
 	$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture as f ON f.rowid = l.fk_facture";
Please login to merge, or discard this patch.
htdocs/knowledgemanagement/class/knowledgerecord.class.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -820,7 +820,9 @@
 block discarded – undo
820 820
 		}
821 821
 
822 822
 		$statusType = 'status'.$status;
823
-		if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
823
+		if ($status == self::STATUS_VALIDATED) {
824
+			$statusType = 'status4';
825
+		}
824 826
 		if ($status == self::STATUS_CANCELED) {
825 827
 			$statusType = 'status6';
826 828
 		}
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 	/**
100 100
 	 * @var array  Array with all fields and their property. Do not use it as a static var. It may be modified by constructor.
101 101
 	 */
102
-	public $fields=array(
102
+	public $fields = array(
103 103
 		'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
104 104
 		'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'visible'=>5, 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of object", "csslist"=>"nowraponall", "showoncombobox"=>1),
105 105
 		'entity' =>array('type'=>'integer', 'label'=>'Entity', 'default'=>1, 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>20, 'index'=>1),
@@ -737,12 +737,12 @@  discard block
 block discarded – undo
737 737
 		$datas['label'] = '<br><b>'.$langs->trans('Ref').':</b> '.$this->ref;
738 738
 		$datas['question'] = '<br><b>'.$langs->trans('Question').':</b> '.$this->question;
739 739
 		$labellang = ($this->lang ? $langs->trans('Language_'.$this->lang) : '');
740
-		$datas['lang'] = '<br><b>'.$langs->trans('Language').':</b> ' . picto_from_langcode($this->lang, 'class="paddingrightonly saturatemedium opacitylow"') . $labellang;
740
+		$datas['lang'] = '<br><b>'.$langs->trans('Language').':</b> '.picto_from_langcode($this->lang, 'class="paddingrightonly saturatemedium opacitylow"').$labellang;
741 741
 		// show categories for this record only in ajax to not overload lists
742 742
 		if (isModEnabled('categorie') && !$nofetch) {
743
-			require_once DOL_DOCUMENT_ROOT . '/categories/class/categorie.class.php';
743
+			require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
744 744
 			$form = new Form($this->db);
745
-			$datas['categories'] = '<br>' . $form->showCategories($this->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
745
+			$datas['categories'] = '<br>'.$form->showCategories($this->id, Categorie::TYPE_KNOWLEDGEMANAGEMENT, 1);
746 746
 		}
747 747
 
748 748
 		return $datas;
@@ -803,7 +803,7 @@  discard block
 block discarded – undo
803 803
 				$label = $langs->trans("ShowKnowledgeRecord");
804 804
 				$linkclose .= ' alt="'.dol_escape_htmltag($label, 1).'"';
805 805
 			}
806
-			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' :  ' title="tocomplete"');
806
+			$linkclose .= ($label ? ' title="'.dol_escape_htmltag($label, 1).'"' : ' title="tocomplete"');
807 807
 			$linkclose .= $dataparams.' class="'.$classfortooltip.($morecss ? ' '.$morecss : '').'"';
808 808
 		} else {
809 809
 			$linkclose = ($morecss ? ' class="'.$morecss.'"' : '');
Please login to merge, or discard this patch.
htdocs/website/index.php 2 patches
Braces   +18 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,7 +26,9 @@  discard block
 block discarded – undo
26 26
 define('NOSTYLECHECK', 1);
27 27
 define('USEDOLIBARREDITOR', 1);
28 28
 define('FORCE_CKEDITOR', 1); // We need CKEditor, even if module is off.
29
-if (!defined('DISABLE_JS_GRAHP')) define('DISABLE_JS_GRAPH', 1);
29
+if (!defined('DISABLE_JS_GRAHP')) {
30
+	define('DISABLE_JS_GRAPH', 1);
31
+}
30 32
 
31 33
 //header('X-XSS-Protection:0');	// Disable XSS filtering protection of some browsers (note: use of Content-Security-Policy is more efficient). Disabled as deprecated.
32 34
 
@@ -592,7 +594,9 @@  discard block
 block discarded – undo
592 594
 		$arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml'));
593 595
 		foreach ($arrayotherlang as $key => $val) {
594 596
 			// It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,'
595
-			if (empty(trim($val))) continue;
597
+			if (empty(trim($val))) {
598
+				continue;
599
+			}
596 600
 			$arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only
597 601
 		}
598 602
 
@@ -1336,7 +1340,9 @@  discard block
 block discarded – undo
1336 1340
 				$arrayotherlang = explode(',', GETPOST('WEBSITE_OTHERLANG', 'alphanohtml'));
1337 1341
 				foreach ($arrayotherlang as $key => $val) {
1338 1342
 					// It possible we have empty val here if postparam WEBSITE_OTHERLANG is empty or set like this : 'en,,sv' or 'en,sv,'
1339
-					if (empty(trim($val))) continue;
1343
+					if (empty(trim($val))) {
1344
+						continue;
1345
+					}
1340 1346
 					$arrayotherlang[$key] = substr(trim($val), 0, 2); // Kept short language code only
1341 1347
 				}
1342 1348
 
@@ -1793,7 +1799,9 @@  discard block
 block discarded – undo
1793 1799
 					// Under certain conditions $sublang can be an empty string
1794 1800
 					// ($object->otherlang with empty string or with string like this 'en,,sv')
1795 1801
 					// if is the case we try to re-delete the main alias file. Avoid it.
1796
-					if (empty(trim($sublang))) continue;
1802
+					if (empty(trim($sublang))) {
1803
+						continue;
1804
+					}
1797 1805
 					$fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename;
1798 1806
 					dol_delete_file($fileoldaliassub);
1799 1807
 				}
@@ -1816,7 +1824,9 @@  discard block
 block discarded – undo
1816 1824
 							// Under certain conditions $ sublang can be an empty string
1817 1825
 							// ($object->otherlang with empty string or with string like this 'en,,sv')
1818 1826
 							// if is the case we try to re-delete the main alias file. Avoid it.
1819
-							if (empty(trim($sublang))) continue;
1827
+							if (empty(trim($sublang))) {
1828
+								continue;
1829
+							}
1820 1830
 							$fileoldaliassub = $dirname.'/'.$sublang.'/'.$filename;
1821 1831
 							dol_delete_file($fileoldaliassub);
1822 1832
 						}
@@ -2903,7 +2913,9 @@  discard block
 block discarded – undo
2903 2913
 							$onlylang[$website->lang] = $website->lang.' ('.$langs->trans("Default").')';
2904 2914
 						}
2905 2915
 						foreach (explode(',', $website->otherlang) as $langkey) {
2906
-							if (empty(trim($langkey))) continue;
2916
+							if (empty(trim($langkey))) {
2917
+								continue;
2918
+							}
2907 2919
 							$onlylang[$langkey] = $langkey;
2908 2920
 						}
2909 2921
 						$textifempty = $langs->trans("Default");
Please login to merge, or discard this patch.
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 }
344 344
 
345 345
 $usercanedit = $user->rights->website->write;
346
-$permissiontoadd = $user->rights->website->write;	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
346
+$permissiontoadd = $user->rights->website->write; // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
347 347
 $permissiontodelete = $user->hasRight('website', 'delete');
348 348
 
349 349
 
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 if ($sortorder) {
410 410
 	$backtopage .= '&sortorder='.urlencode($sortorder);
411 411
 }
412
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';	// This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
412
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
413 413
 
414 414
 $backtopage = $savbacktopage;
415 415
 //var_dump($backtopage);
@@ -1488,7 +1488,7 @@  discard block
 block discarded – undo
1488 1488
 					$error++;
1489 1489
 					setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1490 1490
 				}
1491
-				if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1491
+				if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1492 1492
 					$error++;
1493 1493
 					setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1494 1494
 				}
@@ -1500,7 +1500,7 @@  discard block
 block discarded – undo
1500 1500
 				if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1501 1501
 					$action = 'preview';
1502 1502
 					if ($backtopage) {
1503
-						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1503
+						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1504 1504
 						header("Location: ".$backtopage);
1505 1505
 						exit;
1506 1506
 					}
@@ -1533,7 +1533,7 @@  discard block
 block discarded – undo
1533 1533
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1534 1534
 
1535 1535
 			// Security analysis
1536
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1536
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1537 1537
 
1538 1538
 			if (!$errorphpcheck) {
1539 1539
 				$htmlheadercontent = '';
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1572 1572
 
1573 1573
 			// Security analysis
1574
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1574
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1575 1575
 
1576 1576
 			if (!$errorphpcheck) {
1577 1577
 				$csscontent = '';
@@ -1614,7 +1614,7 @@  discard block
 block discarded – undo
1614 1614
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1615 1615
 
1616 1616
 			// Security analysis
1617
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1617
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1618 1618
 
1619 1619
 			if (!$errorphpcheck) {
1620 1620
 				$jscontent = '';
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1653 1653
 
1654 1654
 			// Security analysis
1655
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1655
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1656 1656
 
1657 1657
 			if (!$errorphpcheck) {
1658 1658
 				$robotcontent = '';
@@ -1690,7 +1690,7 @@  discard block
 block discarded – undo
1690 1690
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1691 1691
 
1692 1692
 			// Security analysis
1693
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1693
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1694 1694
 
1695 1695
 			if (!$errorphpcheck) {
1696 1696
 				$htaccesscontent = '';
@@ -1714,7 +1714,7 @@  discard block
 block discarded – undo
1714 1714
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1715 1715
 
1716 1716
 			// Security analysis
1717
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1717
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1718 1718
 
1719 1719
 			if (!$errorphpcheck) {
1720 1720
 				$manifestjsoncontent = '';
@@ -1752,7 +1752,7 @@  discard block
 block discarded – undo
1752 1752
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1753 1753
 
1754 1754
 			// Security analysis
1755
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1755
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1756 1756
 
1757 1757
 			if (!$errorphpcheck) {
1758 1758
 				$readmecontent = '';
@@ -1790,7 +1790,7 @@  discard block
 block discarded – undo
1790 1790
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1791 1791
 
1792 1792
 			// Security analysis
1793
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1793
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1794 1794
 
1795 1795
 			if (!$errorphpcheck) {
1796 1796
 				$licensecontent = '';
@@ -1832,7 +1832,7 @@  discard block
 block discarded – undo
1832 1832
 			if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1833 1833
 				$action = 'preview';
1834 1834
 				if ($backtopage) {
1835
-					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1835
+					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1836 1836
 					header("Location: ".$backtopage);
1837 1837
 					exit;
1838 1838
 				}
@@ -1851,7 +1851,7 @@  discard block
 block discarded – undo
1851 1851
 
1852 1852
 	$object->fk_default_home = $pageid;
1853 1853
 	$res = $object->update($user);
1854
-	if (! ($res > 0)) {
1854
+	if (!($res > 0)) {
1855 1855
 		$error++;
1856 1856
 		setEventMessages($object->error, $object->errors, 'errors');
1857 1857
 	}
@@ -2238,7 +2238,7 @@  discard block
 block discarded – undo
2238 2238
 
2239 2239
 			$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content);
2240 2240
 
2241
-			$objectpage->content = GETPOST('PAGE_CONTENT', 'none');	// any HTML content allowed
2241
+			$objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed
2242 2242
 
2243 2243
 			$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content);
2244 2244
 
@@ -2432,7 +2432,7 @@  discard block
 block discarded – undo
2432 2432
 				$fileofzip = '';
2433 2433
 				if (GETPOSTISSET('templateuserfile')) {
2434 2434
 					// Case we selected one template
2435
-					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha');	// $fileofzip will be sanitized later into the importWebSite()
2435
+					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2436 2436
 				} elseif (!empty($_FILES)) {
2437 2437
 					// Case we upload a new template
2438 2438
 					if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2511,7 +2511,7 @@  discard block
 block discarded – undo
2511 2511
 	if ($website->virtualhost) {
2512 2512
 		$domainname = $website->virtualhost;
2513 2513
 	}
2514
-	if (! preg_match('/^http/i', $domainname)) {
2514
+	if (!preg_match('/^http/i', $domainname)) {
2515 2515
 		$domainname = 'https://'.$domainname;
2516 2516
 	}
2517 2517
 
@@ -2577,7 +2577,7 @@  discard block
 block discarded – undo
2577 2577
 				$url->appendChild($lastmod);
2578 2578
 				// Add suggested frequency for refresh
2579 2579
 				if (!empty($conf->global->WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ)) {
2580
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2580
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2581 2581
 					$url->appendChild($changefreq);
2582 2582
 				}
2583 2583
 				// Add higher priority for home page
@@ -2682,7 +2682,7 @@  discard block
 block discarded – undo
2682 2682
 				$url->appendChild($lastmod);
2683 2683
 				// Add suggested frequency for refresh
2684 2684
 				if (!empty($conf->global->WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ)) {
2685
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2685
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2686 2686
 					$url->appendChild($changefreq);
2687 2687
 				}
2688 2688
 
@@ -2764,7 +2764,7 @@  discard block
 block discarded – undo
2764 2764
 
2765 2765
 print "\n";
2766 2766
 print '<!-- Open form for all page -->'."\n";
2767
-print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1': '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">';
2767
+print '<form action="'.$_SERVER["PHP_SELF"].($action == 'file_manager' ? '?uploadform=1' : '').'" method="POST" enctype="multipart/form-data" class="websiteformtoolbar">';
2768 2768
 print '<input type="hidden" name="token" value="'.newToken().'">';
2769 2769
 print '<input type="hidden" name="backtopage" value="'.$backtopage.'">';
2770 2770
 print '<input type="hidden" name="dol_openinpopup" value="'.$dol_openinpopup.'">';
@@ -3266,7 +3266,7 @@  discard block
 block discarded – undo
3266 3266
 						$formquestion[] = array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss'=>'margintoponly');
3267 3267
 					}
3268 3268
 
3269
-					$value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3269
+					$value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3270 3270
 					$formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value);
3271 3271
 
3272 3272
 					$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
@@ -3294,7 +3294,7 @@  discard block
 block discarded – undo
3294 3294
 				print '<!-- button EditInLine and ShowSubcontainers -->'."\n";
3295 3295
 				print '<div class="websiteselectionsection inline-block">';
3296 3296
 
3297
-				print '<div class="inline-block marginrightonly">';	// Button include dynamic contant
3297
+				print '<div class="inline-block marginrightonly">'; // Button include dynamic contant
3298 3298
 				print $langs->trans("ShowSubcontainers");
3299 3299
 				if (empty($conf->global->WEBSITE_SUBCONTAINERSINLINE)) {
3300 3300
 					print '<a class="nobordertransp nohoverborder marginleftonlyshort valignmiddle"'.$disabled.' href="'.$_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$websitepage->id.'&action=setshowsubcontainers&token='.newToken().'">'.img_picto($langs->trans("ShowSubContainersOnOff", $langs->transnoentitiesnoconv("Off")), 'switch_off', '', false, 0, 0, '', 'nomarginleft').'</a>';
@@ -3303,7 +3303,7 @@  discard block
 block discarded – undo
3303 3303
 				}
3304 3304
 				print '</div>';
3305 3305
 
3306
-				print '<div class="inline-block marginrightonly">';	// Button edit inline
3306
+				print '<div class="inline-block marginrightonly">'; // Button edit inline
3307 3307
 
3308 3308
 				print '<span id="switchckeditorinline">'."\n";
3309 3309
 				// Enable CKEditor inline with js on section and div with conteneditable=true
@@ -3421,7 +3421,7 @@  discard block
 block discarded – undo
3421 3421
 				} else {
3422 3422
 					$disabled = '';
3423 3423
 					$title = '';
3424
-					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref);	// action=delete for webpage, deletesite for website
3424
+					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website
3425 3425
 				}
3426 3426
 				print '<a href="'.$url.'" class="button buttonDelete bordertransp'.($disabled ? ' disabled' : '').'"'.$disabled.' title="'.dol_escape_htmltag($title).'">'.img_picto('', 'delete', 'class=""').'<span class="hideonsmartphone paddingleft">'.$langs->trans("Delete").'</span></a>';
3427 3427
 				print '</span>';
@@ -3626,7 +3626,7 @@  discard block
 block discarded – undo
3626 3626
 		// Clean the php htaccesscontent file to remove php code and get only html part
3627 3627
 		$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent);
3628 3628
 	} else {
3629
-		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');	// We must use 'nohtml' and not 'alphanohtml' because we must accept "
3629
+		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3630 3630
 	}
3631 3631
 	if (!trim($htaccesscontent)) {
3632 3632
 		$htaccesscontent .= "# Order allow,deny\n";
@@ -3728,7 +3728,7 @@  discard block
 block discarded – undo
3728 3728
 	$maxfilesizearray = getMaxFileSizeArray();
3729 3729
 	$maxmin = $maxfilesizearray['maxmin'];
3730 3730
 	if ($maxmin > 0) {
3731
-		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
3731
+		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
3732 3732
 	}
3733 3733
 	print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
3734 3734
 	print '</tr></td>';
@@ -3977,7 +3977,7 @@  discard block
 block discarded – undo
3977 3977
 		$maxfilesizearray = getMaxFileSizeArray();
3978 3978
 		$maxmin = $maxfilesizearray['maxmin'];
3979 3979
 		if ($maxmin > 0) {
3980
-			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
3980
+			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
3981 3981
 		}
3982 3982
 		print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
3983 3983
 		print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">';
@@ -4496,7 +4496,7 @@  discard block
 block discarded – undo
4496 4496
 
4497 4497
 
4498 4498
 	$module = 'medias';
4499
-	$formalreadyopen = 2;	// So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4499
+	$formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4500 4500
 	if (empty($url)) {
4501 4501
 		$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param
4502 4502
 	}
@@ -4549,7 +4549,7 @@  discard block
 block discarded – undo
4549 4549
 
4550 4550
 	require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
4551 4551
 	$poscursor = array('x'=>GETPOST('PAGE_CONTENT_x'), 'y'=>GETPOST('PAGE_CONTENT_y'));
4552
-	$doleditor=new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4552
+	$doleditor = new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4553 4553
 	$doleditor->Create(0, '', false);
4554 4554
 }
4555 4555
 
@@ -4727,7 +4727,7 @@  discard block
 block discarded – undo
4727 4727
 			print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
4728 4728
 			print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
4729 4729
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4730
-			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";		// Date last modif
4730
+			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif
4731 4731
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4732 4732
 			print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
4733 4733
 			print '</tr>';
Please login to merge, or discard this patch.
htdocs/contrat/card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1984,9 +1984,12 @@
 block discarded – undo
1984 1984
 
1985 1985
 				$parameters = array();
1986 1986
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1987
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1988
-				if (empty($reshook))
1989
-					$object->formAddObjectLine(1, $mysoc, $soc);
1987
+				if ($reshook < 0) {
1988
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1989
+				}
1990
+				if (empty($reshook)) {
1991
+									$object->formAddObjectLine(1, $mysoc, $soc);
1992
+				}
1990 1993
 			}
1991 1994
 
1992 1995
 			print '</table>';
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php
101 101
 $permissiondellink = $user->hasRight('contrat', 'creer'); // Used by the include of actions_dellink.inc.php
102 102
 $permissiontodelete = ($user->hasRight('contrat', 'creer') && $object->statut == $object::STATUS_DRAFT) || $user->hasRight('contrat', 'supprimer');
103
-$permissiontoadd   = $user->hasRight('contrat', 'creer');     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
103
+$permissiontoadd   = $user->hasRight('contrat', 'creer'); //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
104 104
 $permissiontoedit = $permissiontoadd;
105 105
 $error = 0;
106 106
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 
143 143
 	include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
144 144
 
145
-	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php';  // Must be include, not include_once
145
+	include DOL_DOCUMENT_ROOT.'/core/actions_lineupdown.inc.php'; // Must be include, not include_once
146 146
 
147 147
 	if ($action == 'confirm_active' && $confirm == 'yes' && $user->rights->contrat->activer) {
148 148
 		$date_start = '';
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 									$lines[$i]->pa_ht,
371 371
 									$array_options,
372 372
 									$lines[$i]->fk_unit,
373
-									$num+1
373
+									$num + 1
374 374
 								);
375 375
 
376 376
 								if ($result < 0) {
@@ -520,8 +520,8 @@  discard block
 block discarded – undo
520 520
 					$result = $prodcustprice->fetchAll('', '', 0, 0, $filter);
521 521
 					if ($result) {
522 522
 						if (count($prodcustprice->lines) > 0) {
523
-							$price_min =  price($prodcustprice->lines[0]->price_min);
524
-							$price_min_ttc =  price($prodcustprice->lines[0]->price_min_ttc);
523
+							$price_min = price($prodcustprice->lines[0]->price_min);
524
+							$price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc);
525 525
 							/*$tva_tx = $prodcustprice->lines[0]->tva_tx;
526 526
 							if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) {
527 527
 								$tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')';
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
 			// update price_ht with discount
756 756
 			// TODO Use object->updateline instead objedtline->update
757 757
 
758
-			$price_ht =  price2num(GETPOST('elprice'), 'MU');
758
+			$price_ht = price2num(GETPOST('elprice'), 'MU');
759 759
 			$remise_percent = price2num(GETPOST('elremise_percent'), 2);
760 760
 			if ($remise_percent > 0) {
761 761
 				$remise = round(($price_ht * $remise_percent / 100), 2);
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
 	} elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) {
862 862
 		$date_start = dol_mktime(12, 0, 0, GETPOST('d_startmonth'), GETPOST('d_startday'), GETPOST('d_startyear'));
863 863
 		$date_end   = dol_mktime(12, 0, 0, GETPOST('d_endmonth'), GETPOST('d_endday'), GETPOST('d_endyear'));
864
-		$comment      = GETPOST('comment', 'alpha');
864
+		$comment = GETPOST('comment', 'alpha');
865 865
 		$result = $object->activateAll($user, $date_start, 0, $comment, $date_end);
866 866
 		if ($result < 0) {
867 867
 			setEventMessages($object->error, $object->errors, 'errors');
@@ -994,7 +994,7 @@  discard block
 block discarded – undo
994 994
 	include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php';
995 995
 
996 996
 	// Actions to build doc
997
-	$upload_dir = $conf->contrat->multidir_output[!empty($object->entity)?$object->entity:$conf->entity];
997
+	$upload_dir = $conf->contrat->multidir_output[!empty($object->entity) ? $object->entity : $conf->entity];
998 998
 	include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
999 999
 
1000 1000
 	// Actions to send emails
@@ -1486,7 +1486,7 @@  discard block
 block discarded – undo
1486 1486
 		}
1487 1487
 
1488 1488
 
1489
-		$arrayothercontracts = $object->getListOfContracts('others');	// array or -1 if technical error
1489
+		$arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error
1490 1490
 
1491 1491
 		/*
1492 1492
 		 * Lines of contracts
Please login to merge, or discard this patch.
htdocs/compta/paiement/rapport.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,9 @@
 block discarded – undo
118 118
 
119 119
 if ($year) {
120 120
 	if (is_dir($dir.'/'.$year)) {
121
-		if (!empty($year_dirs)) print '<br>';
121
+		if (!empty($year_dirs)) {
122
+			print '<br>';
123
+		}
122 124
 		print '<br>';
123 125
 		print '<table width="100%" class="noborder">';
124 126
 		print '<tr class="liste_titre">';
Please login to merge, or discard this patch.
htdocs/compta/facture/card-rec.php 2 patches
Braces   +7 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1623,9 +1623,13 @@
 block discarded – undo
1623 1623
 
1624 1624
 				$parameters = array();
1625 1625
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1626
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1627
-				if (empty($reshook))
1628
-					$object->formAddObjectLine(0, $mysoc, $object->thirdparty); // No date selector for template invoice
1626
+				if ($reshook < 0) {
1627
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1628
+				}
1629
+				if (empty($reshook)) {
1630
+									$object->formAddObjectLine(0, $mysoc, $object->thirdparty);
1631
+				}
1632
+				// No date selector for template invoice
1629 1633
 			}
1630 1634
 		}
1631 1635
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -779,7 +779,7 @@  discard block
 block discarded – undo
779 779
 		// Define special_code for special lines
780 780
 		$special_code = GETPOST('special_code', 'int');
781 781
 		if ($special_code == 3) {
782
-			$special_code = 0;	// Options should not exists on invoices
782
+			$special_code = 0; // Options should not exists on invoices
783 783
 		}
784 784
 
785 785
 		/*$line = new FactureLigne($db);
@@ -1626,10 +1626,10 @@  discard block
 block discarded – undo
1626 1626
 
1627 1627
 		// Lines
1628 1628
 		print '<form name="addproduct" id="addproduct" action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.(($action != 'editline') ? '#add' : '#line_'.GETPOST('lineid', 'int')).'" method="POST">';
1629
-		print '<input type="hidden" name="token" value="' . newToken().'">';
1630
-		print '<input type="hidden" name="action" value="' . (($action != 'editline') ? 'addline' : 'updateline').'">';
1629
+		print '<input type="hidden" name="token" value="'.newToken().'">';
1630
+		print '<input type="hidden" name="action" value="'.(($action != 'editline') ? 'addline' : 'updateline').'">';
1631 1631
 		print '<input type="hidden" name="mode" value="">';
1632
-		print '<input type="hidden" name="id" value="' . $object->id.'">';
1632
+		print '<input type="hidden" name="id" value="'.$object->id.'">';
1633 1633
 		print '<input type="hidden" name="page_y" value="">';
1634 1634
 
1635 1635
 		if (!empty($conf->use_javascript_ajax) && $object->statut == 0) {
@@ -1681,16 +1681,16 @@  discard block
 block discarded – undo
1681 1681
 			if (empty($object->suspended)) {
1682 1682
 				if ($user->hasRight('facture', 'creer')) {
1683 1683
 					if (!empty($object->frequency) && $object->nb_gen_max > 0 && ($object->nb_gen_done >= $object->nb_gen_max)) {
1684
-						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("MaxGenerationReached")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1684
+						print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("MaxGenerationReached")).'">'.$langs->trans("CreateBill").'</a></div>';
1685 1685
 					} else {
1686 1686
 						if (empty($object->frequency) || $object->date_when <= $nowlasthour) {
1687
-							print '<div class="inline-block divButAction"><a class="butAction" href="' . DOL_URL_ROOT . '/compta/facture/card.php?action=create&socid=' . $object->thirdparty->id . '&fac_rec=' . $object->id . '">' . $langs->trans("CreateBill") . '</a></div>';
1687
+							print '<div class="inline-block divButAction"><a class="butAction" href="'.DOL_URL_ROOT.'/compta/facture/card.php?action=create&socid='.$object->thirdparty->id.'&fac_rec='.$object->id.'">'.$langs->trans("CreateBill").'</a></div>';
1688 1688
 						} else {
1689
-							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="' . dol_escape_htmltag($langs->trans("DateIsNotEnough")) . '">' . $langs->trans("CreateBill") . '</a></div>';
1689
+							print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans("DateIsNotEnough")).'">'.$langs->trans("CreateBill").'</a></div>';
1690 1690
 						}
1691 1691
 					}
1692 1692
 				} else {
1693
-					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">' . $langs->trans("CreateBill") . '</a></div>';
1693
+					print '<div class="inline-block divButAction"><a class="butActionRefused classfortooltip" href="#">'.$langs->trans("CreateBill").'</a></div>';
1694 1694
 				}
1695 1695
 			}
1696 1696
 
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
 			}
1704 1704
 
1705 1705
 			// Delete
1706
-			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&action=delete&token=' . newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1706
+			print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->hasRight('facture', 'supprimer'));
1707 1707
 		}
1708 1708
 		print '</div>';
1709 1709
 
Please login to merge, or discard this patch.
htdocs/supplier_proposal/card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1776,9 +1776,12 @@
 block discarded – undo
1776 1776
 
1777 1777
 			$parameters = array();
1778 1778
 			$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
1779
-			if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1780
-			if (empty($reshook))
1781
-				$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1779
+			if ($reshook < 0) {
1780
+				setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
1781
+			}
1782
+			if (empty($reshook)) {
1783
+							$object->formAddObjectLine($dateSelector, $soc, $mysoc);
1784
+			}
1782 1785
 		}
1783 1786
 	}
1784 1787
 
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
 			$idprod = GETPOST('idprod', 'int');
600 600
 		}
601 601
 
602
-		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0);		// Can be '1.2' or '1.2 (CODE)'
602
+		$tva_tx = (GETPOST('tva_tx') ? GETPOST('tva_tx') : 0); // Can be '1.2' or '1.2 (CODE)'
603 603
 
604 604
 		$price_ht = price2num(GETPOST('price_ht'), 'MU', 2);
605 605
 		$price_ht_devise = price2num(GETPOST('multicurrency_price_ht'), 'CU', 2);
@@ -708,7 +708,7 @@  discard block
 block discarded – undo
708 708
 
709 709
 					//If text set in desc is the same as product descpription (as now it's preloaded) whe add it only one time
710 710
 					if (trim($product_desc) == trim($desc) && !empty($conf->global->PRODUIT_AUTOFILL_DESC)) {
711
-						$product_desc='';
711
+						$product_desc = '';
712 712
 					}
713 713
 
714 714
 					if (!empty($product_desc) && !empty($conf->global->MAIN_NO_CONCAT_DESCRIPTION)) {
@@ -1820,40 +1820,40 @@  discard block
 block discarded – undo
1820 1820
 
1821 1821
 	print '<tr>';
1822 1822
 	// Amount HT
1823
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountHT') . '</td>';
1824
-	print '<td class="nowrap amountcard right">' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1823
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountHT').'</td>';
1824
+	print '<td class="nowrap amountcard right">'.price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1825 1825
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1826 1826
 		// Multicurrency Amount HT
1827
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1827
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1828 1828
 	}
1829 1829
 	print '</tr>';
1830 1830
 
1831 1831
 	print '<tr>';
1832 1832
 	// Amount VAT
1833
-	print '<td class="titlefieldmiddle">' . $langs->trans('AmountVAT') . '</td>';
1834
-	print '<td class="nowrap amountcard right">' . price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1833
+	print '<td class="titlefieldmiddle">'.$langs->trans('AmountVAT').'</td>';
1834
+	print '<td class="nowrap amountcard right">'.price($object->total_tva, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1835 1835
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1836 1836
 		// Multicurrency Amount VAT
1837
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1837
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1838 1838
 	}
1839 1839
 	print '</tr>';
1840 1840
 
1841 1841
 	// Amount Local Taxes
1842 1842
 	if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) {
1843 1843
 		print '<tr>';
1844
-		print '<td class="titlefieldmiddle">' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '</td>';
1845
-		print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1844
+		print '<td class="titlefieldmiddle">'.$langs->transcountry("AmountLT1", $mysoc->country_code).'</td>';
1845
+		print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1846 1846
 		if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1847
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1847
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax1, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1848 1848
 		}
1849 1849
 		print '</tr>';
1850 1850
 
1851 1851
 		if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) {
1852 1852
 			print '<tr>';
1853
-			print '<td>' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '</td>';
1854
-			print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1853
+			print '<td>'.$langs->transcountry("AmountLT2", $mysoc->country_code).'</td>';
1854
+			print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1855 1855
 			if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1856
-				print '<td class="nowrap amountcard right">' . price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1856
+				print '<td class="nowrap amountcard right">'.price($object->total_localtax2, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1857 1857
 			}
1858 1858
 			print '</tr>';
1859 1859
 		}
@@ -1861,11 +1861,11 @@  discard block
 block discarded – undo
1861 1861
 
1862 1862
 	print '<tr>';
1863 1863
 	// Amount TTC
1864
-	print '<td>' . $langs->trans('AmountTTC') . '</td>';
1865
-	print '<td class="nowrap amountcard right">' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . '</td>';
1864
+	print '<td>'.$langs->trans('AmountTTC').'</td>';
1865
+	print '<td class="nowrap amountcard right">'.price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency).'</td>';
1866 1866
 	if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) {
1867 1867
 		// Multicurrency Amount TTC
1868
-		print '<td class="nowrap amountcard right">' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . '</td>';
1868
+		print '<td class="nowrap amountcard right">'.price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code).'</td>';
1869 1869
 	}
1870 1870
 	print '</tr>';
1871 1871
 
Please login to merge, or discard this patch.
htdocs/modulebuilder/template/myobject_card.php 2 patches
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -598,9 +598,12 @@
 block discarded – undo
598 598
 
599 599
 				$parameters = array();
600 600
 				$reshook = $hookmanager->executeHooks('formAddObjectLine', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
601
-				if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
602
-				if (empty($reshook))
603
-					$object->formAddObjectLine(1, $mysoc, $soc);
601
+				if ($reshook < 0) {
602
+					setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
603
+				}
604
+				if (empty($reshook)) {
605
+									$object->formAddObjectLine(1, $mysoc, $soc);
606
+				}
604 607
 			}
605 608
 		}
606 609
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -85,14 +85,14 @@  discard block
 block discarded – undo
85 85
 // Get parameters
86 86
 $id = GETPOST('id', 'int');
87 87
 $ref = GETPOST('ref', 'alpha');
88
-$lineid   = GETPOST('lineid', 'int');
88
+$lineid = GETPOST('lineid', 'int');
89 89
 
90 90
 $action = GETPOST('action', 'aZ09');
91 91
 $confirm = GETPOST('confirm', 'alpha');
92 92
 $cancel = GETPOST('cancel', 'aZ09');
93 93
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)).basename(__FILE__, '.php')); // To manage different context of search
94
-$backtopage = GETPOST('backtopage', 'alpha');					// if not set, a default page will be used
95
-$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');	// if not set, $backtopage will be used
94
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
95
+$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
96 96
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
97 97
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
98 98
 
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
 
544 544
 			// Clone
545 545
 			if ($permissiontoadd) {
546
-				print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid)?'&socid='.$object->socid:'').'&action=clone&token='.newToken(), '', $permissiontoadd);
546
+				print dolGetButtonAction('', $langs->trans('ToClone'), 'default', $_SERVER['PHP_SELF'].'?id='.$object->id.(!empty($object->socid) ? '&socid='.$object->socid : '').'&action=clone&token='.newToken(), '', $permissiontoadd);
547 547
 			}
548 548
 
549 549
 			/*
Please login to merge, or discard this patch.
htdocs/core/modules/facture/doc/pdf_crabe.modules.php 2 patches
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1615,7 +1615,9 @@
 block discarded – undo
1615 1615
 		global $conf, $langs;
1616 1616
 
1617 1617
 		$ltrdirection = 'L';
1618
-		if ($outputlangs->trans("DIRECTION") == 'rtl') $ltrdirection = 'R';
1618
+		if ($outputlangs->trans("DIRECTION") == 'rtl') {
1619
+			$ltrdirection = 'R';
1620
+		}
1619 1621
 
1620 1622
 		// Load traductions files required by page
1621 1623
 		$outputlangs->loadLangs(array("main", "bills", "propal", "companies"));
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
 				// $pdf->GetY() here can't be used. It is bottom of the second addresse box but first one may be higher
442 442
 
443 443
 				// $tab_top is y where we must continue content (90 = 42 + 48: 42 is height of logo and ref, 48 is address blocks)
444
-				$tab_top = 90 + $top_shift;		// top_shift is an addition for linked objects or addons (0 in most cases)
444
+				$tab_top = 90 + $top_shift; // top_shift is an addition for linked objects or addons (0 in most cases)
445 445
 				$tab_top_newpage = (!getDolGlobalInt('MAIN_PDF_DONOTREPEAT_HEAD') ? 42 + $top_shift : 10);
446 446
 
447 447
 				// You can add more thing under header here, if you increase $extra_under_address_shift too.
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
 					if (!isset($this->tva[$vatrate])) {
771 771
 						$this->tva[$vatrate] = 0;
772 772
 					}
773
-					$this->tva[$vatrate] += $tvaligne;	// ->tva is abandonned, we use now ->tva_array that is more complete
773
+					$this->tva[$vatrate] += $tvaligne; // ->tva is abandonned, we use now ->tva_array that is more complete
774 774
 					$vatcode = $object->lines[$i]->vat_src_code;
775 775
 					if (empty($this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'])) {
776 776
 						$this->tva_array[$vatrate.($vatcode ? ' ('.$vatcode.')' : '')]['amount'] = 0;
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
 		}
1130 1130
 
1131 1131
 		$posxval = 52;
1132
-		$posxend = 110;	// End of x for text on left side
1132
+		$posxend = 110; // End of x for text on left side
1133 1133
 		if ($this->page_largeur < 210) { // To work with US executive format
1134 1134
 			$posxend -= 10;
1135 1135
 		}
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 			$lib_condition_paiement = str_replace('\n', "\n", $lib_condition_paiement);
1148 1148
 			$pdf->MultiCell(67, 4, $lib_condition_paiement, 0, 'L');
1149 1149
 
1150
-			$posy = $pdf->GetY() + 3;	// We need spaces for 2 lines payment conditions
1150
+			$posy = $pdf->GetY() + 3; // We need spaces for 2 lines payment conditions
1151 1151
 		}
1152 1152
 
1153 1153
 		// Show category of operations
@@ -1159,7 +1159,7 @@  discard block
 block discarded – undo
1159 1159
 
1160 1160
 			$pdf->SetFont('', '', $default_font_size - 2);
1161 1161
 			$pdf->SetXY($posxval, $posy);
1162
-			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1162
+			$categoryOfOperationLabel = $outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1163 1163
 			$pdf->MultiCell($posxend - $posxval, 4, $categoryOfOperationLabel, 0, 'L');
1164 1164
 
1165 1165
 			$posy = $pdf->GetY() + 3; // for 2 lines
@@ -1203,7 +1203,7 @@  discard block
 block discarded – undo
1203 1203
 					require_once DOL_DOCUMENT_ROOT.'/societe/class/companybankaccount.class.php';
1204 1204
 					$bac = new CompanyBankAccount($this->db);
1205 1205
 					$bac->fetch(0, $object->thirdparty->id);
1206
-					$iban= $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1206
+					$iban = $bac->iban.(($bac->iban && $bac->bic) ? ' / ' : '').$bac->bic;
1207 1207
 					$lib_mode_reg .= ' '.$outputlangs->trans("PaymentTypePREdetails", dol_trunc($iban, 6, 'right', 'UTF-8', 1));
1208 1208
 				}
1209 1209
 				$pdf->MultiCell(80, 5, $lib_mode_reg, 0, 'L');
@@ -1681,7 +1681,7 @@  discard block
 block discarded – undo
1681 1681
 		if (empty($hidetop)) {
1682 1682
 			// Show category of operations
1683 1683
 			if (getDolGlobalInt('INVOICE_CATEGORY_OF_OPERATION') == 1 && $this->categoryOfOperation >= 0) {
1684
-				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations") . ' : ' . $outputlangs->transnoentities("MentionCategoryOfOperations" . $this->categoryOfOperation);
1684
+				$categoryOfOperations = $outputlangs->transnoentities("MentionCategoryOfOperations").' : '.$outputlangs->transnoentities("MentionCategoryOfOperations".$this->categoryOfOperation);
1685 1685
 				$pdf->SetXY($this->marge_gauche, $tab_top - 4);
1686 1686
 				$pdf->MultiCell(($pdf->GetStringWidth($categoryOfOperations)) + 4, 2, $categoryOfOperations);
1687 1687
 			}
@@ -1848,7 +1848,7 @@  discard block
 block discarded – undo
1848 1848
 		}
1849 1849
 		if ($this->situationinvoice) {
1850 1850
 			$langs->loadLangs(array("other"));
1851
-			$title = $outputlangs->transnoentities("PDFInvoiceSituation") . " " . $outputlangs->transnoentities("NumberingShort") . $object->situation_counter . " -";
1851
+			$title = $outputlangs->transnoentities("PDFInvoiceSituation")." ".$outputlangs->transnoentities("NumberingShort").$object->situation_counter." -";
1852 1852
 		}
1853 1853
 		if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && is_object($outputlangsbis)) {
1854 1854
 			$title .= ' - ';
@@ -2074,7 +2074,7 @@  discard block
 block discarded – undo
2074 2074
 
2075 2075
 			$carac_client_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
2076 2076
 
2077
-			$mode =  'target';
2077
+			$mode = 'target';
2078 2078
 			$carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, ($usecontact ? $object->contact : ''), $usecontact, $mode, $object);
2079 2079
 
2080 2080
 			// Show recipient
@@ -2118,11 +2118,11 @@  discard block
 block discarded – undo
2118 2118
 					$contactshipping = $object->fetch_Contact($idaddressshipping[0]);
2119 2119
 					$companystatic = new Societe($this->db);
2120 2120
 					$companystatic->fetch($object->contact->fk_soc);
2121
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->contact, $outputlangs);
2121
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->contact, $outputlangs);
2122 2122
 					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $companystatic, $object->contact, $usecontact, 'target', $object);
2123 2123
 				} else {
2124
-					$carac_client_name_shipping=pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2125
-					$carac_client_shipping=pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2124
+					$carac_client_name_shipping = pdfBuildThirdpartyName($object->thirdparty, $outputlangs);
2125
+					$carac_client_shipping = pdf_build_address($outputlangs, $this->emetteur, $object->thirdparty, '', 0, 'target', $object);
2126 2126
 				}
2127 2127
 				if (!empty($carac_client_shipping)) {
2128 2128
 					$posy += $hautcadre;
@@ -2141,7 +2141,7 @@  discard block
 block discarded – undo
2141 2141
 					$posy = $pdf->getY();
2142 2142
 
2143 2143
 					// Show shipping information
2144
-					$pdf->SetXY($posx+2, $posy);
2144
+					$pdf->SetXY($posx + 2, $posy);
2145 2145
 					$pdf->SetFont('', '', $default_font_size - 1);
2146 2146
 					$pdf->MultiCell($widthrecbox - 2, 2, $carac_client_shipping, '', 'L');
2147 2147
 					$top_shift += $hautcadre;
Please login to merge, or discard this patch.