Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/l10n.php')
-rw-r--r--lib/l10n.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/l10n.php b/lib/l10n.php
index c0c32185996..54331d44ae4 100644
--- a/lib/l10n.php
+++ b/lib/l10n.php
@@ -57,7 +57,6 @@ class OC_L10N{
* language.
*/
public function __construct($app, $lang = null){
- global $SERVERROOT;
// Find the right language
if(is_null($lang)){
$lang = self::findLanguage($app);
@@ -81,9 +80,9 @@ class OC_L10N{
}
}
- if(file_exists($SERVERROOT.'/core/l10n/l10n-'.$lang.'.php')){
+ if(file_exists(OC::$SERVERROOT.'/core/l10n/l10n-'.$lang.'.php')){
// Include the file, save the data from $CONFIG
- include($SERVERROOT.'/core/l10n/l10n-'.$lang.'.php');
+ include(OC::$SERVERROOT.'/core/l10n/l10n-'.$lang.'.php');
if(isset($LOCALIZATIONS) && is_array($LOCALIZATIONS)){
$this->localizations = array_merge($this->localizations, $LOCALIZATIONS);
}
@@ -224,17 +223,15 @@ class OC_L10N{
* @returns directory
*/
protected static function findI18nDir($app){
- global $SERVERROOT;
-
// find the i18n dir
- $i18ndir = $SERVERROOT.'/core/l10n/';
+ $i18ndir = OC::$SERVERROOT.'/core/l10n/';
if($app != ''){
// Check if the app is in the app folder
- if(file_exists($SERVERROOT.'/apps/'.$app.'/l10n/')){
- $i18ndir = $SERVERROOT.'/apps/'.$app.'/l10n/';
+ if(file_exists(OC::$SERVERROOT.'/apps/'.$app.'/l10n/')){
+ $i18ndir = OC::$SERVERROOT.'/apps/'.$app.'/l10n/';
}
else{
- $i18ndir = $SERVERROOT.'/'.$app.'/l10n/';
+ $i18ndir = OC::$SERVERROOT.'/'.$app.'/l10n/';
}
}
return $i18ndir;