www: do not set LC_ALL locale

Since we have removed WITHOUT_LOCALES in src.conf a while
back this call here causes undesided side effects.  Remove
this to restore the behaviour to what it was before the
locales were added.

Spotted by: @adschellevis
Also see:   https://github.com/opnsense/tools/commit/e988255

This reverts commit 930f7974e6cc842e0741554ecabfb0f68d39ac11.
This reverts commit dc53c74c0721ca7f2a467ea54620c5ef71ddbdfd.
This commit is contained in:
Franco Fichtner 2017-08-07 10:12:47 +02:00
parent f22ade58db
commit ec58aadd94
3 changed files with 4 additions and 4 deletions

View File

@ -44,8 +44,8 @@ DATED=
for BACKUP in ${BACKUPS}; do
DATETIME=${BACKUP#*config-}
DATETIME=${DATETIME%.xml}
SUBSEC=${DATETIME#*[.,]}
DATETIME=${DATETIME%[.,]*}
SUBSEC=${DATETIME#*.}
DATETIME=${DATETIME%.*}
# write a line with all required info that is prefixed
# with a sortable time stamp for our next step...
DATED="${DATED}$(date -r ${DATETIME} '+%Y-%m-%dT%H:%M:%S').${SUBSEC} ${DATETIME} ${BACKUP}

View File

@ -67,7 +67,6 @@ $lang_encoding = $lang . '.UTF-8';
$textdomain = 'OPNsense';
putenv('LANG=' . $lang_encoding);
setlocale(LC_ALL, $lang_encoding);
textdomain($textdomain);
bindtextdomain($textdomain, '/usr/local/share/locale');
bind_textdomain_codeset($textdomain, $lang_encoding);

View File

@ -30,7 +30,8 @@ function traffic_api()
global $config;
$result = array();
$result['interfaces'] = legacy_interface_stats();
$result['time'] = time();
$temp = gettimeofday();
$result['time'] = (double)$temp["sec"] + (double)$temp["usec"] / 1000000.0;
// collect user friendly interface names
foreach (legacy_config_get_interfaces(array("virtual" => false)) as $interfaceKey => $interfaceData) {
if (array_key_exists($interfaceData['if'], $result['interfaces'])) {