mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-35412 core: Moving get_string out of if statement
This commit is contained in:
parent
15396bba9b
commit
c5f2d11969
@ -2128,7 +2128,8 @@ function userdate($date, $format = '', $timezone = 99, $fixday = true, $fixhour
|
||||
function date_format_string($date, $format, $tz = 99) {
|
||||
global $CFG;
|
||||
if (abs($tz) > 13) {
|
||||
if ($CFG->ostype == 'WINDOWS' and ($localewincharset = get_string('localewincharset', 'langconfig'))) {
|
||||
if ($CFG->ostype == 'WINDOWS') {
|
||||
$localewincharset = get_string('localewincharset', 'langconfig');
|
||||
$format = textlib::convert($format, 'utf-8', $localewincharset);
|
||||
$datestring = strftime($format, $date);
|
||||
$datestring = textlib::convert($datestring, $localewincharset, 'utf-8');
|
||||
@ -2136,7 +2137,8 @@ function date_format_string($date, $format, $tz = 99) {
|
||||
$datestring = strftime($format, $date);
|
||||
}
|
||||
} else {
|
||||
if ($CFG->ostype == 'WINDOWS' and ($localewincharset = get_string('localewincharset', 'langconfig'))) {
|
||||
if ($CFG->ostype == 'WINDOWS') {
|
||||
$localewincharset = get_string('localewincharset', 'langconfig');
|
||||
$format = textlib::convert($format, 'utf-8', $localewincharset);
|
||||
$datestring = gmstrftime($format, $date);
|
||||
$datestring = textlib::convert($datestring, $localewincharset, 'utf-8');
|
||||
|
Loading…
x
Reference in New Issue
Block a user