Completed
Branch develop (758ccb)
by
unknown
17:59
created
htdocs/expensereport/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 	}
96 96
 }
97 97
 
98
-$permissiontoadd = $user->hasRight('expensereport', 'creer');	// Used by the include of actions_dellink.inc.php
98
+$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php
99 99
 
100 100
 
101 101
 /*
Please login to merge, or discard this patch.
htdocs/public/webportal/webportal.main.inc.php 1 patch
Spacing   +15 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,15 +24,14 @@  discard block
 block discarded – undo
24 24
 			   $dolibarr_main_cookie_cryptkey; // This is loaded by filefunc.inc.php
25 25
 
26 26
 		$tmp_instance_unique_id = empty($dolibarr_main_instance_unique_id) ?
27
-			(empty($dolibarr_main_cookie_cryptkey) ? '' :
28
-				$dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id;
27
+			(empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id;
29 28
 		// Unique id of instance
30 29
 
31 30
 		// The recommended value (may be not defined for old versions)
32 31
 		if (!empty($tmp_instance_unique_id)) {
33
-			return sha1('webportal' . $tmp_instance_unique_id);
32
+			return sha1('webportal'.$tmp_instance_unique_id);
34 33
 		} else {
35
-			return sha1('webportal' . $_SERVER['SERVER_NAME'].$_SERVER['DOCUMENT_ROOT'].DOL_DOCUMENT_ROOT);
34
+			return sha1('webportal'.$_SERVER['SERVER_NAME'].$_SERVER['DOCUMENT_ROOT'].DOL_DOCUMENT_ROOT);
36 35
 		}
37 36
 	}
38 37
 }
@@ -40,14 +39,14 @@  discard block
 block discarded – undo
40 39
 
41 40
 // Change this following line to use the correct relative path (../, ../../, etc)
42 41
 $res = 0;
43
-if (!$res && file_exists('../../main.inc.php')) $res = @include '../../main.inc.php';                // to work if your module directory is into dolibarr root htdocs directory
44
-if (!$res && file_exists('../../../main.inc.php')) $res = @include '../../../main.inc.php';            // to work if your module directory is into a subdir of root htdocs directory
45
-if (!$res && file_exists('../../../../main.inc.php')) $res = @include '../../../../main.inc.php';            // to work if your module directory is into a subdir of root htdocs directory
46
-if (!$res && file_exists('../../../../../main.inc.php')) $res = @include '../../../../../main.inc.php';            // to work if your module directory is into a subdir of root htdocs directory
47
-if (!$res && file_exists('../../../../../../main.inc.php')) $res = @include '../../../../../../main.inc.php';            // to work if your module directory is into a subdir of root htdocs directory
42
+if (!$res && file_exists('../../main.inc.php')) $res = @include '../../main.inc.php'; // to work if your module directory is into dolibarr root htdocs directory
43
+if (!$res && file_exists('../../../main.inc.php')) $res = @include '../../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
44
+if (!$res && file_exists('../../../../main.inc.php')) $res = @include '../../../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
45
+if (!$res && file_exists('../../../../../main.inc.php')) $res = @include '../../../../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
46
+if (!$res && file_exists('../../../../../../main.inc.php')) $res = @include '../../../../../../main.inc.php'; // to work if your module directory is into a subdir of root htdocs directory
48 47
 if (!$res) die('Include of main fails');
49
-require_once DOL_DOCUMENT_ROOT . '/user/class/user.class.php';
50
-require_once DOL_DOCUMENT_ROOT . '/societe/class/societeaccount.class.php';
48
+require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
49
+require_once DOL_DOCUMENT_ROOT.'/societe/class/societeaccount.class.php';
51 50
 dol_include_once('/public/webportal/lib/webportal.lib.php');
52 51
 dol_include_once('/webportal/class/context.class.php');
53 52
 dol_include_once('/webportal/class/webportalmember.class.php');
@@ -57,9 +56,9 @@  discard block
 block discarded – undo
57 56
 // Must be done after the include of filefunc.inc.php so global variables of conf file are defined (like $dolibarr_main_instance_unique_id or $dolibarr_main_force_https).
58 57
 // Note: the function dol_getprefix is defined into functions.lib.php but may have been defined to return a different key to manage another area to protect.
59 58
 $prefix = dol_getprefix('');
60
-$sessionname = 'WEBPORTAL_SESSID_' . $prefix;
61
-$sessiontimeout = 'WEBPORTAL_SESSTIMEOUT_' . $prefix;
62
-if (!empty($_COOKIE[$sessiontimeout]) && session_status()===PHP_SESSION_NONE) {
59
+$sessionname = 'WEBPORTAL_SESSID_'.$prefix;
60
+$sessiontimeout = 'WEBPORTAL_SESSTIMEOUT_'.$prefix;
61
+if (!empty($_COOKIE[$sessiontimeout]) && session_status() === PHP_SESSION_NONE) {
63 62
 	ini_set('session.gc_maxlifetime', $_COOKIE[$sessiontimeout]);
64 63
 }
65 64
 
@@ -77,7 +76,7 @@  discard block
 block discarded – undo
77 76
 
78 77
 if (!defined('WEBPORTAL_NOREQUIRETRAN') || (!defined('WEBPORTAL_NOLOGIN') && !empty($context->controllerInstance->accessNeedLoggedUser))) {
79 78
 	if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages.
80
-		include_once DOL_DOCUMENT_ROOT . '/core/class/translate.class.php';
79
+		include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
81 80
 		$langs = new Translate("", $conf);
82 81
 		$langcode = (GETPOST('lang', 'aZ09', 1) ? GETPOST('lang', 'aZ09', 1) : (empty($logged_user->conf->MAIN_LANG_DEFAULT) ? (!getDolGlobalString('MAIN_LANG_DEFAULT') ? 'auto' : $conf->global->MAIN_LANG_DEFAULT) : $logged_user->conf->MAIN_LANG_DEFAULT));
83 82
 		if (defined('MAIN_LANG_DEFAULT')) {
@@ -223,7 +222,7 @@  discard block
 block discarded – undo
223 222
 					if (!$error) {
224 223
 						if ($logged_thirdparty->default_lang != $langs->defaultlang && !defined('WEBPORTAL_NOREQUIRETRAN')) {
225 224
 							if (!is_object($langs)) { // This can occurs when calling page with NOREQUIRETRAN defined, however we need langs for error messages.
226
-								include_once DOL_DOCUMENT_ROOT . '/core/class/translate.class.php';
225
+								include_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
227 226
 								$langs = new Translate("", $conf);
228 227
 								$langs->setDefaultLang($logged_thirdparty->default_lang);
229 228
 							}
Please login to merge, or discard this patch.
htdocs/public/webportal/tpl/menu.tpl.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 	$navUserMenu['user_logout'] = array(
82 82
 		'id' => 'user_logout',
83 83
 		'rank' => 99999,
84
-		'url' => $context->getControllerUrl() . 'logout.php',
84
+		'url' => $context->getControllerUrl().'logout.php',
85 85
 		'name' => $langs->trans('Logout'),
86 86
 	);
87 87
 }
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 	'maxTopMenu' => & $maxTopMenu
112 112
 );
113 113
 
114
-$reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action);    // Note that $action and $object may have been modified by hook
114
+$reshook = $hookmanager->executeHooks('PrintTopMenu', $parameters, $context, $context->action); // Note that $action and $object may have been modified by hook
115 115
 if ($reshook < 0) $context->setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
116 116
 
117 117
 if (empty($reshook)) {
@@ -170,9 +170,9 @@  discard block
 block discarded – undo
170 170
 		$brandTitle = getDolGlobalString('WEBPORTAL_TITLE') ? getDolGlobalString('WEBPORTAL_TITLE') : getDolGlobalString('MAIN_INFO_SOCIETE_NOM');
171 171
 		print '<a class="brand__logo-link"  href="'.$context->getControllerUrl().'" >';
172 172
 		if (!empty($context->theme->menuLogoUrl)) {
173
-			print '<img class="brand__logo-img" src="' . dol_escape_htmltag($context->theme->menuLogoUrl) . '" alt="' . dol_escape_htmltag($brandTitle) . '" >';
173
+			print '<img class="brand__logo-img" src="'.dol_escape_htmltag($context->theme->menuLogoUrl).'" alt="'.dol_escape_htmltag($brandTitle).'" >';
174 174
 		} else {
175
-			print '<span class="brand__name">' . $brandTitle . '</span>';
175
+			print '<span class="brand__name">'.$brandTitle.'</span>';
176 176
 		}
177 177
 		print '</a>';
178 178
 		?>
Please login to merge, or discard this patch.
htdocs/product/class/api_products.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 		$sql = "SELECT t.rowid, t.ref, t.ref_ext";
192 192
 		$sql .= " FROM ".$this->db->prefix()."product as t";
193
-		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields AS ef ON ef.fk_object = t.rowid";	// So we will be able to filter on extrafields
193
+		$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields
194 194
 		if ($category > 0) {
195 195
 			$sql .= ", ".$this->db->prefix()."categorie_product as c";
196 196
 		}
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 		}
231 231
 
232 232
 		//this query will return total products with the filters given
233
-		$sqlTotals =  str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
233
+		$sqlTotals = str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
234 234
 
235 235
 		$sql .= $this->db->order($sortfield, $sortorder);
236 236
 		if ($limit) {
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 			$obj_ret['pagination'] = array(
291 291
 				'total' => (int) $total,
292 292
 				'page' => $page, //count starts from 0
293
-				'page_count' => ceil((int) $total/$limit),
293
+				'page_count' => ceil((int) $total / $limit),
294 294
 				'limit' => $limit
295 295
 			);
296 296
 		}
@@ -1999,7 +1999,7 @@  discard block
 block discarded – undo
1999 1999
 		unset($object->fk_bank);
2000 2000
 		unset($object->fk_account);
2001 2001
 
2002
-		unset($object->supplierprices);	// Must use another API to get them
2002
+		unset($object->supplierprices); // Must use another API to get them
2003 2003
 
2004 2004
 		if (!DolibarrApiAccess::$user->hasRight('stock', 'lire')) {
2005 2005
 			unset($object->stock_reel);
Please login to merge, or discard this patch.
htdocs/reception/class/api_receptions.class.php 1 patch
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 	public $reception;
44 44
 
45 45
 	/**
46
-		* Constructor
46
+	 * Constructor
47 47
 	 */
