summaryrefslogtreecommitdiff
path: root/lib/action.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-03-23 15:55:07 -0400
committerEvan Prodromou <evan@controlyourself.ca>2009-03-23 15:55:07 -0400
commit8c073a34ce472fc8d0385659a222339a5ba4254a (patch)
tree57c83c48333b52a93b84d0910f9450c210e1815c /lib/action.php
parentb3a0eea3b66e95becb6c4595ed71c7fe71ed6437 (diff)
parent14afe2d26874ed30a0ccef5e0acda2c5171afcde (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'lib/action.php')
-rw-r--r--lib/action.php27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/action.php b/lib/action.php
index 5020b92b0..2935cb900 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