aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2012-10-22 17:09:34 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2012-10-22 17:09:34 +0300
commit126d16f16d15b6ba56cea1e257eb7e4a208f629b (patch)
treef7390fb75251bf34f65f47efaaf7f29e001a4a92 /lib
parentd68b89cae43beca3a3ae8531395d125ea67cd053 (diff)
downloadnextcloud-server-126d16f16d15b6ba56cea1e257eb7e4a208f629b.tar.gz
nextcloud-server-126d16f16d15b6ba56cea1e257eb7e4a208f629b.zip
Fixing undefined $language
Diffstat (limited to 'lib')
-rw-r--r--lib/l10n.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index 26611537175..ac57115da4e 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -217,7 +217,9 @@ class OC_L10N{
if($data instanceof DateTime) return $data->format($this->localizations[$type]);
elseif(is_string($data)) $data = strtotime($data);
$locales = array(self::findLanguage());
- if (strlen($locales[0]) == 2) $locales[] = $language.'_'.strtoupper($language);
+ if (strlen($locales[0]) == 2) {
+ $locales[] = $locales[0].'_'.strtoupper($locales[0]);
+ }
setlocale(LC_TIME, $locales);
return strftime($this->localizations[$type], $data);
break;