@@ -189,7 +189,7 @@ |
||
189 | 189 | $maxfilesizearray = getMaxFileSizeArray(); |
190 | 190 | $maxmin = $maxfilesizearray['maxmin']; |
191 | 191 | if ($maxmin > 0) { |
192 | - $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
192 | + $texte .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file |
|
193 | 193 | } |
194 | 194 | $texte .= ' <input type="file" name="uploadfile">'; |
195 | 195 | $texte .= '<input type="hidden" value="MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH" name="keyforuploaddir">'; |
@@ -173,14 +173,14 @@ discard block |
||
173 | 173 | $nbofiles = count($listoffiles); |
174 | 174 | if (getDolGlobalString('MYMODULE_MYOBJECT_ADDON_PDF_ODT_PATH')) { |
175 | 175 | $texte .= $langs->trans("NumberOfModelFilesFound") . ': <b>'; |
176 | - //$texte.=$nbofiles?'<a id="a_'.get_only_class($this).'" href="#">':''; |
|
176 | + //$texte.=$nbofiles?'<a id="a_'.get_only_class($this).'" href="#">':''; |
|
177 | 177 | $texte .= count($listoffiles); |
178 | 178 | //$texte.=$nbofiles?'</a>':''; |
179 | 179 | $texte .= '</b>'; |
180 | 180 | } |
181 | 181 | |
182 | 182 | if ($nbofiles) { |
183 | - $texte .= '<div id="div_' . get_only_class($this) . '" class="hiddenx">'; |
|
183 | + $texte .= '<div id="div_' . get_only_class($this) . '" class="hiddenx">'; |
|
184 | 184 | // Show list of found files |
185 | 185 | foreach ($listoffiles as $file) { |
186 | 186 | $texte .= '- ' . $file['name'] . ' <a href="' . constant('BASE_URL') . '/document.php?modulepart=doctemplates&file=mymodule_myobject/' . urlencode(basename($file['name'])) . '">' . img_picto('', 'listlight') . '</a>'; |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | return $texte; |
213 | 213 | } |
214 | 214 | |
215 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
215 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
216 | 216 | /** |
217 | 217 | * Function to build a document on disk using the generic odt module. |
218 | 218 | * |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function write_file($object, $outputlangs, $srctemplatepath, $hidedetails = 0, $hidedesc = 0, $hideref = 0) |
228 | 228 | { |
229 | - // phpcs:enable |
|
229 | + // phpcs:enable |
|
230 | 230 | global $user, $langs, $conf, $mysoc, $hookmanager; |
231 | 231 | global $action; |
232 | 232 |
@@ -75,8 +75,8 @@ |
||
75 | 75 | |
76 | 76 | // Author |
77 | 77 | $this->editor_name = 'Editor name'; |
78 | - $this->editor_url = 'https://www.example.com'; // Must be an external online web site |
|
79 | - $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@mymodule' |
|
78 | + $this->editor_url = 'https://www.example.com'; // Must be an external online web site |
|
79 | + $this->editor_squarred_logo = ''; // Must be image filename into the module/img directory followed with @modulename. Example: 'myimage.png@mymodule' |
|
80 | 80 | |
81 | 81 | // Possible values for version are: 'development', 'experimental', 'dolibarr', 'dolibarr_deprecated', 'experimental_deprecated' or a version string like 'x.y.z' |
82 | 82 | $this->version = '1.0'; |
@@ -64,7 +64,7 @@ |
||
64 | 64 | // Gives the possibility for the module, to provide his own family info and position of this family (Overwrite $this->family and $this->module_position. Avoid this) |
65 | 65 | //$this->familyinfo = array('myownfamily' => array('position' => '01', 'label' => $langs->trans("MyOwnFamily"))); |
66 | 66 | // Module label (no space allowed), used if translation string 'ModuleMyModuleName' not found (MyModule is name of module). |
67 | - $this->name = preg_replace('/^mod/i', '', get_only_class($this)); |
|
67 | + $this->name = preg_replace('/^mod/i', '', get_only_class($this)); |
|
68 | 68 | |
69 | 69 | // DESCRIPTION_FLAG |
70 | 70 | // Module description, used if translation string 'ModuleMyModuleDesc' not found (MyModule is name of module). |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | |
93 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
93 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
94 | 94 | /** |
95 | 95 | * This is the main function that returns the array of emails |
96 | 96 | * |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | */ |
100 | 100 | public function add_to_target($mailing_id) |
101 | 101 | { |
102 | - // phpcs:enable |
|
102 | + // phpcs:enable |
|
103 | 103 | $target = array(); |
104 | 104 | $j = 0; |
105 | 105 |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | |
343 | 343 | |
344 | 344 | |
345 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
345 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
346 | 346 | /** |
347 | 347 | * Clean sensible object datas |
348 | 348 | * |
@@ -351,7 +351,7 @@ discard block |
||
351 | 351 | */ |
352 | 352 | protected function _cleanObjectDatas($object) |
353 | 353 | { |
354 | - // phpcs:enable |
|
354 | + // phpcs:enable |
|
355 | 355 | $object = parent::_cleanObjectDatas($object); |
356 | 356 | |
357 | 357 | unset($object->rowid); |
@@ -163,8 +163,8 @@ discard block |
||
163 | 163 | /** |
164 | 164 | * @var int Thirdparty ID |
165 | 165 | */ |
166 | - public $socid; // both socid and fk_soc are used |
|
167 | - public $fk_soc; // both socid and fk_soc are used |
|
166 | + public $socid; // both socid and fk_soc are used |
|
167 | + public $fk_soc; // both socid and fk_soc are used |
|
168 | 168 | |
169 | 169 | /** |
170 | 170 | * @var int Status |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | $this->date_creation = $this->db->jdate($obj->datec); |
1053 | 1053 | $this->date_modification = empty($obj->datem) ? '' : $this->db->jdate($obj->datem); |
1054 | 1054 | if (!empty($obj->datev)) { |
1055 | - $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
1055 | + $this->date_validation = empty($obj->datev) ? '' : $this->db->jdate($obj->datev); |
|
1056 | 1056 | } |
1057 | 1057 | } |
1058 | 1058 | |
@@ -1257,13 +1257,13 @@ discard block |
||
1257 | 1257 | * To overload |
1258 | 1258 | * @see CommonObjectLine |
1259 | 1259 | */ |
1260 | - public $parent_element = ''; // Example: '' or 'myobject' |
|
1260 | + public $parent_element = ''; // Example: '' or 'myobject' |
|
1261 | 1261 | |
1262 | 1262 | /** |
1263 | 1263 | * To overload |
1264 | 1264 | * @see CommonObjectLine |
1265 | 1265 | */ |
1266 | - public $fk_parent_attribute = ''; // Example: '' or 'fk_myobject' |
|
1266 | + public $fk_parent_attribute = ''; // Example: '' or 'fk_myobject' |
|
1267 | 1267 | |
1268 | 1268 | /** |
1269 | 1269 | * Constructor |
@@ -565,7 +565,7 @@ discard block |
||
565 | 565 | |
566 | 566 | // Protection |
567 | 567 | if ($this->status == self::STATUS_VALIDATED) { |
568 | - dol_syslog(get_only_class($this) . "::validate action abandoned: already validated", LOG_WARNING); |
|
568 | + dol_syslog(get_only_class($this) . "::validate action abandoned: already validated", LOG_WARNING); |
|
569 | 569 | return 0; |
570 | 570 | } |
571 | 571 | |
@@ -605,7 +605,7 @@ discard block |
||
605 | 605 | } |
606 | 606 | $sql .= " WHERE rowid = " . ((int) $this->id); |
607 | 607 | |
608 | - dol_syslog(get_only_class($this) . "::validate()", LOG_DEBUG); |
|
608 | + dol_syslog(get_only_class($this) . "::validate()", LOG_DEBUG); |
|
609 | 609 | $resql = $this->db->query($sql); |
610 | 610 | if (!$resql) { |
611 | 611 | dol_print_error($this->db); |
@@ -650,7 +650,7 @@ discard block |
||
650 | 650 | $dirsource = $conf->mymodule->dir_output . '/myobject/' . $oldref; |
651 | 651 | $dirdest = $conf->mymodule->dir_output . '/myobject/' . $newref; |
652 | 652 | if (!$error && file_exists($dirsource)) { |
653 | - dol_syslog(get_only_class($this) . "::validate() rename dir " . $dirsource . " into " . $dirdest); |
|
653 | + dol_syslog(get_only_class($this) . "::validate() rename dir " . $dirsource . " into " . $dirdest); |
|
654 | 654 | |
655 | 655 | if (@rename($dirsource, $dirdest)) { |
656 | 656 | dol_syslog("Rename ok"); |
@@ -973,7 +973,7 @@ discard block |
||
973 | 973 | return $this->LibStatut($this->status, $mode); |
974 | 974 | } |
975 | 975 | |
976 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
976 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
977 | 977 | /** |
978 | 978 | * Return the label of a given status |
979 | 979 | * |
@@ -983,7 +983,7 @@ discard block |
||
983 | 983 | */ |
984 | 984 | public function LibStatut($status, $mode = 0) |
985 | 985 | { |
986 | - // phpcs:enable |
|
986 | + // phpcs:enable |
|
987 | 987 | if (is_null($status)) { |
988 | 988 | return ''; |
989 | 989 | } |
@@ -1140,7 +1140,7 @@ discard block |
||
1140 | 1140 | return $numref; |
1141 | 1141 | } else { |
1142 | 1142 | $this->error = $obj->error; |
1143 | - //dol_print_error($this->db,get_only_class($this)."::getNextNumRef ".$obj->error); |
|
1143 | + //dol_print_error($this->db,get_only_class($this)."::getNextNumRef ".$obj->error); |
|
1144 | 1144 | return ""; |
1145 | 1145 | } |
1146 | 1146 | } else { |
@@ -388,7 +388,7 @@ discard block |
||
388 | 388 | |
389 | 389 | clearstatcache(true); |
390 | 390 | if (function_exists('opcache_invalidate')) { |
391 | - opcache_reset(); // remove the include cache hell ! |
|
391 | + opcache_reset(); // remove the include cache hell ! |
|
392 | 392 | } |
393 | 393 | |
394 | 394 | header("Location: " . $_SERVER["PHP_SELF"] . '?module=' . $modulename); |
@@ -883,7 +883,7 @@ discard block |
||
883 | 883 | } |
884 | 884 | $stringLog = implode("\n", $strreplace); |
885 | 885 | // @phan-suppress-next-line PhanPluginSuspiciousParamPosition |
886 | - dolReplaceInFile($destfile, array('//include::ChangeLog.md[]' => '','__CHANGELOG__' => $stringLog)); |
|
886 | + dolReplaceInFile($destfile, array('//include::ChangeLog.md[]' => '', '__CHANGELOG__' => $stringLog)); |
|
887 | 887 | } |
888 | 888 | |
889 | 889 | // Delete old documentation files |
@@ -1540,7 +1540,7 @@ discard block |
||
1540 | 1540 | } |
1541 | 1541 | } |
1542 | 1542 | $menus = $moduleobj->menu; |
1543 | - $counter = 0 ; |
|
1543 | + $counter = 0; |
|
1544 | 1544 | foreach ($menus as $menu) { |
1545 | 1545 | if ($menu['leftmenu'] == strtolower($objectname)) { |
1546 | 1546 | $counter++; |
@@ -1682,7 +1682,7 @@ discard block |
||
1682 | 1682 | } else { |
1683 | 1683 | createNewDictionnary($module, $moduledescriptorfile, $newdicname, $dictionaries); |
1684 | 1684 | if (function_exists('opcache_invalidate')) { |
1685 | - opcache_reset(); // remove the include cache hell ! |
|
1685 | + opcache_reset(); // remove the include cache hell ! |
|
1686 | 1686 | } |
1687 | 1687 | clearstatcache(true); |
1688 | 1688 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=dictionaries&module=' . $module . ($forceddirread ? '@' . $dirread : '')); |
@@ -1777,7 +1777,7 @@ discard block |
||
1777 | 1777 | 'isameasure' => GETPOSTINT('propisameasure'), |
1778 | 1778 | 'comment' => GETPOST('propcomment', 'alpha'), |
1779 | 1779 | 'help' => GETPOST('prophelp', 'alpha'), |
1780 | - 'css' => GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example |
|
1780 | + 'css' => GETPOST('propcss', 'alpha'), // Can be 'maxwidth500 widthcentpercentminusxx' for example |
|
1781 | 1781 | 'cssview' => GETPOST('propcssview', 'alpha'), |
1782 | 1782 | 'csslist' => GETPOST('propcsslist', 'alpha'), |
1783 | 1783 | 'default' => GETPOST('propdefault', 'restricthtml'), |
@@ -1932,7 +1932,7 @@ discard block |
||
1932 | 1932 | |
1933 | 1933 | clearstatcache(true); |
1934 | 1934 | if (function_exists('opcache_invalidate')) { |
1935 | - opcache_reset(); // remove the include cache hell ! |
|
1935 | + opcache_reset(); // remove the include cache hell ! |
|
1936 | 1936 | } |
1937 | 1937 | |
1938 | 1938 | header("Location: " . $_SERVER["PHP_SELF"] . '?module=deletemodule'); |
@@ -2024,7 +2024,7 @@ discard block |
||
2024 | 2024 | |
2025 | 2025 | clearstatcache(true); |
2026 | 2026 | if (function_exists('opcache_invalidate')) { |
2027 | - opcache_reset(); // remove the include cache hell ! |
|
2027 | + opcache_reset(); // remove the include cache hell ! |
|
2028 | 2028 | } |
2029 | 2029 | $resultko = 0; |
2030 | 2030 | foreach ($filetodelete as $tmpfiletodelete) { |
@@ -2044,7 +2044,7 @@ discard block |
||
2044 | 2044 | } |
2045 | 2045 | |
2046 | 2046 | $action = ''; |
2047 | - if (! $error) { |
|
2047 | + if (!$error) { |
|
2048 | 2048 | $tabobj = 'newobject'; |
2049 | 2049 | } else { |
2050 | 2050 | $tabobj = 'deleteobject'; |
@@ -2147,7 +2147,7 @@ discard block |
||
2147 | 2147 | setEventMessages($langs->trans("DictionaryDeleted", ucfirst(substr($newdicname, 2))), null); |
2148 | 2148 | } |
2149 | 2149 | if (function_exists('opcache_invalidate')) { |
2150 | - opcache_reset(); // remove the include cache hell ! |
|
2150 | + opcache_reset(); // remove the include cache hell ! |
|
2151 | 2151 | } |
2152 | 2152 | clearstatcache(true); |
2153 | 2153 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=dictionaries&module=' . $module . ($forceddirread ? '@' . $dirread : '')); |
@@ -2155,7 +2155,7 @@ discard block |
||
2155 | 2155 | } |
2156 | 2156 | } |
2157 | 2157 | if ($dirins && $action == 'updatedictionary' && GETPOST('dictionnarykey')) { |
2158 | - $keydict = GETPOST('dictionnarykey') - 1 ; |
|
2158 | + $keydict = GETPOST('dictionnarykey') - 1; |
|
2159 | 2159 | |
2160 | 2160 | $pathtofile = $listofmodules[strtolower($module)]['moduledescriptorrelpath']; |
2161 | 2161 | $destdir = $dirins . '/' . strtolower($module); |
@@ -2189,7 +2189,7 @@ discard block |
||
2189 | 2189 | setEventMessages($langs->trans("DictionaryNameUpdated", ucfirst(GETPOST('tablib'))), null); |
2190 | 2190 | } |
2191 | 2191 | if (function_exists('opcache_invalidate')) { |
2192 | - opcache_reset(); // remove the include cache hell ! |
|
2192 | + opcache_reset(); // remove the include cache hell ! |
|
2193 | 2193 | } |
2194 | 2194 | clearstatcache(true); |
2195 | 2195 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=dictionaries&module=' . $module . ($forceddirread ? '@' . $dirread : '')); |
@@ -2364,7 +2364,7 @@ discard block |
||
2364 | 2364 | |
2365 | 2365 | clearstatcache(true); |
2366 | 2366 | if (function_exists('opcache_invalidate')) { |
2367 | - opcache_reset(); // remove the include cache hell ! |
|
2367 | + opcache_reset(); // remove the include cache hell ! |
|
2368 | 2368 | } |
2369 | 2369 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=permissions&module=' . $module); |
2370 | 2370 | exit; |
@@ -2470,7 +2470,7 @@ discard block |
||
2470 | 2470 | setEventMessages($langs->trans('PermissionUpdatedSuccesfuly'), null); |
2471 | 2471 | clearstatcache(true); |
2472 | 2472 | if (function_exists('opcache_invalidate')) { |
2473 | - opcache_reset(); // remove the include cache hell ! |
|
2473 | + opcache_reset(); // remove the include cache hell ! |
|
2474 | 2474 | } |
2475 | 2475 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=permissions&module=' . $module); |
2476 | 2476 | exit; |
@@ -2520,7 +2520,7 @@ discard block |
||
2520 | 2520 | |
2521 | 2521 | clearstatcache(true); |
2522 | 2522 | if (function_exists('opcache_invalidate')) { |
2523 | - opcache_reset(); // remove the include cache hell ! |
|
2523 | + opcache_reset(); // remove the include cache hell ! |
|
2524 | 2524 | } |
2525 | 2525 | |
2526 | 2526 | header("Location: " . constant('BASE_URL') . '/modulebuilder/index.php?tab=permissions&module=' . $module); |
@@ -2690,7 +2690,7 @@ discard block |
||
2690 | 2690 | |
2691 | 2691 | clearstatcache(true); |
2692 | 2692 | if (function_exists('opcache_invalidate')) { |
2693 | - opcache_reset(); // remove the include cache hell ! |
|
2693 | + opcache_reset(); // remove the include cache hell ! |
|
2694 | 2694 | } |
2695 | 2695 | |
2696 | 2696 | setEventMessages($langs->trans('MenuDeletedSuccessfuly'), null); |
@@ -2747,7 +2747,7 @@ discard block |
||
2747 | 2747 | setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentities("Url")), null, 'errors'); |
2748 | 2748 | } |
2749 | 2749 | if (!empty(GETPOST('target'))) { |
2750 | - $targets = array('_blank','_self','_parent','_top',''); |
|
2750 | + $targets = array('_blank', '_self', '_parent', '_top', ''); |
|
2751 | 2751 | if (!in_array(GETPOST('target'), $targets)) { |
2752 | 2752 | $error++; |
2753 | 2753 | setEventMessages($langs->trans("ErrorFieldValue", $langs->transnoentities("target")), null, 'errors'); |
@@ -2853,7 +2853,7 @@ discard block |
||
2853 | 2853 | |
2854 | 2854 | // Modify a menu entry |
2855 | 2855 | if ($dirins && $action == "update_menu" && GETPOSTINT('menukey') && GETPOST('tabobj')) { |
2856 | - $objectname = GETPOST('tabobj'); |
|
2856 | + $objectname = GETPOST('tabobj'); |
|
2857 | 2857 | $dirins = $listofmodules[strtolower($module)]['moduledescriptorrootpath']; |
2858 | 2858 | $destdir = $dirins . '/' . strtolower($module); |
2859 | 2859 | $objects = dolGetListOfObjectClasses($destdir); |
@@ -2948,7 +2948,7 @@ discard block |
||
2948 | 2948 | } |
2949 | 2949 | } |
2950 | 2950 | } else { |
2951 | - $_POST['type'] = ''; // TODO Use a var here and later |
|
2951 | + $_POST['type'] = ''; // TODO Use a var here and later |
|
2952 | 2952 | $_POST['titre'] = ''; |
2953 | 2953 | $_POST['fk_menu'] = ''; |
2954 | 2954 | $_POST['leftmenu'] = ''; |
@@ -4124,16 +4124,16 @@ discard block |
||
4124 | 4124 | // Define path for sql file |
4125 | 4125 | $pathtosql = strtolower($module) . '/sql/llx_' . strtolower($module) . '_' . strtolower($tabobj) . '-' . strtolower($module) . '.sql'; |
4126 | 4126 | $result = dol_buildpath($pathtosql); |
4127 | - if (! dol_is_file($result)) { |
|
4127 | + if (!dol_is_file($result)) { |
|
4128 | 4128 | $pathtosql = strtolower($module) . '/sql/llx_' . strtolower($module) . '_' . strtolower($tabobj) . '.sql'; |
4129 | 4129 | $result = dol_buildpath($pathtosql); |
4130 | - if (! dol_is_file($result)) { |
|
4130 | + if (!dol_is_file($result)) { |
|
4131 | 4131 | $pathtosql = 'install/mysql/tables/llx_' . strtolower($module) . '_' . strtolower($tabobj) . '-' . strtolower($module) . '.sql'; |
4132 | 4132 | $result = dol_buildpath($pathtosql); |
4133 | - if (! dol_is_file($result)) { |
|
4133 | + if (!dol_is_file($result)) { |
|
4134 | 4134 | $pathtosql = 'install/mysql/tables/llx_' . strtolower($module) . '-' . strtolower($module) . '.sql'; |
4135 | 4135 | $result = dol_buildpath($pathtosql); |
4136 | - if (! dol_is_file($result)) { |
|
4136 | + if (!dol_is_file($result)) { |
|
4137 | 4137 | $pathtosql = 'install/mysql/tables/llx_' . strtolower($module) . '.sql'; |
4138 | 4138 | $pathtosqlextra = 'install/mysql/tables/llx_' . strtolower($module) . '_extrafields.sql'; |
4139 | 4139 | $result = dol_buildpath($pathtosql); |
@@ -4152,7 +4152,7 @@ discard block |
||
4152 | 4152 | $pathtosqlroot = preg_replace('/\/llx_.*$/', '', $pathtosql); |
4153 | 4153 | |
4154 | 4154 | $pathtosqlkey = preg_replace('/\.sql$/', '.key.sql', $pathtosql); |
4155 | - $pathtosqlextrakey = preg_replace('/\.sql$/', '.key.sql', $pathtosqlextra); |
|
4155 | + $pathtosqlextrakey = preg_replace('/\.sql$/', '.key.sql', $pathtosqlextra); |
|
4156 | 4156 | |
4157 | 4157 | $pathtolib = strtolower($module) . '/lib/' . strtolower($module) . '.lib.php'; |
4158 | 4158 | $pathtoobjlib = strtolower($module) . '/lib/' . strtolower($module) . '_' . strtolower($tabobj) . '.lib.php'; |
@@ -5664,7 +5664,7 @@ discard block |
||
5664 | 5664 | if (in_array($perm[5], array('lire', 'read', 'creer', 'write', 'effacer', 'delete'))) { |
5665 | 5665 | print dol_escape_htmltag(ucfirst($perm[4])); |
5666 | 5666 | } else { |
5667 | - print ''; // No particular object |
|
5667 | + print ''; // No particular object |
|
5668 | 5668 | } |
5669 | 5669 | print '</td>'; |
5670 | 5670 |
@@ -47,7 +47,7 @@ |
||
47 | 47 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'conferenceorboothattendeecard'; // To manage different context of search |
48 | 48 | $backtopage = GETPOST('backtopage', 'alpha'); |
49 | 49 | $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); |
50 | -$lineid = GETPOSTINT('lineid'); |
|
50 | +$lineid = GETPOSTINT('lineid'); |
|
51 | 51 | $mode = GETPOST('mode', 'alpha'); |
52 | 52 | |
53 | 53 | $conf_or_booth_id = GETPOSTINT('conforboothid'); |
@@ -46,15 +46,15 @@ discard block |
||
46 | 46 | $langs->loadLangs(array("eventorganization", "other", "projects", "bills")); |
47 | 47 | |
48 | 48 | // Get Parameters |
49 | -$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
50 | -$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
51 | -$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
52 | -$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
53 | -$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
54 | -$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
49 | +$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ... |
|
50 | +$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists) |
|
51 | +$show_files = GETPOSTINT('show_files'); // Show files area generated by bulk actions ? |
|
52 | +$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation |
|
53 | +$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button |
|
54 | +$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list |
|
55 | 55 | $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search |
56 | -$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
57 | -$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
56 | +$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page |
|
57 | +$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print') |
|
58 | 58 | $mode = GETPOST('mode', 'aZ'); |
59 | 59 | |
60 | 60 | $id = GETPOSTINT('id'); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | |
96 | 96 | // Default sort order (if not yet defined by previous GETPOST) |
97 | 97 | if (!$sortfield) { |
98 | - reset($object->fields); // Reset is required to avoid key() to return null. |
|
98 | + reset($object->fields); // Reset is required to avoid key() to return null. |
|
99 | 99 | $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition. |
100 | 100 | } |
101 | 101 | if (!$sortorder) { |
@@ -806,7 +806,7 @@ discard block |
||
806 | 806 | } |
807 | 807 | |
808 | 808 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
809 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
809 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
810 | 810 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
811 | 811 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
812 | 812 | |
@@ -898,7 +898,7 @@ discard block |
||
898 | 898 | } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) { |
899 | 899 | $cssforfield .= ($cssforfield ? ' ' : '') . 'right'; |
900 | 900 | } |
901 | - $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
901 | + $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label |
|
902 | 902 | if (!empty($arrayfields['t.' . $key]['checked'])) { |
903 | 903 | print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n"; |
904 | 904 | $totalarray['nbfield']++; |
@@ -192,7 +192,9 @@ discard block |
||
192 | 192 | |
193 | 193 | if (($action == 'add' || ($action == 'update' && $object->status < Ticket::STATUS_CLOSED)) && $permissiontoadd) { |
194 | 194 | $ifErrorAction = $action == 'add' ? 'create' : 'edit'; |
195 | - if ($action == 'add') $object->track_id = null; |
|
195 | + if ($action == 'add') { |
|
196 | + $object->track_id = null; |
|
197 | + } |
|
196 | 198 | $error = 0; |
197 | 199 | |
198 | 200 | $fieldsToCheck = [ |
@@ -344,7 +346,9 @@ discard block |
||
344 | 346 | $db->rollback(); |
345 | 347 | setEventMessages($object->error, $object->errors, 'errors'); |
346 | 348 | } |
347 | - } else $action = $ifErrorAction; |
|
349 | + } else { |
|
350 | + $action = $ifErrorAction; |
|
351 | + } |
|
348 | 352 | } |
349 | 353 | |
350 | 354 | // Mark as Read |
@@ -318,7 +318,7 @@ discard block |
||
318 | 318 | |
319 | 319 | if (!$error) { |
320 | 320 | // File transfer |
321 | - $object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was '' |
|
321 | + $object->copyFilesForTicket(''); // trackid is forced to '' because files were uploaded when no id for ticket exists yet and trackid was '' |
|
322 | 322 | } |
323 | 323 | } |
324 | 324 | if (!$error) { |
@@ -700,7 +700,7 @@ discard block |
||
700 | 700 | |
701 | 701 | print load_fiche_titre($langs->trans('NewTicket'), '', 'ticket'); |
702 | 702 | |
703 | - $formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
703 | + $formticket->trackid = ''; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
704 | 704 | $formticket->withfromsocid = $socid ? $socid : $user->socid; |
705 | 705 | $formticket->withfromcontactid = $contactid ? $contactid : ''; |
706 | 706 | $formticket->withtitletopic = 1; |
@@ -728,7 +728,7 @@ discard block |
||
728 | 728 | |
729 | 729 | print dol_get_fiche_head($head, 'tabTicket', $langs->trans('Ticket'), -1, 'ticket'); |
730 | 730 | |
731 | - $formticket->trackid = $object->track_id; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
731 | + $formticket->trackid = $object->track_id; // TODO Use a unique key 'tic' to avoid conflict in upload file feature |
|
732 | 732 | $formticket->withfromsocid = $object->socid; |
733 | 733 | $formticket->withtitletopic = 1; |
734 | 734 | // $formticket->withnotifytiersatcreate = ($notifyTiers ? 1 : (getDolGlobalString('TICKET_CHECK_NOTIFY_THIRDPARTY_AT_CREATION') ? 1 : 0)); |
@@ -873,9 +873,9 @@ discard block |
||
873 | 873 | } |
874 | 874 | |
875 | 875 | if (!$user->socid && getDolGlobalString('TICKET_LIMIT_VIEW_ASSIGNED_ONLY')) { |
876 | - $object->next_prev_filter = "te.fk_user_assign = " . ((int)$user->id); |
|
876 | + $object->next_prev_filter = "te.fk_user_assign = " . ((int) $user->id); |
|
877 | 877 | } elseif ($user->socid > 0) { |
878 | - $object->next_prev_filter = "te.fk_soc = " . ((int)$user->socid); |
|
878 | + $object->next_prev_filter = "te.fk_soc = " . ((int) $user->socid); |
|
879 | 879 | } |
880 | 880 | |
881 | 881 | $head = ticket_prepare_head($object); |