1
|
|
|
<?php |
2
|
|
|
/* |
3
|
|
|
You may not change or alter any portion of this comment or credits |
4
|
|
|
of supporting developers from this source code or any supporting source code |
5
|
|
|
which is considered copyrighted (c) material of the original comment or credit authors. |
6
|
|
|
|
7
|
|
|
This program is distributed in the hope that it will be useful, |
8
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
9
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
/** |
13
|
|
|
* Xoops locale |
14
|
|
|
* |
15
|
|
|
* @copyright (c) 2000-2020 XOOPS Project (www.xoops.org) |
16
|
|
|
* @license GNU GPL 2 (https://www.gnu.org/licenses/gpl-2.0.html) |
17
|
|
|
* @package kernel |
18
|
|
|
* @since 2.3.0 |
19
|
|
|
* @author Taiwen Jiang <[email protected]> |
20
|
|
|
* @todo To be handled by i18n/l10n |
21
|
|
|
*/ |
22
|
|
|
defined('XOOPS_ROOT_PATH') || exit('Restricted access'); |
23
|
|
|
|
24
|
|
|
setlocale(LC_ALL, 'en_US'); |
25
|
|
|
|
26
|
|
|
// !!IMPORTANT!! insert '\' before any char among reserved chars: "a","A","B","c","d","D","e","F","g","G","h","H","i","I","j","l","L","m","M","n","O","r","s","S","t","T","U","w","W","Y","y","z","Z" |
27
|
|
|
// insert double '\' before 't','r','n' |
28
|
|
|
define('_TODAY', "\T\o\d\a\y G:i"); |
29
|
|
|
define('_YESTERDAY', "\Y\\e\s\\t\\e\\r\d\a\y G:i"); |
30
|
|
|
define('_MONTHDAY', 'n/j G:i'); |
31
|
|
|
define('_YEARMONTHDAY', 'Y/n/j G:i'); |
32
|
|
|
define('_ELAPSE', '%s ago'); |
33
|
|
|
define( |
34
|
|
|
'_TIMEFORMAT_DESC', |
35
|
|
|
'Valid formats: "s" - ' |
36
|
|
|
. _SHORTDATESTRING |
37
|
|
|
. '; "m" - ' |
38
|
|
|
. _MEDIUMDATESTRING |
39
|
|
|
. '; "l" - ' |
40
|
|
|
. _DATESTRING |
41
|
|
|
. ';<br>' |
42
|
|
|
. '"c" or "custom" - format determined according to interval to present; "e" - Elapsed; "mysql" - Y-m-d H:i:s;<br>' |
43
|
|
|
. 'specified string - Refer to <a href="http://php.net/manual/en/function.date.php" rel="external">PHP manual</a>.' |
44
|
|
|
); |
45
|
|
|
|
46
|
|
|
if (!class_exists('XoopsLocalAbstract')) { |
47
|
|
|
require_once XOOPS_ROOT_PATH . '/class/xoopslocal.php'; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* A Xoops Local |
52
|
|
|
* |
53
|
|
|
* @package kernel |
54
|
|
|
* @subpackage Language |
55
|
|
|
* |
56
|
|
|
* @author Taiwen Jiang <[email protected]> |
57
|
|
|
* @copyright (c) 2000-2020 XOOPS Project (www.xoops.org) |
58
|
|
|
*/ |
59
|
|
|
class XoopsLocal extends XoopsLocalAbstract |
60
|
|
|
{ |
61
|
|
|
/** |
62
|
|
|
* Number Formats |
63
|
|
|
* |
64
|
|
|
* @param unknown_type $number |
|
|
|
|
65
|
|
|
* @return unknown |
|
|
|
|
66
|
|
|
*/ |
67
|
|
|
public function number_format($number) |
68
|
|
|
{ |
69
|
|
|
return number_format($number, 2, '.', ','); |
|
|
|
|
70
|
|
|
} |
71
|
|
|
|
72
|
|
|
/** |
73
|
|
|
* Money Format |
74
|
|
|
* |
75
|
|
|
* @param string $format |
76
|
|
|
* @param string $number |
77
|
|
|
* @return money format |
|
|
|
|
78
|
|
|
*/ |
79
|
|
|
public function money_format($format, $number) |
80
|
|
|
{ |
81
|
|
|
setlocale(LC_MONETARY, 'en_US'); |
82
|
|
|
|
83
|
|
|
return money_format($format, $number); |
|
|
|
|
84
|
|
|
} |
85
|
|
|
} |
86
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths