From 30045d0f5996246daecc8a6e1f220c153075aea6 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 16 Nov 2010 17:26:08 -0700 Subject: [PATCH] Add Horde::getFavicon() --- agora/templates/common-header.inc | 2 +- ansel/templates/common-header.inc | 2 +- beatnik/templates/common-header.inc | 2 +- chora/templates/common-header.inc | 2 +- folks/templates/common-header.inc | 2 +- framework/Core/lib/Horde.php | 19 +++++++++++++++++++ framework/Core/lib/Horde/Themes/Element.php | 3 ++- gollem/templates/common-header.inc | 2 +- hermes/templates/common-header.inc | 2 +- horde/templates/common-header.inc | 2 +- hylax/templates/common-header.inc | 2 +- imp/templates/common-header.inc | 4 ++-- ingo/templates/common-header.inc | 2 +- jonah/templates/common-header.inc | 2 +- koward/lib/Koward/View/shared/_header.html.php | 2 +- kronolith/lib/Kronolith.php | 2 +- kronolith/templates/common-header.inc | 2 +- luxor/templates/common-header.inc | 2 +- mnemo/templates/common-header.inc | 2 +- nag/templates/common-header.inc | 2 +- operator/templates/common-header.inc | 2 +- passwd/templates/common-header.inc | 2 +- pastie/templates/common-header.inc | 2 +- skeleton/templates/common-header.inc | 2 +- trean/templates/common-header.inc | 2 +- turba/templates/common-header.inc | 2 +- vilma/templates/common-header.inc | 2 +- whups/templates/common-header.inc | 2 +- wicked/templates/common-header.inc | 2 +- 29 files changed, 49 insertions(+), 29 deletions(-) diff --git a/agora/templates/common-header.inc b/agora/templates/common-header.inc index 107e07f94..4b043b7f2 100644 --- a/agora/templates/common-header.inc +++ b/agora/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + " href="" type="application/rss+xml" /> diff --git a/ansel/templates/common-header.inc b/ansel/templates/common-header.inc index 211891131..50bca962e 100644 --- a/ansel/templates/common-header.inc +++ b/ansel/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/beatnik/templates/common-header.inc b/beatnik/templates/common-header.inc index a329240c6..6908121b1 100644 --- a/beatnik/templates/common-header.inc +++ b/beatnik/templates/common-header.inc @@ -33,7 +33,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/chora/templates/common-header.inc b/chora/templates/common-header.inc index acb737ce5..919fb19b8 100644 --- a/chora/templates/common-header.inc +++ b/chora/templates/common-header.inc @@ -23,7 +23,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/folks/templates/common-header.inc b/folks/templates/common-header.inc index 792811fea..bb0d528b3 100644 --- a/folks/templates/common-header.inc +++ b/folks/templates/common-header.inc @@ -20,7 +20,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + " /> isAuthenticated()): ?> " /> diff --git a/framework/Core/lib/Horde.php b/framework/Core/lib/Horde.php index 8941562b6..9d0479399 100644 --- a/framework/Core/lib/Horde.php +++ b/framework/Core/lib/Horde.php @@ -1408,6 +1408,25 @@ HTML; } /** + * Generate the favicon tag for the current application. + * + * @return string The favicon LINK tag. + */ + static public function includeFavicon() + { + $img = strval(Horde_Themes::img('favicon.ico', array( + 'nohorde' => true + ))); + if (!$img) { + $img = strval(Horde_Themes::img('favicon.ico', array( + 'app' => 'horde' + ))); + } + + return ''; + } + + /** * Determines the location of the system temporary directory. If a specific * configuration cannot be found, it defaults to /tmp. * diff --git a/framework/Core/lib/Horde/Themes/Element.php b/framework/Core/lib/Horde/Themes/Element.php index 084c11491..22dffc06a 100644 --- a/framework/Core/lib/Horde/Themes/Element.php +++ b/framework/Core/lib/Horde/Themes/Element.php @@ -123,7 +123,8 @@ class Horde_Themes_Element if (empty($this->_opts['notheme']) && isset($GLOBALS['prefs']) && (($theme = $GLOBALS['prefs']->getValue('theme')) || - (!empty($this->_opts['theme']) && ($theme = $this->_opts['theme'])))) { + (!empty($this->_opts['theme']) && + ($theme = $this->_opts['theme'])))) { $tpath = '/' . $theme . $path; foreach ($app_list as $app) { $filepath = $registry->get('themesfs', $app) . $tpath; diff --git a/gollem/templates/common-header.inc b/gollem/templates/common-header.inc index d63dfc17a..d38c70f5d 100644 --- a/gollem/templates/common-header.inc +++ b/gollem/templates/common-header.inc @@ -25,7 +25,7 @@ require GOLLEM_TEMPLATES . '/javascript_defs.php'; ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/hermes/templates/common-header.inc b/hermes/templates/common-header.inc index 7c48361d6..27c98222f 100644 --- a/hermes/templates/common-header.inc +++ b/hermes/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/horde/templates/common-header.inc b/horde/templates/common-header.inc index 7aa033028..e764c78d2 100644 --- a/horde/templates/common-header.inc +++ b/horde/templates/common-header.inc @@ -23,7 +23,7 @@ Horde::outputMetaTags(); ?> <?php echo htmlspecialchars($page_title) ?> isMobile()): ?> - + <?php echo htmlspecialchars($page_title) ?> - + diff --git a/imp/templates/common-header.inc b/imp/templates/common-header.inc index d4e4ccaee..9182ed2b7 100644 --- a/imp/templates/common-header.inc +++ b/imp/templates/common-header.inc @@ -65,10 +65,10 @@ default: - + - + diff --git a/ingo/templates/common-header.inc b/ingo/templates/common-header.inc index 601867f2b..684dc7bd7 100644 --- a/ingo/templates/common-header.inc +++ b/ingo/templates/common-header.inc @@ -17,7 +17,7 @@ if (!empty($title)) { Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/jonah/templates/common-header.inc b/jonah/templates/common-header.inc index 22049bed4..7b6dd9ca5 100644 --- a/jonah/templates/common-header.inc +++ b/jonah/templates/common-header.inc @@ -26,7 +26,7 @@ if ($channel_id = Horde_Util::getFormData('channel_id')) { } ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/koward/lib/Koward/View/shared/_header.html.php b/koward/lib/Koward/View/shared/_header.html.php index 4257c1b76..ccdc527d9 100644 --- a/koward/lib/Koward/View/shared/_header.html.php +++ b/koward/lib/Koward/View/shared/_header.html.php @@ -27,7 +27,7 @@ $page_title .= !empty($this->title) ? ' :: ' . $this->title : ''; Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/kronolith/lib/Kronolith.php b/kronolith/lib/Kronolith.php index 2df3f9202..3267fc79c 100644 --- a/kronolith/lib/Kronolith.php +++ b/kronolith/lib/Kronolith.php @@ -87,7 +87,7 @@ class Kronolith (!empty($GLOBALS['language']) ? '\n". "\n" . '' . htmlspecialchars($GLOBALS['registry']->get('name')) . "\n" . - '\n". + Horde::getFavicon() . Horde::wrapInlineScript(self::includeJSVars()); Horde_Themes::includeStylesheetFiles(); diff --git a/kronolith/templates/common-header.inc b/kronolith/templates/common-header.inc index a7993c3a0..b5abfc625 100644 --- a/kronolith/templates/common-header.inc +++ b/kronolith/templates/common-header.inc @@ -32,7 +32,7 @@ $bc = (isset($view) && is_object($view) && $prefs->getValue('show_panel')) ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/luxor/templates/common-header.inc b/luxor/templates/common-header.inc index 1e62a8282..14159a6c0 100644 --- a/luxor/templates/common-header.inc +++ b/luxor/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/mnemo/templates/common-header.inc b/mnemo/templates/common-header.inc index efd662b19..45bbadc11 100644 --- a/mnemo/templates/common-header.inc +++ b/mnemo/templates/common-header.inc @@ -28,7 +28,7 @@ $bc = $prefs->getValue('show_panel') ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/nag/templates/common-header.inc b/nag/templates/common-header.inc index 8f9282a8b..91cf800cd 100644 --- a/nag/templates/common-header.inc +++ b/nag/templates/common-header.inc @@ -30,7 +30,7 @@ $bc = $prefs->getValue('show_panel') ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/operator/templates/common-header.inc b/operator/templates/common-header.inc index d1bc89c92..f9f11b1fc 100644 --- a/operator/templates/common-header.inc +++ b/operator/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/passwd/templates/common-header.inc b/passwd/templates/common-header.inc index b2173fc00..c2f224309 100644 --- a/passwd/templates/common-header.inc +++ b/passwd/templates/common-header.inc @@ -23,7 +23,7 @@ Horde::outputMetaTags(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/pastie/templates/common-header.inc b/pastie/templates/common-header.inc index 06da9aa97..069530197 100644 --- a/pastie/templates/common-header.inc +++ b/pastie/templates/common-header.inc @@ -19,7 +19,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/skeleton/templates/common-header.inc b/skeleton/templates/common-header.inc index 06da9aa97..069530197 100644 --- a/skeleton/templates/common-header.inc +++ b/skeleton/templates/common-header.inc @@ -19,7 +19,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/trean/templates/common-header.inc b/trean/templates/common-header.inc index 344c13f99..b8b459f28 100644 --- a/trean/templates/common-header.inc +++ b/trean/templates/common-header.inc @@ -38,7 +38,7 @@ if ($prefs->getValue('show_folder_actions')) { ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/turba/templates/common-header.inc b/turba/templates/common-header.inc index 679f150ba..5f5c01452 100644 --- a/turba/templates/common-header.inc +++ b/turba/templates/common-header.inc @@ -23,7 +23,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/vilma/templates/common-header.inc b/vilma/templates/common-header.inc index 835d61a45..b022f3a1f 100644 --- a/vilma/templates/common-header.inc +++ b/vilma/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/whups/templates/common-header.inc b/whups/templates/common-header.inc index dd5ee2d18..fd5926400 100644 --- a/whups/templates/common-header.inc +++ b/whups/templates/common-header.inc @@ -29,7 +29,7 @@ if (isset($whups_query) && isset($whups_query->id)) { ?> <?php echo htmlspecialchars($page_title) ?> - + diff --git a/wicked/templates/common-header.inc b/wicked/templates/common-header.inc index 19da3f3cf..a2d519ae8 100644 --- a/wicked/templates/common-header.inc +++ b/wicked/templates/common-header.inc @@ -22,7 +22,7 @@ Horde::includeScriptFiles(); ?> <?php echo htmlspecialchars($page_title) ?> - + -- 2.11.0