Skip to content
Snippets Groups Projects
Commit 7b98e36f authored by Sebastian Paul's avatar Sebastian Paul
Browse files

fix httphost detection

parent c2bc267a
No related branches found
No related tags found
No related merge requests found
......@@ -23,9 +23,8 @@ function unity_webapp_generate_links_array() {
*/
function unity_webapp_page_alter(&$page) {
global $base_root;
$uri = (parse_url($_SERVER['HTTP_HOST']));
$uri = $_SERVER['HTTP_HOST'];
$faviconurl = theme_get_setting('favicon', variable_get('theme_default'));
// Replace standard drupal favicon with higher quality one.
if ($faviconurl == $base_root . "/misc/favicon.ico") {
$faviconurl = $base_root . "/" .drupal_get_path("module","unity_webapp") . "/img/druplicon.ico";
......@@ -35,7 +34,7 @@ function unity_webapp_page_alter(&$page) {
'sitename' => variable_get('site_name'),
'links' => unity_webapp_generate_links_array(),
'favicon' => $faviconurl,
'baseurl' => $uri['host'],
'baseurl' => $uri,
);
// TODO: drupal_alter to allow other modules to alter the output.
drupal_add_js(array('unity_api' => $my_settings), 'setting');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment