From b80dc2f13ab4d5ba54762a2e04b6c28a4e1b757a Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 11 Jan 2017 19:14:41 -0800 Subject: [PATCH] Notice removal --- e107_handlers/language_class.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/e107_handlers/language_class.php b/e107_handlers/language_class.php index a2b59d484..cfad9ff64 100644 --- a/e107_handlers/language_class.php +++ b/e107_handlers/language_class.php @@ -248,8 +248,8 @@ class language{ /** * Converts iso to language-name and visa-versa. - * @param object $data - * @return + * @param string $data + * @return string */ function convert($data){ @@ -466,15 +466,16 @@ class language{ * Convert the current URL to a multi-lang for the specified language. * eg. 'http://www.mydomain.com' becomes 'http://es.mydomain.com' * @param string $language eg. 'Spanish' - * @return URL + * @return string url */ function subdomainUrl($language, $url=e_REQUEST_URL) { - global $pref; + + $sitelanguage = e107::getPref('sitelanguage',null); $iso = (strlen($language) == 2) ? $language : $this->convert($language); - $codelnk = ($language == $pref['sitelanguage']) ? "www" : $iso; + $codelnk = ($language == $sitelanguage) ? "www" : $iso; if($codelnk == '') {