48 48
 	public function __construct()
49 49
 	{
@@ -621,15 +621,15 @@  discard block
 block discarded – undo
621 621
 	*/
622 622
 
623 623
 	/**
624
-	* Close a reception (Classify it as "Delivered")
625
-	*
626
-	* @param	int     $id             Reception ID
627
-	* @param	int     $notrigger      Disabled triggers
628
-	*
629
-	* @url POST    {id}/close
630
-	*
631
-	* @return  Object
632
-	*/
624
+	 * Close a reception (Classify it as "Delivered")
625
+	 *
626
+	 * @param	int     $id             Reception ID
627
+	 * @param	int     $notrigger      Disabled triggers
628
+	 *
629
+	 * @url POST    {id}/close
630
+	 *
631
+	 * @return  Object
632
+	 */
633 633
 	public function close($id, $notrigger = 0)
634 634
 	{
635 635
 		if (!DolibarrApiAccess::$user->hasRight('reception', 'creer')) {
Please login to merge, or discard this patch.
htdocs/website/index.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
 }
349 349
 
350 350
 $usercanedit = $user->hasRight('website', 'write');
351
-$permissiontoadd = $user->hasRight('website', 'write');	// Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
351
+$permissiontoadd = $user->hasRight('website', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_linkedfiles
352 352
 $permissiontodelete = $user->hasRight('website', 'delete');
353 353
 
354 354
 
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 if ($sortorder) {
416 416
 	$backtopage .= '&sortorder='.urlencode($sortorder);
417 417
 }
418
-include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';	// This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
418
+include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php'; // This manage 'sendit', 'confirm_deletefile', 'renamefile' action when submitting new file.
419 419
 
420 420
 $backtopage = $savbacktopage;
421 421
 //var_dump($backtopage);
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
 					$error++;
1529 1529
 					setEventMessages($langs->trans('ErrorFaviconMustBeASquaredImage'), array(), 'errors');
1530 1530
 				}
1531
-				if (! $error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1531
+				if (!$error && ($filesize[0] != 16 && $filesize[0] != 32 && $filesize[0] != 64)) {
1532 1532
 					$error++;
1533 1533
 					setEventMessages($langs->trans('ErrorFaviconSize'), array(), 'errors');
1534 1534
 				}
@@ -1540,7 +1540,7 @@  discard block
 block discarded – undo
1540 1540
 				if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1541 1541
 					$action = 'preview';
1542 1542
 					if ($backtopage) {
1543
-						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1543
+						$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1544 1544
 						header("Location: ".$backtopage);
1545 1545
 						exit;
1546 1546
 					}
@@ -1573,7 +1573,7 @@  discard block
 block discarded – undo
1573 1573
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1574 1574
 
1575 1575
 			// Security analysis
1576
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1576
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1577 1577
 
1578 1578
 			if (!$errorphpcheck) {
1579 1579
 				$htmlheadercontent = '';
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1612 1612
 
1613 1613
 			// Security analysis
1614
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1614
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1615 1615
 
1616 1616
 			if (!$errorphpcheck) {
1617 1617
 				$csscontent = '';
@@ -1654,7 +1654,7 @@  discard block
 block discarded – undo
1654 1654
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1655 1655
 
1656 1656
 			// Security analysis
1657
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1657
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1658 1658
 
1659 1659
 			if (!$errorphpcheck) {
1660 1660
 				$jscontent = '';
@@ -1692,7 +1692,7 @@  discard block
 block discarded – undo
1692 1692
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1693 1693
 
1694 1694
 			// Security analysis
1695
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1695
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1696 1696
 
1697 1697
 			if (!$errorphpcheck) {
1698 1698
 				$robotcontent = '';
@@ -1730,7 +1730,7 @@  discard block
 block discarded – undo
1730 1730
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1731 1731
 
1732 1732
 			// Security analysis
1733
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1733
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1734 1734
 
1735 1735
 			if (!$errorphpcheck) {
1736 1736
 				$htaccesscontent = '';
@@ -1754,7 +1754,7 @@  discard block
 block discarded – undo
1754 1754
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1755 1755
 
1756 1756
 			// Security analysis
1757
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1757
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1758 1758
 
1759 1759
 			if (!$errorphpcheck) {
1760 1760
 				$manifestjsoncontent = '';
@@ -1792,7 +1792,7 @@  discard block
 block discarded – undo
1792 1792
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1793 1793
 
1794 1794
 			// Security analysis
1795
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1795
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1796 1796
 
1797 1797
 			if (!$errorphpcheck) {
1798 1798
 				$readmecontent = '';
@@ -1830,7 +1830,7 @@  discard block
 block discarded – undo
1830 1830
 			$phpfullcodestring = dolKeepOnlyPhpCode($dataposted);
1831 1831
 
1832 1832
 			// Security analysis
1833
-			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring);	// Contains the setEventMessages
1833
+			$errorphpcheck = checkPHPCode($phpfullcodestringold, $phpfullcodestring); // Contains the setEventMessages
1834 1834
 
1835 1835
 			if (!$errorphpcheck) {
1836 1836
 				$licensecontent = '';
@@ -1872,7 +1872,7 @@  discard block
 block discarded – undo
1872 1872
 			if (!GETPOSTISSET('updateandstay')) {	// If we click on "Save And Stay", we don not make the redirect
1873 1873
 				$action = 'preview';
1874 1874
 				if ($backtopage) {
1875
-					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage);	// Clean backtopage url
1875
+					$backtopage = preg_replace('/searchstring=[^&]*/', '', $backtopage); // Clean backtopage url
1876 1876
 					header("Location: ".$backtopage);
1877 1877
 					exit;
1878 1878
 				}
@@ -1891,7 +1891,7 @@  discard block
 block discarded – undo
1891 1891
 
1892 1892
 	$object->fk_default_home = $pageid;
1893 1893
 	$res = $object->update($user);
1894
-	if (! ($res > 0)) {
1894
+	if (!($res > 0)) {
1895 1895
 		$error++;
1896 1896
 		setEventMessages($object->error, $object->errors, 'errors');
1897 1897
 	}
@@ -2282,7 +2282,7 @@  discard block
 block discarded – undo
2282 2282
 
2283 2283
 			$phpfullcodestringold = dolKeepOnlyPhpCode($objectpage->content);
2284 2284
 
2285
-			$objectpage->content = GETPOST('PAGE_CONTENT', 'none');	// any HTML content allowed
2285
+			$objectpage->content = GETPOST('PAGE_CONTENT', 'none'); // any HTML content allowed
2286 2286
 
2287 2287
 			$phpfullcodestring = dolKeepOnlyPhpCode($objectpage->content);
2288 2288
 
@@ -2487,7 +2487,7 @@  discard block
 block discarded – undo
2487 2487
 				$fileofzip = '';
2488 2488
 				if (GETPOSTISSET('templateuserfile')) {
2489 2489
 					// Case we selected one template
2490
-					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha');	// $fileofzip will be sanitized later into the importWebSite()
2490
+					$fileofzip = DOL_DATA_ROOT.'/doctemplates/websites/'.GETPOST('templateuserfile', 'alpha'); // $fileofzip will be sanitized later into the importWebSite()
2491 2491
 				} elseif (!empty($_FILES) && is_array($_FILES['userfile'])) {
2492 2492
 					// Case we upload a new template
2493 2493
 					if (is_array($_FILES['userfile']['tmp_name'])) {
@@ -2569,7 +2569,7 @@  discard block
 block discarded – undo
2569 2569
 	if ($website->virtualhost) {
2570 2570
 		$domainname = $website->virtualhost;
2571 2571
 	}
2572
-	if (! preg_match('/^http/i', $domainname)) {
2572
+	if (!preg_match('/^http/i', $domainname)) {
2573 2573
 		$domainname = 'https://'.$domainname;
2574 2574
 	}
2575 2575
 
@@ -2635,7 +2635,7 @@  discard block
 block discarded – undo
2635 2635
 				$url->appendChild($lastmod);
2636 2636
 				// Add suggested frequency for refresh
2637 2637
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2638
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2638
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2639 2639
 					$url->appendChild($changefreq);
2640 2640
 				}
2641 2641
 				// Add higher priority for home page
@@ -2740,7 +2740,7 @@  discard block
 block discarded – undo
2740 2740
 				$url->appendChild($lastmod);
2741 2741
 				// Add suggested frequency for refresh
2742 2742
 				if (getDolGlobalString('WEBSITE_SITEMAPS_ADD_WEEKLY_FREQ')) {
2743
-					$changefreq = $domtree->createElement('changefreq', 'weekly');	// TODO Manage other values
2743
+					$changefreq = $domtree->createElement('changefreq', 'weekly'); // TODO Manage other values
2744 2744
 					$url->appendChild($changefreq);
2745 2745
 				}
2746 2746
 
@@ -3335,7 +3335,7 @@  discard block
 block discarded – undo
3335 3335
 						$formquestion[] = array('type' => 'checkbox', 'tdclass'=>'maxwidth200', 'name' => 'is_a_translation', 'label' => $langs->trans("PageIsANewTranslation"), 'value' => 0, 'morecss'=>'margintoponly');
3336 3336
 					}
3337 3337
 
3338
-					$value= $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3338
+					$value = $formadmin->select_language($preselectedlanguage, 'newlang', 0, null, $textifempty, 0, 0, 'minwidth200', 1, 0, 0, $onlylang, 1);
3339 3339
 					$formquestion[] = array('type' => 'other', 'name' => 'newlang', 'label' => $form->textwithpicto($langs->trans("Language"), $langs->trans("DefineListOfAltLanguagesInWebsiteProperties")), 'value' => $value);
3340 3340
 
3341 3341
 					$formconfirm = $form->formconfirm($_SERVER["PHP_SELF"].'?website='.$object->ref.'&pageid='.$pageid, $langs->trans('ClonePage'), '', 'confirm_createpagefromclone', $formquestion, 0, 1, 300, 550);
@@ -3363,7 +3363,7 @@  discard block
 block discarded – undo
3363 3363
 				print '<!-- button EditInLine and ShowSubcontainers -->'."\n";
3364 3364
 				print '<div class="websiteselectionsection inline-block">';
3365 3365
 
3366
-				print '<div class="inline-block marginrightonly">';	// Button includes dynamic content
3366
+				print '<div class="inline-block marginrightonly">'; // Button includes dynamic content
3367 3367
 				print $langs->trans("ShowSubcontainers");
3368 3368
 				if (!getDolGlobalString('WEBSITE_SUBCONTAINERSINLINE')) {
3369 3369
 					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>';
@@ -3372,7 +3372,7 @@  discard block
 block discarded – undo
3372 3372
 				}
3373 3373
 				print '</div>';
3374 3374
 
3375
-				print '<div class="inline-block marginrightonly">';	// Button edit inline
3375
+				print '<div class="inline-block marginrightonly">'; // Button edit inline
3376 3376
 
3377 3377
 				print '<span id="switchckeditorinline">'."\n";
3378 3378
 				// Enable CKEditor inline with js on section and div with conteneditable=true
@@ -3490,7 +3490,7 @@  discard block
 block discarded – undo
3490 3490
 				} else {
3491 3491
 					$disabled = '';
3492 3492
 					$title = '';
3493
-					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref);	// action=delete for webpage, deletesite for website
3493
+					$url = $_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&pageid='.((int) $websitepage->id).'&website='.urlencode($website->ref); // action=delete for webpage, deletesite for website
3494 3494
 				}
3495 3495
 				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>';
3496 3496
 				print '</span>';
@@ -3699,7 +3699,7 @@  discard block
 block discarded – undo
3699 3699
 		// Clean the php htaccesscontent file to remove php code and get only html part
3700 3700
 		$htaccesscontent = preg_replace('/<\?php \/\/ BEGIN PHP[^\?]*END PHP \?>\n*/ims', '', $htaccesscontent);
3701 3701
 	} else {
3702
-		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml');	// We must use 'nohtml' and not 'alphanohtml' because we must accept "
3702
+		$htaccesscontent = GETPOST('WEBSITE_HTACCESS', 'nohtml'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
3703 3703
 	}
3704 3704
 	if (!trim($htaccesscontent)) {
3705 3705
 		$htaccesscontent .= "# Order allow,deny\n";
@@ -3801,7 +3801,7 @@  discard block
 block discarded – undo
3801 3801
 	$maxfilesizearray = getMaxFileSizeArray();
3802 3802
 	$maxmin = $maxfilesizearray['maxmin'];
3803 3803
 	if ($maxmin > 0) {
3804
-		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
3804
+		print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
3805 3805
 	}
3806 3806
 	print '<input type="file" class="flat minwidth300" name="addedfile" id="addedfile"/>';
3807 3807
 
@@ -4057,7 +4057,7 @@  discard block
 block discarded – undo
4057 4057
 		$maxfilesizearray = getMaxFileSizeArray();
4058 4058
 		$maxmin = $maxfilesizearray['maxmin'];
4059 4059
 		if ($maxmin > 0) {
4060
-			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">';	// MAX_FILE_SIZE must precede the field type=file
4060
+			print '<input type="hidden" name="MAX_FILE_SIZE" value="'.($maxmin * 1024).'">'; // MAX_FILE_SIZE must precede the field type=file
4061 4061
 		}
4062 4062
 		print '<input class="flat minwidth400" type="file" name="userfile[]" accept=".zip">';
4063 4063
 		print '<input type="submit" class="button small" name="buttonsubmitimportfile" value="'.dol_escape_htmltag($langs->trans("Upload")).'">';
@@ -4576,7 +4576,7 @@  discard block
 block discarded – undo
4576 4576
 
4577 4577
 
4578 4578
 	$module = 'medias';
4579
-	$formalreadyopen = 2;	// So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4579
+	$formalreadyopen = 2; // So the form to submit a new file will not be opened another time inside the core/tpl/filemanager.tpl.php
4580 4580
 	if (empty($url)) {
4581 4581
 		$url = DOL_URL_ROOT.'/website/index.php'; // Must be an url without param
4582 4582
 	}
@@ -4629,7 +4629,7 @@  discard block
 block discarded – undo
4629 4629
 
4630 4630
 	require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
4631 4631
 	$poscursor = array('x'=>GETPOST('PAGE_CONTENT_x'), 'y'=>GETPOST('PAGE_CONTENT_y'));
4632
-	$doleditor=new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4632
+	$doleditor = new DolEditor('PAGE_CONTENT', $contentforedit, '', 500, 'Full', '', true, true, true, ROWS_5, '90%', 0, $poscursor);
4633 4633
 	$doleditor->Create(0, '', false);
4634 4634
 }
4635 4635
 
@@ -4807,7 +4807,7 @@  discard block
 block discarded – undo
4807 4807
 			print getTitleFieldOfList("Categories", 0, $_SERVER['PHP_SELF']);
4808 4808
 			print getTitleFieldOfList("Language", 0, $_SERVER['PHP_SELF'], 'lang', '', $param, '', $sortfield, $sortorder, 'center ')."\n";
4809 4809
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4810
-			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n";		// Date last modif
4810
+			print getTitleFieldOfList("DateLastModification", 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center ')."\n"; // Date last modif
4811 4811
 			print getTitleFieldOfList("", 0, $_SERVER['PHP_SELF']);
4812 4812
 			print getTitleFieldOfList($selectedfields, 0, $_SERVER["PHP_SELF"], '', '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ')."\n";
4813 4813
 			print '</tr>';
Please login to merge, or discard this patch.
htdocs/delivery/card.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
  */
91 91
 
92 92
 $parameters = array();
93
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);       // Note that $action and $object may have been modified by some hooks
93
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
94 94
 // Delete Link
95 95
 $permissiondellink = $user->hasRight('expedition', 'delivery', 'supprimer'); // Used by the include of actions_dellink.inc.php
96
-include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';     // Must be include, not include_once
96
+include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php'; // Must be include, not include_once
97 97
 
98 98
 if ($action == 'add') {
99 99
 	$db->begin();
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
 			$morehtmlref = '<div class="refidno">';
327 327
 			// Ref customer shipment
328 328
 			$morehtmlref .= $form->editfieldkey("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string', '', 0, 1);
329
-			$morehtmlref .= $form->editfieldval("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':' . getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
329
+			$morehtmlref .= $form->editfieldval("RefCustomer", '', $expedition->ref_customer, $expedition, $user->hasRight('expedition', 'creer'), 'string'.(getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') ? ':'.getDolGlobalString('THIRDPARTY_REF_INPUT_SIZE') : ''), '', null, null, '', 1);
330 330
 			$morehtmlref .= '<br>'.$langs->trans("RefDeliveryReceipt").' : '.$object->ref;
331 331
 			// Thirdparty
332 332
 			$morehtmlref .= '<br>'.$expedition->thirdparty->getNomUrl(1);
Please login to merge, or discard this patch.
htdocs/expedition/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@
 block discarded – undo
95 95
 }
96 96
 $result = restrictedArea($user, 'expedition', $object->id, '');
97 97
 
98
-$permissiontoadd = $user->hasRight('expedition', 'creer');	// Used by the include of actions_dellink.inc.php
98
+$permissiontoadd = $user->hasRight('expedition', 'creer'); // Used by the include of actions_dellink.inc.php
99 99
 
100 100
 
101 101
 /*
Please login to merge, or discard this patch.
htdocs/expedition/class/api_shipments.class.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -623,15 +623,15 @@
 block discarded – undo
623 623
 	*/
624 624
 
625 625
 	/**
626
-	* Close a shipment (Classify it as "Delivered")
627
-	*
628
-	* @param   int     $id             Expedition ID
629
-	* @param   int     $notrigger      Disabled triggers
630
-	*
631
-	* @url POST    {id}/close
632
-	*
633
-	* @return  object
634
-	*/
626
+	 * Close a shipment (Classify it as "Delivered")
627
+	 *
628
+	 * @param   int     $id             Expedition ID
629
+	 * @param   int     $notrigger      Disabled triggers
630
+	 *
631
+	 * @url POST    {id}/close
632
+	 *
633
+	 * @return  object
634
+	 */
635 635
 	public function close($id, $notrigger = 0)
636 636
 	{
637 637
 		if (!DolibarrApiAccess::$user->hasRight('expedition', 'creer')) {
Please login to merge, or discard this patch.