X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=blobdiff_plain;f=lib%2Fmoodlelib.php;h=1de567fa985a4d087cbaab6163be5a13fbb45c0e;hp=41b538f5ad71871dc01e2b35c99064c7d15afab7;hb=335636f55db85faa54d6854d62d614402a5b5152;hpb=98268916ff989b76c268e11566aae044899d1d20 diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 41b538f5ad7..1de567fa985 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -2116,7 +2116,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'); @@ -2124,7 +2125,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');