Completed
Branch develop (1285e7)
by
unknown
23:31
created
htdocs/categories/class/categorie.class.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -50,25 +50,25 @@  discard block
 block discarded – undo
50 50
 class Categorie extends CommonObject
51 51
 {
52 52
 	// Categories types (we use string because we want to accept any modules/types in a future)
53
-	const TYPE_PRODUCT				= 'product';
53
+	const TYPE_PRODUCT = 'product';
54 54
 	const TYPE_SUPPLIER				= 'supplier';
55 55
 	const TYPE_CUSTOMER				= 'customer';
56
-	const TYPE_MEMBER				= 'member';
56
+	const TYPE_MEMBER = 'member';
57 57
 	const TYPE_CONTACT				= 'contact';
58
-	const TYPE_USER					= 'user';
58
+	const TYPE_USER = 'user';
59 59
 	const TYPE_PROJECT				= 'project';
60 60
 	const TYPE_ACCOUNT				= 'bank_account';
61 61
 	const TYPE_BANK_LINE			= 'bank_line';
62 62
 	const TYPE_WAREHOUSE			= 'warehouse';
63
-	const TYPE_ACTIONCOMM			= 'actioncomm';
64
-	const TYPE_WEBSITE_PAGE			= 'website_page';
65
-	const TYPE_TICKET				= 'ticket';
66
-	const TYPE_KNOWLEDGEMANAGEMENT	= 'knowledgemanagement';
67
-	const TYPE_FICHINTER			= 'fichinter';
68
-	const TYPE_ORDER				= 'order';
69
-	const TYPE_INVOICE				= 'invoice';
70
-	const TYPE_SUPPLIER_ORDER		= 'supplier_order';
71
-	const TYPE_SUPPLIER_INVOICE		= 'supplier_invoice';
63
+	const TYPE_ACTIONCOMM = 'actioncomm';
64
+	const TYPE_WEBSITE_PAGE = 'website_page';
65
+	const TYPE_TICKET = 'ticket';
66
+	const TYPE_KNOWLEDGEMANAGEMENT = 'knowledgemanagement';
67
+	const TYPE_FICHINTER = 'fichinter';
68
+	const TYPE_ORDER = 'order';
69
+	const TYPE_INVOICE = 'invoice';
70
+	const TYPE_SUPPLIER_ORDER = 'supplier_order';
71
+	const TYPE_SUPPLIER_INVOICE = 'supplier_invoice';
72 72
 
73 73
 
74 74
 	/**
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
 					$this->MAP_CAT_TABLE[$mapCode] = isset($mapList['cat_table']) ? $mapList['cat_table'] : null;
389 389
 					$this->MAP_OBJ_CLASS[$mapCode] = $mapList['obj_class'];
390 390
 					$this->MAP_OBJ_TABLE[$mapCode] = $mapList['obj_table'];
391
-					self::$MAP_TYPE_TITLE_AREA[$mapCode] =  $mapList['label'];
391
+					self::$MAP_TYPE_TITLE_AREA[$mapCode] = $mapList['label'];
392 392
 				}
393 393
 			}
394 394
 		}
@@ -752,7 +752,7 @@  discard block
 block discarded – undo
752 752
 			'categorie_contact' => 'fk_categorie',
753 753
 			'categorie_fournisseur' => 'fk_categorie',
754 754
 			'categorie_knowledgemanagement' => array('field' => 'fk_categorie', 'enabled' => isModEnabled('knowledgemanagement')),
755
-			'categorie_fichinter' => array('field' => 'fk_categorie', 'enabled' => false ),  // not yet fully implemented (wait 22) isModEnabled('intervention')),
755
+			'categorie_fichinter' => array('field' => 'fk_categorie', 'enabled' => false), // not yet fully implemented (wait 22) isModEnabled('intervention')),
756 756
 			'categorie_member' => 'fk_categorie',
757 757
 			'categorie_user' => 'fk_categorie',
758 758
 			'categorie_product' => 'fk_categorie',
@@ -1356,14 +1356,14 @@  discard block
 block discarded – undo
1356 1356
 					|| preg_match('/'.$keyfilter3.'/', $fullpath) || preg_match('/'.$keyfilter4.'/', $fullpath));
1357 1357
 
1358 1358
 				if (($test && !$include) || (!$test && $include)) {
1359
-					unset($this->cats[$key]);  // @phpstan-ignore-line
1359
+					unset($this->cats[$key]); // @phpstan-ignore-line
1360 1360
 				}
1361 1361
 			}
1362 1362
 		}
1363 1363
 
1364 1364
 		dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG);
1365 1365
 
1366
-		$this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1);		// Sort on full label like "Label 1 >> Sublabel a >> Subsublabel"
1366
+		$this->cats = dol_sort_array($this->cats, 'fulllabel', 'asc', 1, 0, 1); // Sort on full label like "Label 1 >> Sublabel a >> Subsublabel"
1367 1367
 
1368 1368
 		return $this->cats;
1369 1369
 	}
@@ -1621,7 +1621,7 @@  discard block
 block discarded – undo
1621 1621
 		$parents = $this->get_meres();
1622 1622
 		if (is_array($parents)) {
1623 1623
 			foreach ($parents as $parent) {
1624
-				$all_ways = $parent->get_all_ways();	// recursivity. TODO Add a protection for infinite loop
1624
+				$all_ways = $parent->get_all_ways(); // recursivity. TODO Add a protection for infinite loop
1625 1625
 				foreach ($all_ways as $way) {
1626 1626
 					$w = $way;
1627 1627
 					$w[] = $this;
@@ -1781,10 +1781,10 @@  discard block
 block discarded – undo
1781 1781
 	 */
1782 1782
 	public function isAnyPhotoAvailable($sdir)
1783 1783
 	{
1784
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
1785
-		include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
1784
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
1785
+		include_once DOL_DOCUMENT_ROOT.'/core/lib/images.lib.php';
1786 1786
 
1787
-		$sdir .= '/' . get_exdir($this->id, 2, 0, 0, $this, 'category') . $this->id . "/photos/";
1787
+		$sdir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'category').$this->id."/photos/";
1788 1788
 
1789 1789
 		$dir_osencoded = dol_osencode($sdir);
1790 1790
 		if (file_exists($dir_osencoded)) {
@@ -1794,7 +1794,7 @@  discard block
 block discarded – undo
1794 1794
 					if (!utf8_check($file)) {
1795 1795
 						$file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory
1796 1796
 					}
1797
-					if (dol_is_file($sdir . $file) && image_format_supported($file) >= 0) {
1797
+					if (dol_is_file($sdir.$file) && image_format_supported($file) >= 0) {
1798 1798
 						return true;
1799 1799
 					}
1800 1800
 				}
@@ -1917,7 +1917,7 @@  discard block
 block discarded – undo
1917 1917
 		$result .= $linkend;
1918 1918
 
1919 1919
 		global $action;
1920
-		$hookmanager->initHooks(array($this->element . 'dao'));
1920
+		$hookmanager->initHooks(array($this->element.'dao'));
1921 1921
 		$parameters = array('id' => $this->id, 'getnomurl' => &$result);
1922 1922
 		$reshook = $hookmanager->executeHooks('getNomUrl', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
1923 1923
 		if ($reshook > 0) {
Please login to merge, or discard this patch.
htdocs/projet/element.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 $id = GETPOSTINT('id');
158 158
 $ref = GETPOST('ref', 'alpha');
159 159
 $action = GETPOST('action', 'aZ09');
160
-$datesrfc = GETPOST('datesrfc');	// deprecated
161
-$dateerfc = GETPOST('dateerfc');	// deprecated
160
+$datesrfc = GETPOST('datesrfc'); // deprecated
161
+$dateerfc = GETPOST('dateerfc'); // deprecated
162 162
 $dates = dol_mktime(0, 0, 0, GETPOSTINT('datesmonth'), GETPOSTINT('datesday'), GETPOSTINT('datesyear'));
163 163
 $datee = dol_mktime(23, 59, 59, GETPOSTINT('dateemonth'), GETPOSTINT('dateeday'), GETPOSTINT('dateeyear'));
164 164
 if (empty($dates) && !empty($datesrfc)) {	// deprecated
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 
209 209
 $permissiontoadd = $user->hasRight('projet', 'creer');
210 210
 $permissiontodelete = $user->hasRight('projet', 'supprimer');
211
-$permissiondellink = $user->hasRight('projet', 'creer');	// Used by the include of actions_dellink.inc.php
211
+$permissiondellink = $user->hasRight('projet', 'creer'); // Used by the include of actions_dellink.inc.php
212 212
 $permissiontoeditextra = $permissiontoadd;
213 213
 if (GETPOST('attribute', 'aZ09') && isset($extrafields->attributes[$object->table_element]['perms'][GETPOST('attribute', 'aZ09')])) {
214 214
 	// For action 'update_extras', is there a specific permission set for the attribute to update
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
 // Quick edit for extrafields
223 223
 if ($action == 'update_extras' && $permissiontoeditextra) {
224 224
 	$error = 0;
225
-	$object->oldcopy = dol_clone($object, 2);  // @phan-suppress-current-line PhanTypeMismatchProperty
225
+	$object->oldcopy = dol_clone($object, 2); // @phan-suppress-current-line PhanTypeMismatchProperty
226 226
 
227 227
 	$attribute_name = GETPOST('attribute', 'aZ09');
228 228
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 if (!empty($_SESSION['pageforbacktolist']) && !empty($_SESSION['pageforbacktolist']['project'])) {
278 278
 	$tmpurl = $_SESSION['pageforbacktolist']['project'];
279 279
 	$tmpurl = preg_replace('/__SOCID__/', (string) $object->socid, $tmpurl);
280
-	$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?'). 'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
280
+	$linkback = '<a href="'.$tmpurl.(preg_match('/\?/', $tmpurl) ? '&' : '?').'restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
281 281
 } else {
282 282
 	$linkback = '<a href="'.DOL_URL_ROOT.'/projet/list.php?restore_lastsearch_values=1">'.$langs->trans("BackToList").'</a>';
283 283
 }
@@ -1149,7 +1149,7 @@  discard block
 block discarded – undo
1149 1149
 		if (!in_array($tablename, $array_of_element_linkable_with_different_thirdparty)) {
1150 1150
 			$idtofilterthirdparty = empty($object->thirdparty->id) ? 0 : $object->thirdparty->id;
1151 1151
 			if (getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS')) {
1152
-				$idtofilterthirdparty .= ',' . getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS');
1152
+				$idtofilterthirdparty .= ','.getDolGlobalString('PROJECT_OTHER_THIRDPARTY_ID_TO_ADD_ELEMENTS');
1153 1153
 			}
1154 1154
 		}
1155 1155
 
Please login to merge, or discard this patch.