Home
Documentation
Downloads
Demo
Tracker
Development
Translation
Moodle.net
Search
projects
/
moodle.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9826891
)
MDL-35412 core: Moving get_string out of if statement
author
Frederic Massart
<fred@moodle.com>
Tue, 16 Oct 2012 03:50:25 +0000
(11:50 +0800)
committer
Frederic Massart
<fred@moodle.com>
Tue, 16 Oct 2012 09:21:36 +0000
(17:21 +0800)
lib/moodlelib.php
patch
|
blob
|
blame
|
history
diff --git
a/lib/moodlelib.php
b/lib/moodlelib.php
index
41b538f
..
1de567f
100644
(file)
--- 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) {
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');
$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 {
$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');
$format = textlib::convert($format, 'utf-8', $localewincharset);
$datestring = gmstrftime($format, $date);
$datestring = textlib::convert($datestring, $localewincharset, 'utf-8');