Fix set custom logo for multi-url - refs BT#11424

remotes/angel/1.11.x
Angel Fernando Quiroz Campos 8 years ago
parent ff9faa6e4a
commit 1b557c4316
  1. 6
      main/admin/settings.lib.php
  2. 5
      main/inc/lib/banner.lib.php

@ -372,12 +372,14 @@ function handleStylesheets()
'settings.php?category=Stylesheets#tabs-2'
);
$logoForm->addHtml(Display::return_message(sprintf(get_lang('TheLogoMustBeSizeXAndFormatY'), '250 x 70', 'PNG'), 'info'));
$logoForm->addHtml(
Display::return_message(sprintf(get_lang('TheLogoMustBeSizeXAndFormatY'), '250 x 70', 'PNG'), 'info')
);
$dir = api_get_path(SYS_PUBLIC_PATH).'css/themes/' . $selected . '/images/';
$url = api_get_path(WEB_CSS_PATH).'themes/' . $selected . '/images/';
$logoFileName = 'header-logo.png';
$newLogoFileName = 'header-logo-custom.png';
$newLogoFileName = 'header-logo-custom' . api_get_current_access_url_id() . '.png';
if (is_file($dir.$newLogoFileName)) {
$logoForm->addLabel(get_lang('CurrentLogo'), '<img id="header-logo-custom" src="'. $url . $newLogoFileName .'?'. time() . '">');

@ -174,9 +174,10 @@ function getCustomTabs()
function return_logo($theme)
{
$_course = api_get_course_info();
$accessUrlId = api_get_current_access_url_id();
$html = '';
$logoBase = api_get_path(SYS_CSS_PATH).'themes/'.$theme.'/images/header-logo.';
$customLogoBase = api_get_path(SYS_PUBLIC_PATH).'css/themes/'.$theme.'/images/header-logo-custom.';
$customLogoBase = api_get_path(SYS_PUBLIC_PATH) . "css/themes/$theme/images/header-logo-custom$accessUrlId.";
$customLogo = '';
$siteName = api_get_setting('siteName');
$attributes = array(
@ -194,7 +195,7 @@ function return_logo($theme)
$logo = $logoBase . 'png';
$customLogo = $customLogoBase . 'png';
$imageUrl = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo.png';
$customImageUrl = api_get_path(WEB_CSS_PATH).'themes/'.$theme.'/images/header-logo-custom.png';
$customImageUrl = api_get_path(WEB_CSS_PATH) . "themes/$theme/images/header-logo-custom$accessUrlId.png";
}
if (file_exists($customLogo)) {
$siteName = api_get_setting('Institution').' - '.$siteName;

Loading…
Cancel
Save