diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-04-01 14:40:58 -0400 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-04-01 14:40:58 -0400 |
commit | 3bec08c878d50cfa43ffb72466842bda5dd88171 (patch) | |
tree | abb5c38a0567dfb9af37c68801832b8bb56e9335 /lib/action.php | |
parent | 783d292739886811ab41215c614940d24214358f (diff) | |
parent | e7381493ad036e686f82f432066f00ff911ad5d5 (diff) |
Merge branch '0.7.x' of git@gitorious.org:laconica/dev
Conflicts:
README
lib/router.php
Diffstat (limited to 'lib/action.php')
-rw-r--r-- | lib/action.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php index f9f3c35d9..5d0d5b758 100644 --- a/lib/action.php +++ b/lib/action.php @@ -112,6 +112,7 @@ class Action extends HTMLOutputter // lawsuit // XXX: attributes (profile?) $this->elementStart('head'); $this->showTitle(); + $this->showShortcutIcon(); $this->showStylesheets(); $this->showScripts(); $this->showOpenSearch(); @@ -148,6 +149,32 @@ class Action extends HTMLOutputter // lawsuit } /** + * Show themed shortcut icon + * + * @return nothing + */ + function showShortcutIcon() + { + if (is_readable(INSTALLDIR . '/theme/' . common_config('site', 'theme') . '/favicon.ico')) { + $this->element('link', array('rel' => 'shortcut icon', + 'href' => theme_path('favicon.ico'))); + } else { + $this->element('link', array('rel' => 'shortcut icon', + 'href' => common_path('favicon.ico'))); + } + + if (common_config('site', 'mobile')) { + if (is_readable(INSTALLDIR . '/theme/' . common_config('site', 'theme') . '/apple-touch-icon.png')) { + $this->element('link', array('rel' => 'apple-touch-icon', + 'href' => theme_path('apple-touch-icon.png'))); + } else { + $this->element('link', array('rel' => 'apple-touch-icon', + 'href' => common_path('apple-touch-icon.png'))); + } + } + } + + /** * Show stylesheets * * @return nothing |