1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-07 07:06:30 +02:00

plugin.xml can now set the site-link icon if needed.

This commit is contained in:
Cameron
2015-06-10 14:22:59 -07:00
parent ce6802f991
commit 5e2729645a
3 changed files with 17 additions and 9 deletions

View File

@@ -404,10 +404,13 @@ class language{
* @param string $language eg. 'Spanish'
* @return URL
*/
function subdomainUrl($language)
function subdomainUrl($language, $url=e_REQUEST_URL)
{
global $pref;
$codelnk = ($language == $pref['sitelanguage']) ? "www" : $this->convert($language);
$iso = (strlen($language) == 2) ? $language : $this->convert($language);
$codelnk = ($language == $pref['sitelanguage']) ? "www" : $iso;
if($codelnk == '')
{
@@ -421,7 +424,10 @@ class language{
: str_replace($_SERVER['HTTP_HOST'], $codelnk.'.'.e_DOMAIN, e_SELF);
*/
$urlval = str_replace($_SERVER['HTTP_HOST'], $codelnk.'.'.e_DOMAIN, e_REQUEST_URL) ;
$domain = deftrue('e_DOMAIN','example.com');
$urlval = str_replace($_SERVER['HTTP_HOST'], $codelnk.'.'.$domain, $url) ;
return (string) $urlval;
}