@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | */ |
259 | 259 | static function dol_shutdown() |
260 | 260 | { |
261 | - // global Globals::$conf, $user, Globals::$langs, $db; |
|
261 | + // global Globals::$conf, $user, Globals::$langs, $db; |
|
262 | 262 | $disconnectdone = false; |
263 | 263 | $depth = 0; |
264 | 264 | if (is_object($db) && !empty($db->connected)) { |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | */ |
306 | 306 | static function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $options = null, $noreplace = 0) |
307 | 307 | { |
308 | - // global $mysoc, $user, Globals::$conf; |
|
308 | + // global $mysoc, $user, Globals::$conf; |
|
309 | 309 | |
310 | 310 | if (empty($paramname)) |
311 | 311 | return 'BadFirstParameterForDolUtils::GETPOST'; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | elseif (!isset($_GET['sortfield'])) { // If we did a click on a field to sort, we do no apply default values. Same if option MAIN_ENABLE_DEFAULT_VALUES is not set |
365 | 365 | if (!empty($_GET['action']) && $_GET['action'] == 'create' && !isset($_GET[$paramname]) && !isset($_POST[$paramname])) { |
366 | 366 | // Search default value from $object->field |
367 | - // global $object; |
|
367 | + // global $object; |
|
368 | 368 | if (is_object($object) && isset($object->fields[$paramname]['default'])) { |
369 | 369 | $out = $object->fields[$paramname]['default']; |
370 | 370 | } |
@@ -707,7 +707,7 @@ discard block |
||
707 | 707 | */ |
708 | 708 | static function dol_include_once($relpath, $classname = '') |
709 | 709 | { |
710 | - // global Globals::$conf, Globals::$langs, $user, $mysoc; // Do not remove this. They must be defined for files we include. Other globals var must be retreived with $GLOBALS['var'] |
|
710 | + // global Globals::$conf, Globals::$langs, $user, $mysoc; // Do not remove this. They must be defined for files we include. Other globals var must be retreived with $GLOBALS['var'] |
|
711 | 711 | |
712 | 712 | $fullpath = dol_buildpath($relpath); |
713 | 713 | |
@@ -735,7 +735,7 @@ discard block |
||
735 | 735 | */ |
736 | 736 | static function dol_buildpath($path, $type = 0, $returnemptyifnotfound = 0) |
737 | 737 | { |
738 | - // global Globals::$conf; |
|
738 | + // global Globals::$conf; |
|
739 | 739 | |
740 | 740 | $path = preg_replace('/^\//', '', $path); |
741 | 741 | |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | foreach (Globals::$conf->file->dol_document_root as $key => $dirroot) { // ex: array(["main"]=>"/home/main/htdocs", ["alt0"]=>"/home/dirmod/htdocs", ...) |
778 | 778 | if ($key == 'main') { |
779 | 779 | if ($type == 3) { |
780 | - // global $dolibarr_main_url_root; |
|
780 | + // global $dolibarr_main_url_root; |
|
781 | 781 | // Define $urlwithroot |
782 | 782 | |
783 | 783 | // $urlwithouturlroot = preg_replace('/' . preg_quote(DOL_BASE_URI, '/') . '$/i', '', trim($dolibarr_main_url_root)); |
@@ -801,7 +801,7 @@ discard block |
||
801 | 801 | $res = (preg_match('/^http/i', Globals::$conf->file->dol_url_root[$key]) ? '' : DOL_MAIN_URL_ROOT) . Globals::$conf->file->dol_url_root[$key] . '/' . $path; |
802 | 802 | } |
803 | 803 | if ($type == 3) { |
804 | - // global $dolibarr_main_url_root; |
|
804 | + // global $dolibarr_main_url_root; |
|
805 | 805 | // Define $urlwithroot |
806 | 806 | $urlwithouturlroot = preg_replace('/' . preg_quote(DOL_BASE_URI, '/') . '$/i', '', trim($dolibarr_main_url_root)); |
807 | 807 | $urlwithroot = $urlwithouturlroot . DOL_BASE_URI; // This is to use external domain name found into config file |
@@ -1071,7 +1071,7 @@ discard block |
||
1071 | 1071 | */ |
1072 | 1072 | static function dol_syslog($message, $level = LOG_INFO, $ident = 0, $suffixinfilename = '', $restricttologhandler = '') |
1073 | 1073 | { |
1074 | - // global Globals::$conf, $user; |
|
1074 | + // global Globals::$conf, $user; |
|
1075 | 1075 | // If syslog module enabled |
1076 | 1076 | if (empty(Globals::$conf->syslog->enabled)) |
1077 | 1077 | return; |
@@ -1177,7 +1177,7 @@ discard block |
||
1177 | 1177 | */ |
1178 | 1178 | static function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab = 0, $picto = '', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '') |
1179 | 1179 | { |
1180 | - // global Globals::$conf, Globals::$langs, $hookmanager; |
|
1180 | + // global Globals::$conf, Globals::$langs, $hookmanager; |
|
1181 | 1181 | |
1182 | 1182 | $out = "\n" . '<div class="tabs" data-role="controlgroup" data-type="horizontal">' . "\n"; |
1183 | 1183 | |
@@ -1360,7 +1360,7 @@ discard block |
||
1360 | 1360 | */ |
1361 | 1361 | static function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldid = 'rowid', $fieldref = 'ref', $morehtmlref = '', $moreparam = '', $nodbprefix = 0, $morehtmlleft = '', $morehtmlstatus = '', $onlybanner = 0, $morehtmlright = '') |
1362 | 1362 | { |
1363 | - // global Globals::$conf, $form, $user, Globals::$langs; |
|
1363 | + // global Globals::$conf, $form, $user, Globals::$langs; |
|
1364 | 1364 | |
1365 | 1365 | $error = 0; |
1366 | 1366 | |
@@ -1639,7 +1639,7 @@ discard block |
||
1639 | 1639 | */ |
1640 | 1640 | static function fieldLabel($langkey, $fieldkey, $fieldrequired = 0) |
1641 | 1641 | { |
1642 | - // global Globals::$conf, Globals::$langs; |
|
1642 | + // global Globals::$conf, Globals::$langs; |
|
1643 | 1643 | $ret = ''; |
1644 | 1644 | if ($fieldrequired) |
1645 | 1645 | $ret .= '<span class="fieldrequired">'; |
@@ -1662,7 +1662,7 @@ discard block |
||
1662 | 1662 | */ |
1663 | 1663 | static function dol_bc($var, $moreclass = '') |
1664 | 1664 | { |
1665 | - // global $bc; |
|
1665 | + // global $bc; |
|
1666 | 1666 | $ret = ' ' . $bc[$var]; |
1667 | 1667 | if ($moreclass) |
1668 | 1668 | $ret = preg_replace('/class=\"/', 'class="' . $moreclass . ' ', $ret); |
@@ -1682,7 +1682,7 @@ discard block |
||
1682 | 1682 | */ |
1683 | 1683 | static function dol_format_address($object, $withcountry = 0, $sep = "\n", $outputlangs = '', $mode = 0) |
1684 | 1684 | { |
1685 | - // global Globals::$conf, Globals::$langs; |
|
1685 | + // global Globals::$conf, Globals::$langs; |
|
1686 | 1686 | |
1687 | 1687 | $ret = ''; |
1688 | 1688 | $countriesusingstate = array('AU', 'CA', 'US', 'IN', 'GB', 'ES', 'UK', 'TR'); // See also MAIN_FORCE_STATE_INTO_ADDRESS |
@@ -1773,7 +1773,7 @@ discard block |
||
1773 | 1773 | */ |
1774 | 1774 | static function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlangs = '', $encodetooutput = false) |
1775 | 1775 | { |
1776 | - // global Globals::$conf, Globals::$langs; |
|
1776 | + // global Globals::$conf, Globals::$langs; |
|
1777 | 1777 | // Clean parameters |
1778 | 1778 | $to_gmt = false; |
1779 | 1779 | $offsettz = $offsetdst = 0; |
@@ -1984,7 +1984,7 @@ discard block |
||
1984 | 1984 | */ |
1985 | 1985 | static function dol_getdate($timestamp, $fast = false) |
1986 | 1986 | { |
1987 | - // global Globals::$conf; |
|
1987 | + // global Globals::$conf; |
|
1988 | 1988 | |
1989 | 1989 | $usealternatemethod = false; |
1990 | 1990 | if ($timestamp <= 0) |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | */ |
2023 | 2023 | static function dol_mktime($hour, $minute, $second, $month, $day, $year, $gm = false, $check = 1) |
2024 | 2024 | { |
2025 | - // global Globals::$conf; |
|
2025 | + // global Globals::$conf; |
|
2026 | 2026 | //print "- ".$hour.",".$minute.",".$second.",".$month.",".$day.",".$year.",".$_SERVER["WINDIR"]." -"; |
2027 | 2027 | // Clean parameters |
2028 | 2028 | if ($hour == -1 || empty($hour)) |
@@ -2134,7 +2134,7 @@ discard block |
||
2134 | 2134 | */ |
2135 | 2135 | static function dol_print_size($size, $shortvalue = 0, $shortunit = 0) |
2136 | 2136 | { |
2137 | - // global Globals::$conf, Globals::$langs; |
|
2137 | + // global Globals::$conf, Globals::$langs; |
|
2138 | 2138 | $level = 1024; |
2139 | 2139 | |
2140 | 2140 | if (!empty(Globals::$conf->dol_optimize_smallscreen)) |
@@ -2171,7 +2171,7 @@ discard block |
||
2171 | 2171 | */ |
2172 | 2172 | static function dol_print_url($url, $target = '_blank', $max = 32, $withpicto = 0) |
2173 | 2173 | { |
2174 | - // global Globals::$langs; |
|
2174 | + // global Globals::$langs; |
|
2175 | 2175 | |
2176 | 2176 | if (empty($url)) |
2177 | 2177 | return ''; |
@@ -2205,7 +2205,7 @@ discard block |
||
2205 | 2205 | */ |
2206 | 2206 | static function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, $showinvalid = 1, $withpicto = 0) |
2207 | 2207 | { |
2208 | - // global Globals::$conf, $user, Globals::$langs, $hookmanager; |
|
2208 | + // global Globals::$conf, $user, Globals::$langs, $hookmanager; |
|
2209 | 2209 | |
2210 | 2210 | $newemail = $email; |
2211 | 2211 | |
@@ -2262,7 +2262,7 @@ discard block |
||
2262 | 2262 | */ |
2263 | 2263 | static function dol_print_socialnetworks($value, $cid, $socid, $type) |
2264 | 2264 | { |
2265 | - // global Globals::$conf, $user, Globals::$langs; |
|
2265 | + // global Globals::$conf, $user, Globals::$langs; |
|
2266 | 2266 | |
2267 | 2267 | $newskype = $value; |
2268 | 2268 | |
@@ -2317,7 +2317,7 @@ discard block |
||
2317 | 2317 | */ |
2318 | 2318 | static function dol_print_phone($phone, $countrycode = '', $cid = 0, $socid = 0, $addlink = '', $separ = " ", $withpicto = '', $titlealt = '', $adddivfloat = 0) |
2319 | 2319 | { |
2320 | - // global Globals::$conf, $user, Globals::$langs, $mysoc, $hookmanager; |
|
2320 | + // global Globals::$conf, $user, Globals::$langs, $mysoc, $hookmanager; |
|
2321 | 2321 | // Clean phone parameter |
2322 | 2322 | $phone = preg_replace("/[\s.-]/", "", trim($phone)); |
2323 | 2323 | if (empty($phone)) { |
@@ -2581,7 +2581,7 @@ discard block |
||
2581 | 2581 | */ |
2582 | 2582 | static function dol_print_ip($ip, $mode = 0) |
2583 | 2583 | { |
2584 | - // global Globals::$conf, Globals::$langs; |
|
2584 | + // global Globals::$conf, Globals::$langs; |
|
2585 | 2585 | |
2586 | 2586 | $ret = ''; |
2587 | 2587 | |
@@ -2626,7 +2626,7 @@ discard block |
||
2626 | 2626 | */ |
2627 | 2627 | static function dolGetCountryCodeFromIp($ip) |
2628 | 2628 | { |
2629 | - // global Globals::$conf; |
|
2629 | + // global Globals::$conf; |
|
2630 | 2630 | |
2631 | 2631 | $countrycode = ''; |
2632 | 2632 | |
@@ -2653,7 +2653,7 @@ discard block |
||
2653 | 2653 | */ |
2654 | 2654 | static function dol_user_country() |
2655 | 2655 | { |
2656 | - // global Globals::$conf, Globals::$langs, $user; |
|
2656 | + // global Globals::$conf, Globals::$langs, $user; |
|
2657 | 2657 | //$ret=$user->xxx; |
2658 | 2658 | $ret = ''; |
2659 | 2659 | if (!empty(Globals::$conf->geoipmaxmind->enabled)) { |
@@ -2683,7 +2683,7 @@ discard block |
||
2683 | 2683 | */ |
2684 | 2684 | static function dol_print_address($address, $htmlid, $mode, $id, $noprint = 0, $charfornl = '') |
2685 | 2685 | { |
2686 | - // global Globals::$conf, $user, Globals::$langs, $hookmanager; |
|
2686 | + // global Globals::$conf, $user, Globals::$langs, $hookmanager; |
|
2687 | 2687 | |
2688 | 2688 | $out = ''; |
2689 | 2689 | |
@@ -2815,7 +2815,7 @@ discard block |
||
2815 | 2815 | */ |
2816 | 2816 | static function dol_substr($string, $start, $length, $stringencoding = '', $trunconbytes = 0) |
2817 | 2817 | { |
2818 | - // global Globals::$langs; |
|
2818 | + // global Globals::$langs; |
|
2819 | 2819 | |
2820 | 2820 | if (empty($stringencoding)) |
2821 | 2821 | $stringencoding = Globals::$langs->charset_output; |
@@ -2852,7 +2852,7 @@ discard block |
||
2852 | 2852 | */ |
2853 | 2853 | static function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF-8', $nodot = 0, $display = 0) |
2854 | 2854 | { |
2855 | - // global Globals::$conf; |
|
2855 | + // global Globals::$conf; |
|
2856 | 2856 | |
2857 | 2857 | if ($size == 0 || !empty(Globals::$conf->global->MAIN_DISABLE_TRUNC)) |
2858 | 2858 | return $string; |
@@ -2918,7 +2918,7 @@ discard block |
||
2918 | 2918 | */ |
2919 | 2919 | static function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0, $alt = '', $morecss = '') |
2920 | 2920 | { |
2921 | - // global Globals::$conf, Globals::$langs; |
|
2921 | + // global Globals::$conf, Globals::$langs; |
|
2922 | 2922 | // We forge fullpathpicto for image to $path/img/$picto. By default, we take DOL_BASE_URI/theme/$conf->theme/img/$picto |
2923 | 2923 | //$url = DOL_BASE_URI; |
2924 | 2924 | $url = DOL_BASE_URI; |
@@ -3103,7 +3103,7 @@ discard block |
||
3103 | 3103 | */ |
3104 | 3104 | static function img_weather($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0) |
3105 | 3105 | { |
3106 | - // global Globals::$conf; |
|
3106 | + // global Globals::$conf; |
|
3107 | 3107 | |
3108 | 3108 | if (!preg_match('/(\.png|\.gif)$/i', $picto)) |
3109 | 3109 | $picto .= '.png'; |
@@ -3126,7 +3126,7 @@ discard block |
||
3126 | 3126 | */ |
3127 | 3127 | static function img_picto_common($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0) |
3128 | 3128 | { |
3129 | - // global Globals::$conf; |
|
3129 | + // global Globals::$conf; |
|
3130 | 3130 | |
3131 | 3131 | if (!preg_match('/(\.png|\.gif)$/i', $picto)) |
3132 | 3132 | $picto .= '.png'; |
@@ -3157,7 +3157,7 @@ discard block |
||
3157 | 3157 | */ |
3158 | 3158 | static function img_action($titlealt, $numaction) |
3159 | 3159 | { |
3160 | - // global Globals::$conf, Globals::$langs; |
|
3160 | + // global Globals::$conf, Globals::$langs; |
|
3161 | 3161 | |
3162 | 3162 | if (empty($titlealt) || $titlealt == 'default') { |
3163 | 3163 | if ($numaction == '-1' || $numaction == 'ST_NO') { |
@@ -3195,7 +3195,7 @@ discard block |
||
3195 | 3195 | */ |
3196 | 3196 | static function img_pdf($titlealt = 'default', $size = 3) |
3197 | 3197 | { |
3198 | - // global Globals::$conf, Globals::$langs; |
|
3198 | + // global Globals::$conf, Globals::$langs; |
|
3199 | 3199 | |
3200 | 3200 | if ($titlealt == 'default') |
3201 | 3201 | $titlealt = Globals::$langs->trans('Show'); |
@@ -3212,7 +3212,7 @@ discard block |
||
3212 | 3212 | */ |
3213 | 3213 | static function img_edit_add($titlealt = 'default', $other = '') |
3214 | 3214 | { |
3215 | - // global Globals::$conf, Globals::$langs; |
|
3215 | + // global Globals::$conf, Globals::$langs; |
|
3216 | 3216 | |
3217 | 3217 | if ($titlealt == 'default') |
3218 | 3218 | $titlealt = Globals::$langs->trans('Add'); |
@@ -3229,7 +3229,7 @@ discard block |
||
3229 | 3229 | */ |
3230 | 3230 | static function img_edit_remove($titlealt = 'default', $other = '') |
3231 | 3231 | { |
3232 | - // global Globals::$conf, Globals::$langs; |
|
3232 | + // global Globals::$conf, Globals::$langs; |
|
3233 | 3233 | |
3234 | 3234 | if ($titlealt == 'default') |
3235 | 3235 | $titlealt = Globals::$langs->trans('Remove'); |
@@ -3247,7 +3247,7 @@ discard block |
||
3247 | 3247 | */ |
3248 | 3248 | static function img_edit($titlealt = 'default', $float = 0, $other = 'class="pictoedit"') |
3249 | 3249 | { |
3250 | - // global Globals::$conf, Globals::$langs; |
|
3250 | + // global Globals::$conf, Globals::$langs; |
|
3251 | 3251 | |
3252 | 3252 | if ($titlealt == 'default') |
3253 | 3253 | $titlealt = Globals::$langs->trans('Modify'); |
@@ -3265,7 +3265,7 @@ discard block |
||
3265 | 3265 | */ |
3266 | 3266 | static function img_view($titlealt = 'default', $float = 0, $other = '') |
3267 | 3267 | { |
3268 | - // global Globals::$conf, Globals::$langs; |
|
3268 | + // global Globals::$conf, Globals::$langs; |
|
3269 | 3269 | |
3270 | 3270 | if ($titlealt == 'default') |
3271 | 3271 | $titlealt = Globals::$langs->trans('View'); |
@@ -3284,7 +3284,7 @@ discard block |
||
3284 | 3284 | */ |
3285 | 3285 | static function img_delete($titlealt = 'default', $other = 'class="pictodelete"') |
3286 | 3286 | { |
3287 | - // global Globals::$conf, Globals::$langs; |
|
3287 | + // global Globals::$conf, Globals::$langs; |
|
3288 | 3288 | |
3289 | 3289 | if ($titlealt == 'default') |
3290 | 3290 | $titlealt = Globals::$langs->trans('Delete'); |
@@ -3302,7 +3302,7 @@ discard block |
||
3302 | 3302 | */ |
3303 | 3303 | static function img_printer($titlealt = "default", $other = '') |
3304 | 3304 | { |
3305 | - // global Globals::$conf, Globals::$langs; |
|
3305 | + // global Globals::$conf, Globals::$langs; |
|
3306 | 3306 | if ($titlealt == "default") |
3307 | 3307 | $titlealt = Globals::$langs->trans("Print"); |
3308 | 3308 | return img_picto($titlealt, 'printer.png', $other); |
@@ -3317,7 +3317,7 @@ discard block |
||
3317 | 3317 | */ |
3318 | 3318 | static function img_split($titlealt = 'default', $other = 'class="pictosplit"') |
3319 | 3319 | { |
3320 | - // global Globals::$conf, Globals::$langs; |
|
3320 | + // global Globals::$conf, Globals::$langs; |
|
3321 | 3321 | |
3322 | 3322 | if ($titlealt == 'default') |
3323 | 3323 | $titlealt = Globals::$langs->trans('Split'); |
@@ -3334,7 +3334,7 @@ discard block |
||
3334 | 3334 | */ |
3335 | 3335 | static function img_help($usehelpcursor = 1, $usealttitle = 1) |
3336 | 3336 | { |
3337 | - // global Globals::$conf, Globals::$langs; |
|
3337 | + // global Globals::$conf, Globals::$langs; |
|
3338 | 3338 | |
3339 | 3339 | if ($usealttitle) { |
3340 | 3340 | if (is_string($usealttitle)) |
@@ -3354,7 +3354,7 @@ discard block |
||
3354 | 3354 | */ |
3355 | 3355 | static function img_info($titlealt = 'default') |
3356 | 3356 | { |
3357 | - // global Globals::$conf, Globals::$langs; |
|
3357 | + // global Globals::$conf, Globals::$langs; |
|
3358 | 3358 | |
3359 | 3359 | if ($titlealt == 'default') |
3360 | 3360 | $titlealt = Globals::$langs->trans('Informations'); |
@@ -3371,7 +3371,7 @@ discard block |
||
3371 | 3371 | */ |
3372 | 3372 | static function img_warning($titlealt = 'default', $moreatt = '') |
3373 | 3373 | { |
3374 | - // global Globals::$conf, Globals::$langs; |
|
3374 | + // global Globals::$conf, Globals::$langs; |
|
3375 | 3375 | |
3376 | 3376 | if ($titlealt == 'default') |
3377 | 3377 | $titlealt = Globals::$langs->trans('Warning'); |
@@ -3388,7 +3388,7 @@ discard block |
||
3388 | 3388 | */ |
3389 | 3389 | static function img_error($titlealt = 'default') |
3390 | 3390 | { |
3391 | - // global Globals::$conf, Globals::$langs; |
|
3391 | + // global Globals::$conf, Globals::$langs; |
|
3392 | 3392 | |
3393 | 3393 | if ($titlealt == 'default') |
3394 | 3394 | $titlealt = Globals::$langs->trans('Error'); |
@@ -3405,7 +3405,7 @@ discard block |
||
3405 | 3405 | */ |
3406 | 3406 | static function img_next($titlealt = 'default', $moreatt = '') |
3407 | 3407 | { |
3408 | - // global Globals::$conf, Globals::$langs; |
|
3408 | + // global Globals::$conf, Globals::$langs; |
|
3409 | 3409 | |
3410 | 3410 | if ($titlealt == 'default') |
3411 | 3411 | $titlealt = Globals::$langs->trans('Next'); |
@@ -3423,7 +3423,7 @@ discard block |
||
3423 | 3423 | */ |
3424 | 3424 | static function img_previous($titlealt = 'default', $moreatt = '') |
3425 | 3425 | { |
3426 | - // global Globals::$conf, Globals::$langs; |
|
3426 | + // global Globals::$conf, Globals::$langs; |
|
3427 | 3427 | |
3428 | 3428 | if ($titlealt == 'default') |
3429 | 3429 | $titlealt = Globals::$langs->trans('Previous'); |
@@ -3442,7 +3442,7 @@ discard block |
||
3442 | 3442 | */ |
3443 | 3443 | static function img_down($titlealt = 'default', $selected = 0, $moreclass = '') |
3444 | 3444 | { |
3445 | - // global Globals::$conf, Globals::$langs; |
|
3445 | + // global Globals::$conf, Globals::$langs; |
|
3446 | 3446 | |
3447 | 3447 | if ($titlealt == 'default') |
3448 | 3448 | $titlealt = Globals::$langs->trans('Down'); |
@@ -3460,7 +3460,7 @@ discard block |
||
3460 | 3460 | */ |
3461 | 3461 | static function img_up($titlealt = 'default', $selected = 0, $moreclass = '') |
3462 | 3462 | { |
3463 | - // global Globals::$conf, Globals::$langs; |
|
3463 | + // global Globals::$conf, Globals::$langs; |
|
3464 | 3464 | |
3465 | 3465 | if ($titlealt == 'default') |
3466 | 3466 | $titlealt = Globals::$langs->trans('Up'); |
@@ -3478,7 +3478,7 @@ discard block |
||
3478 | 3478 | */ |
3479 | 3479 | static function img_left($titlealt = 'default', $selected = 0, $moreatt = '') |
3480 | 3480 | { |
3481 | - // global Globals::$conf, Globals::$langs; |
|
3481 | + // global Globals::$conf, Globals::$langs; |
|
3482 | 3482 | |
3483 | 3483 | if ($titlealt == 'default') |
3484 | 3484 | $titlealt = Globals::$langs->trans('Left'); |
@@ -3496,7 +3496,7 @@ discard block |
||
3496 | 3496 | */ |
3497 | 3497 | static function img_right($titlealt = 'default', $selected = 0, $moreatt = '') |
3498 | 3498 | { |
3499 | - // global Globals::$conf, Globals::$langs; |
|
3499 | + // global Globals::$conf, Globals::$langs; |
|
3500 | 3500 | |
3501 | 3501 | if ($titlealt == 'default') |
3502 | 3502 | $titlealt = Globals::$langs->trans('Right'); |
@@ -3513,7 +3513,7 @@ discard block |
||
3513 | 3513 | */ |
3514 | 3514 | static function img_allow($allow, $titlealt = 'default') |
3515 | 3515 | { |
3516 | - // global Globals::$conf, Globals::$langs; |
|
3516 | + // global Globals::$conf, Globals::$langs; |
|
3517 | 3517 | |
3518 | 3518 | if ($titlealt == 'default') |
3519 | 3519 | $titlealt = Globals::$langs->trans('Active'); |
@@ -3610,7 +3610,7 @@ discard block |
||
3610 | 3610 | */ |
3611 | 3611 | static function img_search($titlealt = 'default', $other = '') |
3612 | 3612 | { |
3613 | - // global Globals::$conf, Globals::$langs; |
|
3613 | + // global Globals::$conf, Globals::$langs; |
|
3614 | 3614 | |
3615 | 3615 | if ($titlealt == 'default') |
3616 | 3616 | $titlealt = Globals::$langs->trans('Search'); |
@@ -3632,7 +3632,7 @@ discard block |
||
3632 | 3632 | */ |
3633 | 3633 | static function img_searchclear($titlealt = 'default', $other = '') |
3634 | 3634 | { |
3635 | - // global Globals::$conf, Globals::$langs; |
|
3635 | + // global Globals::$conf, Globals::$langs; |
|
3636 | 3636 | |
3637 | 3637 | if ($titlealt == 'default') |
3638 | 3638 | $titlealt = Globals::$langs->trans('Search'); |
@@ -3657,7 +3657,7 @@ discard block |
||
3657 | 3657 | */ |
3658 | 3658 | static function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = '') |
3659 | 3659 | { |
3660 | - // global Globals::$conf, Globals::$langs; |
|
3660 | + // global Globals::$conf, Globals::$langs; |
|
3661 | 3661 | |
3662 | 3662 | if ($infoonimgalt) { |
3663 | 3663 | return img_picto($text, 'info', 'class="hideonsmartphone' . ($morecss ? ' ' . $morecss : '') . '"'); |
@@ -3680,7 +3680,7 @@ discard block |
||
3680 | 3680 | */ |
3681 | 3681 | static function dol_print_error($db = '', $error = '', $errors = null) |
3682 | 3682 | { |
3683 | - // global Globals::$conf, Globals::$langs, $argv; |
|
3683 | + // global Globals::$conf, Globals::$langs, $argv; |
|
3684 | 3684 | // global $dolibarr_main_prod; |
3685 | 3685 | |
3686 | 3686 | $out = ''; |
@@ -3799,7 +3799,7 @@ discard block |
||
3799 | 3799 | */ |
3800 | 3800 | static function dol_print_error_email($prefixcode, $errormessage = '', $errormessages = array(), $morecss = 'error', $email = '') |
3801 | 3801 | { |
3802 | - // global Globals::$langs, Globals::$conf; |
|
3802 | + // global Globals::$langs, Globals::$conf; |
|
3803 | 3803 | |
3804 | 3804 | if (empty($email)) |
3805 | 3805 | $email = Globals::$conf->global->MAIN_INFO_SOCIETE_MAIL; |
@@ -3858,7 +3858,7 @@ discard block |
||
3858 | 3858 | */ |
3859 | 3859 | static function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $disablesortlink = 0, $tooltip = '') |
3860 | 3860 | { |
3861 | - // global Globals::$conf, Globals::$langs, $form; |
|
3861 | + // global Globals::$conf, Globals::$langs, $form; |
|
3862 | 3862 | //print "$name, $file, $field, $begin, $options, $moreattrib, $sortfield, $sortorder<br>\n"; |
3863 | 3863 | |
3864 | 3864 | $sortorder = strtoupper($sortorder); |
@@ -3997,7 +3997,7 @@ discard block |
||
3997 | 3997 | */ |
3998 | 3998 | static function load_fiche_titre($titre, $morehtmlright = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $id = '', $morecssontable = '', $morehtmlcenter = '') |
3999 | 3999 | { |
4000 | - // global Globals::$conf; |
|
4000 | + // global Globals::$conf; |
|
4001 | 4001 | |
4002 | 4002 | $return = ''; |
4003 | 4003 | |
@@ -4047,7 +4047,7 @@ discard block |
||
4047 | 4047 | */ |
4048 | 4048 | static function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '', $sortorder = '', $morehtmlcenter = '', $num = -1, $totalnboflines = '', $picto = 'title_generic.png', $pictoisfullpath = 0, $morehtmlright = '', $morecss = '', $limit = -1, $hideselectlimit = 0, $hidenavigation = 0) |
4049 | 4049 | { |
4050 | - // global Globals::$conf, Globals::$langs; |
|
4050 | + // global Globals::$conf, Globals::$langs; |
|
4051 | 4051 | |
4052 | 4052 | $savlimit = $limit; |
4053 | 4053 | $savtotalnboflines = $totalnboflines; |
@@ -4160,7 +4160,7 @@ discard block |
||
4160 | 4160 | */ |
4161 | 4161 | static function print_fleche_navigation($page, $file, $options = '', $nextpage = 0, $betweenarrows = '', $afterarrows = '', $limit = -1, $totalnboflines = 0, $hideselectlimit = 0) |
4162 | 4162 | { |
4163 | - // global Globals::$conf, Globals::$langs; |
|
4163 | + // global Globals::$conf, Globals::$langs; |
|
4164 | 4164 | |
4165 | 4165 | print '<div class="pagination"><ul>'; |
4166 | 4166 | if ((int) $limit >= 0 && empty($hideselectlimit)) { |
@@ -4283,7 +4283,7 @@ discard block |
||
4283 | 4283 | */ |
4284 | 4284 | static function price($amount, $form = 0, $outlangs = '', $trunc = 1, $rounding = -1, $forcerounding = -1, $currency_code = '') |
4285 | 4285 | { |
4286 | - // global Globals::$langs, Globals::$conf; |
|
4286 | + // global Globals::$langs, Globals::$conf; |
|
4287 | 4287 | // Clean parameters |
4288 | 4288 | if (empty($amount)) |
4289 | 4289 | $amount = 0; // To have a numeric value if amount not defined or = '' |
@@ -4376,7 +4376,7 @@ discard block |
||
4376 | 4376 | */ |
4377 | 4377 | static function price2num($amount, $rounding = '', $alreadysqlnb = 0) |
4378 | 4378 | { |
4379 | - // global Globals::$langs, Globals::$conf; |
|
4379 | + // global Globals::$langs, Globals::$conf; |
|
4380 | 4380 | // Round PHP static function does not allow number like '1,234.56' nor '1.234,56' nor '1 234,56' |
4381 | 4381 | // Numbers must be '1234.56' |
4382 | 4382 | // Decimal delimiter for PHP and database SQL requests must be '.' |
@@ -4499,7 +4499,7 @@ discard block |
||
4499 | 4499 | */ |
4500 | 4500 | static function get_localtax($vatrate, $local, $thirdparty_buyer = "", $thirdparty_seller = "", $vatnpr = 0) |
4501 | 4501 | { |
4502 | - // global $db, Globals::$conf, $mysoc; |
|
4502 | + // global $db, Globals::$conf, $mysoc; |
|
4503 | 4503 | |
4504 | 4504 | if (empty($thirdparty_seller) || !is_object($thirdparty_seller)) |
4505 | 4505 | $thirdparty_seller = $mysoc; |
@@ -4639,7 +4639,7 @@ discard block |
||
4639 | 4639 | */ |
4640 | 4640 | static function get_localtax_by_third($local) |
4641 | 4641 | { |
4642 | - // global $db, $mysoc; |
|
4642 | + // global $db, $mysoc; |
|
4643 | 4643 | $sql = "SELECT t.localtax1, t.localtax2 "; |
4644 | 4644 | $sql .= " FROM " . MAIN_DB_PREFIX . "c_tva as t inner join " . MAIN_DB_PREFIX . "c_country as c ON c.rowid=t.fk_pays"; |
4645 | 4645 | $sql .= " WHERE c.code = '" . $mysoc->country_code . "' AND t.active = 1 AND t.taux=("; |
@@ -4672,7 +4672,7 @@ discard block |
||
4672 | 4672 | */ |
4673 | 4673 | static function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid = 1) |
4674 | 4674 | { |
4675 | - // global $db, $mysoc; |
|
4675 | + // global $db, $mysoc; |
|
4676 | 4676 | |
4677 | 4677 | DolUtils::dol_syslog("getTaxesFromId vat id or rate = " . $vatrate); |
4678 | 4678 | |
@@ -4729,7 +4729,7 @@ discard block |
||
4729 | 4729 | */ |
4730 | 4730 | static function getLocalTaxesFromRate($vatrate, $local, $buyer, $seller, $firstparamisid = 0) |
4731 | 4731 | { |
4732 | - // global $db, $mysoc; |
|
4732 | + // global $db, $mysoc; |
|
4733 | 4733 | |
4734 | 4734 | DolUtils::dol_syslog("getLocalTaxesFromRate vatrate=" . $vatrate . " local=" . $local); |
4735 | 4735 | |
@@ -4783,7 +4783,7 @@ discard block |
||
4783 | 4783 | */ |
4784 | 4784 | static function get_product_vat_for_country($idprod, $thirdparty_seller, $idprodfournprice = 0) |
4785 | 4785 | { |
4786 | - // global $db, Globals::$conf, $mysoc; |
|
4786 | + // global $db, Globals::$conf, $mysoc; |
|
4787 | 4787 | |
4788 | 4788 | require_once DOL_BASE_PATH . '/product/class/product.class.php'; |
4789 | 4789 | |
@@ -4854,7 +4854,7 @@ discard block |
||
4854 | 4854 | */ |
4855 | 4855 | static function get_product_localtax_for_country($idprod, $local, $thirdparty_seller) |
4856 | 4856 | { |
4857 | - // global $db, $mysoc; |
|
4857 | + // global $db, $mysoc; |
|
4858 | 4858 | |
4859 | 4859 | if (!class_exists('Product')) { |
4860 | 4860 | require_once DOL_BASE_PATH . 'product/class/product.class.php'; |
@@ -4922,7 +4922,7 @@ discard block |
||
4922 | 4922 | */ |
4923 | 4923 | static function get_default_tva(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) |
4924 | 4924 | { |
4925 | - // global Globals::$conf; |
|
4925 | + // global Globals::$conf; |
|
4926 | 4926 | |
4927 | 4927 | require_once DOL_BASE_PATH . '/core/lib/company.lib.php'; |
4928 | 4928 | |
@@ -4997,7 +4997,7 @@ discard block |
||
4997 | 4997 | */ |
4998 | 4998 | static function get_default_npr(Societe $thirdparty_seller, Societe $thirdparty_buyer, $idprod = 0, $idprodfournprice = 0) |
4999 | 4999 | { |
5000 | - // global $db; |
|
5000 | + // global $db; |
|
5001 | 5001 | |
5002 | 5002 | if ($idprodfournprice > 0) { |
5003 | 5003 | if (!class_exists('ProductFournisseur')) |
@@ -5032,7 +5032,7 @@ discard block |
||
5032 | 5032 | */ |
5033 | 5033 | static function get_default_localtax($thirdparty_seller, $thirdparty_buyer, $local, $idprod = 0) |
5034 | 5034 | { |
5035 | - // global $mysoc; |
|
5035 | + // global $mysoc; |
|
5036 | 5036 | |
5037 | 5037 | if (!is_object($thirdparty_seller)) |
5038 | 5038 | return -1; |
@@ -5077,7 +5077,7 @@ discard block |
||
5077 | 5077 | */ |
5078 | 5078 | static function yn($yesno, $case = 1, $color = 0) |
5079 | 5079 | { |
5080 | - // global Globals::$langs; |
|
5080 | + // global Globals::$langs; |
|
5081 | 5081 | $result = 'unknown'; |
5082 | 5082 | $classname = ''; |
5083 | 5083 | if ($yesno == 1 || strtolower($yesno) == 'yes' || strtolower($yesno) == 'true') { // A mettre avant test sur no a cause du == 0 |
@@ -5127,7 +5127,7 @@ discard block |
||
5127 | 5127 | */ |
5128 | 5128 | static function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart) |
5129 | 5129 | { |
5130 | - // global Globals::$conf; |
|
5130 | + // global Globals::$conf; |
|
5131 | 5131 | |
5132 | 5132 | $path = ''; |
5133 | 5133 | |
@@ -5175,7 +5175,7 @@ discard block |
||
5175 | 5175 | */ |
5176 | 5176 | static function dol_mkdir($dir, $dataroot = '', $newmask = null) |
5177 | 5177 | { |
5178 | - // global Globals::$conf; |
|
5178 | + // global Globals::$conf; |
|
5179 | 5179 | |
5180 | 5180 | DolUtils::dol_syslog("functions.lib::dol_mkdir: dir=" . $dir, LOG_INFO); |
5181 | 5181 | |
@@ -5722,7 +5722,7 @@ discard block |
||
5722 | 5722 | */ |
5723 | 5723 | static function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, $object = null) |
5724 | 5724 | { |
5725 | - // global $db, Globals::$conf, $mysoc, $user, $extrafields; |
|
5725 | + // global $db, Globals::$conf, $mysoc, $user, $extrafields; |
|
5726 | 5726 | |
5727 | 5727 | $substitutionarray = array(); |
5728 | 5728 | |
@@ -6028,7 +6028,7 @@ discard block |
||
6028 | 6028 | */ |
6029 | 6029 | static function make_substitutions($text, $substitutionarray, $outputlangs = null) |
6030 | 6030 | { |
6031 | - // global Globals::$conf, Globals::$langs; |
|
6031 | + // global Globals::$conf, Globals::$langs; |
|
6032 | 6032 | |
6033 | 6033 | if (!is_array($substitutionarray)) |
6034 | 6034 | return 'ErrorBadParameterSubstitutionArrayWhenCalling_make_substitutions'; |
@@ -6094,7 +6094,7 @@ discard block |
||
6094 | 6094 | */ |
6095 | 6095 | static function complete_substitutions_array(&$substitutionarray, $outputlangs, $object = null, $parameters = null, $callfunc = "completesubstitutionarray") |
6096 | 6096 | { |
6097 | - // global Globals::$conf, $user; |
|
6097 | + // global Globals::$conf, $user; |
|
6098 | 6098 | |
6099 | 6099 | require_once DOL_BASE_PATH . '/core/lib/files.lib.php'; |
6100 | 6100 | |
@@ -6164,7 +6164,7 @@ discard block |
||
6164 | 6164 | */ |
6165 | 6165 | static function get_date_range($date_start, $date_end, $format = '', $outputlangs = '', $withparenthesis = 1) |
6166 | 6166 | { |
6167 | - // global Globals::$langs; |
|
6167 | + // global Globals::$langs; |
|
6168 | 6168 | |
6169 | 6169 | $out = ''; |
6170 | 6170 | |
@@ -6194,7 +6194,7 @@ discard block |
||
6194 | 6194 | */ |
6195 | 6195 | static function dolGetFirstLastname($firstname, $lastname, $nameorder = -1) |
6196 | 6196 | { |
6197 | - // global Globals::$conf; |
|
6197 | + // global Globals::$conf; |
|
6198 | 6198 | |
6199 | 6199 | $ret = ''; |
6200 | 6200 | // If order not defined, we use the setup |
@@ -6318,7 +6318,7 @@ discard block |
||
6318 | 6318 | */ |
6319 | 6319 | static function get_htmloutput_mesg($mesgstring = '', $mesgarray = '', $style = 'ok', $keepembedded = 0) |
6320 | 6320 | { |
6321 | - // global Globals::$conf, Globals::$langs; |
|
6321 | + // global Globals::$conf, Globals::$langs; |
|
6322 | 6322 | |
6323 | 6323 | $ret = 0; |
6324 | 6324 | $return = ''; |
@@ -6554,7 +6554,7 @@ discard block |
||
6554 | 6554 | */ |
6555 | 6555 | function dol_osencode($str) |
6556 | 6556 | { |
6557 | - // global Globals::$conf; |
|
6557 | + // global Globals::$conf; |
|
6558 | 6558 | |
6559 | 6559 | $tmp = ini_get("unicode.filesystem_encoding"); // Disponible avec PHP 6.0 |
6560 | 6560 | if (empty($tmp) && !empty($_SERVER["WINDIR"])) |
@@ -6584,7 +6584,7 @@ discard block |
||
6584 | 6584 | */ |
6585 | 6585 | static function dol_getIdFromCode($db, $key, $tablename, $fieldkey = 'code', $fieldid = 'id', $entityfilter = 0) |
6586 | 6586 | { |
6587 | - // global $cache_codes; |
|
6587 | + // global $cache_codes; |
|
6588 | 6588 | // If key empty |
6589 | 6589 | if ($key == '') |
6590 | 6590 | return ''; |
@@ -6625,7 +6625,7 @@ discard block |
||
6625 | 6625 | */ |
6626 | 6626 | static function verifCond($strRights) |
6627 | 6627 | { |
6628 | - // global $user, Globals::$conf, Globals::$langs; |
|
6628 | + // global $user, Globals::$conf, Globals::$langs; |
|
6629 | 6629 | // global $leftmenu; |
6630 | 6630 | // global $rights; // To export to dol_eval function |
6631 | 6631 | //print $strRights."<br>\n"; |
@@ -6691,7 +6691,7 @@ discard block |
||
6691 | 6691 | */ |
6692 | 6692 | static function picto_from_langcode($codelang, $moreatt = '') |
6693 | 6693 | { |
6694 | - // global Globals::$langs; |
|
6694 | + // global Globals::$langs; |
|
6695 | 6695 | |
6696 | 6696 | if (empty($codelang)) |
6697 | 6697 | return ''; |
@@ -6726,7 +6726,7 @@ discard block |
||
6726 | 6726 | */ |
6727 | 6727 | static function getLanguageCodeFromCountryCode($countrycode) |
6728 | 6728 | { |
6729 | - // global $mysoc; |
|
6729 | + // global $mysoc; |
|
6730 | 6730 | |
6731 | 6731 | if (strtoupper($countrycode) == 'MQ') |
6732 | 6732 | return 'fr_CA'; |
@@ -6960,7 +6960,7 @@ discard block |
||
6960 | 6960 | */ |
6961 | 6961 | static function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode = 'add') |
6962 | 6962 | { |
6963 | - // global $hookmanager; |
|
6963 | + // global $hookmanager; |
|
6964 | 6964 | |
6965 | 6965 | if (isset(Globals::$conf->modules_parts['tabs'][$type]) && is_array(Globals::$conf->modules_parts['tabs'][$type])) { |
6966 | 6966 | foreach (Globals::$conf->modules_parts['tabs'][$type] as $value) { |
@@ -7049,7 +7049,7 @@ discard block |
||
7049 | 7049 | */ |
7050 | 7050 | static function printCommonFooter($zone = 'private') |
7051 | 7051 | { |
7052 | - // global Globals::$conf, $hookmanager, $user; |
|
7052 | + // global Globals::$conf, $hookmanager, $user; |
|
7053 | 7053 | // global $action; |
7054 | 7054 | // global $micro_start_time; |
7055 | 7055 | |
@@ -7289,7 +7289,7 @@ discard block |
||
7289 | 7289 | */ |
7290 | 7290 | static function natural_search($fields, $value, $mode = 0, $nofirstand = 0) |
7291 | 7291 | { |
7292 | - // global $db, Globals::$langs; |
|
7292 | + // global $db, Globals::$langs; |
|
7293 | 7293 | |
7294 | 7294 | $value = trim($value); |
7295 | 7295 | |
@@ -7422,7 +7422,7 @@ discard block |
||
7422 | 7422 | */ |
7423 | 7423 | static function showDirectDownloadLink($object) |
7424 | 7424 | { |
7425 | - // global Globals::$conf, Globals::$langs; |
|
7425 | + // global Globals::$conf, Globals::$langs; |
|
7426 | 7426 | |
7427 | 7427 | $out = ''; |
7428 | 7428 | $url = $object->getLastMainDocLink($object->element); |
@@ -7484,7 +7484,7 @@ discard block |
||
7484 | 7484 | */ |
7485 | 7485 | static function getAdvancedPreviewUrl($modulepart, $relativepath, $alldata = 0, $param = '') |
7486 | 7486 | { |
7487 | - // global Globals::$conf, Globals::$langs; |
|
7487 | + // global Globals::$conf, Globals::$langs; |
|
7488 | 7488 | |
7489 | 7489 | if (empty(Globals::$conf->use_javascript_ajax)) |
7490 | 7490 | return ''; |
@@ -7517,7 +7517,7 @@ discard block |
||
7517 | 7517 | */ |
7518 | 7518 | static function ajax_autoselect($htmlname, $addlink = '') |
7519 | 7519 | { |
7520 | - // global Globals::$langs; |
|
7520 | + // global Globals::$langs; |
|
7521 | 7521 | $out = '<script type="text/javascript"> |
7522 | 7522 | jQuery(document).ready(static function () { |
7523 | 7523 | jQuery("#' . $htmlname . '").click(function() { jQuery(this).select(); } ); |
@@ -7901,7 +7901,7 @@ discard block |
||
7901 | 7901 | */ |
7902 | 7902 | static function getDictvalue($tablename, $field, $id, $checkentity = false, $rowidfield = 'rowid') |
7903 | 7903 | { |
7904 | - // global $dictvalues, $db, Globals::$langs; |
|
7904 | + // global $dictvalues, $db, Globals::$langs; |
|
7905 | 7905 | |
7906 | 7906 | if (!isset($dictvalues[$tablename])) { |
7907 | 7907 | $dictvalues[$tablename] = array(); |
@@ -7969,7 +7969,7 @@ discard block |
||
7969 | 7969 | */ |
7970 | 7970 | static function isVisibleToUserType($type_user, &$menuentry, &$listofmodulesforexternal) |
7971 | 7971 | { |
7972 | - // global Globals::$conf; |
|
7972 | + // global Globals::$conf; |
|
7973 | 7973 | //print 'type_user='.$type_user.' module='.$menuentry['module'].' enabled='.$menuentry['enabled'].' perms='.$menuentry['perms']; |
7974 | 7974 | //print 'ok='.in_array($menuentry['module'], $listofmodulesforexternal); |
7975 | 7975 | if (empty($menuentry['enabled'])) |