Display: Replace favicon link tag refs BT#21621

pull/5641/head
Angel Fernando Quiroz Campos 1 year ago
parent 79238c1e15
commit 61c842d78b
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 42
      public/main/inc/lib/template.lib.php
  2. 2
      public/plugin/advanced_subscription/views/terms_and_conditions.tpl
  3. 2
      public/plugin/advanced_subscription/views/terms_and_conditions_to_pdf.tpl

@ -1125,48 +1125,6 @@ class Template
// end of HTTP headers security block
}
/**
* Assign favicon to the 'favico' template variable.
*
* @return bool Always return true because there is always at least one correct favicon.ico
*/
private function assignFavIcon()
{
// Default root chamilo favicon
$favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_PATH).'favicon.ico" type="image/x-icon" />';
//Added to verify if in the current Chamilo Theme exist a favicon
$favicoThemeUrl = api_get_path(SYS_CSS_PATH).$this->themeDir.'images/';
//If exist pick the current chamilo theme favicon
if (is_file($favicoThemeUrl.'favicon.ico')) {
$favico = '<link rel="shortcut icon" href="'.api_get_path(WEB_CSS_PATH).$this->themeDir.'images/favicon.ico" type="image/x-icon" />';
}
if (api_is_multiple_url_enabled()) {
/*$access_url_id = api_get_current_access_url_id();
if ($access_url_id != -1) {
$url_info = api_get_access_url($access_url_id);
$url = api_remove_trailing_slash(
preg_replace('/https?:\/\//i', '', $url_info['url'])
);
$clean_url = api_replace_dangerous_char($url);
$clean_url = str_replace('/', '-', $clean_url);
$clean_url .= '/';
$homep = api_get_path(REL_PATH).'home/'.$clean_url; //homep for Home Path
$icon_real_homep = api_get_path(SYS_APP_PATH).'home/'.$clean_url;
//we create the new dir for the new sites
if (is_file($icon_real_homep.'favicon.ico')) {
$favico = '<link rel="shortcut icon" href="'.$homep.'favicon.ico" type="image/x-icon" />';
}
}*/
}
$this->assign('favico', $favico);
return true;
}
/**
* Assign HTML code to the 'accessibility' template variable (usually shown above top menu).
*

@ -4,7 +4,7 @@
<link href="https://chamilo.org/the-association/" rel="author" />
<link href="https://chamilo.org/the-association/" rel="copyright" />
{{ prefetch }}
{{ favico }}
<link rel="shortcut icon" href="{{ theme_asset('images/favicon.ico') }}" type="image/x-icon" />
{{ browser_specific_head }}
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
<meta name="apple-mobile-web-app-capable" content="yes" />

@ -4,7 +4,7 @@
<link href="https://chamilo.org/the-association/" rel="author" />
<link href="https://chamilo.org/the-association/" rel="copyright" />
{{ prefetch }}
{{ favico }}
<link rel="shortcut icon" href="{{ theme_asset('images/favicon.ico') }}" type="image/x-icon" />
{{ browser_specific_head }}
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
<link href="{{ _p.web_plugin }}advanced_subscription/views/css/style.css" rel="stylesheet" type="text/css">

Loading…
Cancel
Save