From a7e5f74cc2ce69292dcbc773dd8a297832100cd5 Mon Sep 17 00:00:00 2001 From: lupo49 <post@lupo49.de> Date: Tue, 26 Apr 2011 21:49:33 +0200 Subject: [PATCH] allow tpl_getFavicon() returning the absolute path to the icon file --- inc/template.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/inc/template.php b/inc/template.php index 0f0fb92a0..61378bf92 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1346,10 +1346,13 @@ function tpl_flush(){ * * @author Anika Henke <anika@selfthinker.org> */ -function tpl_getFavicon() { - if (file_exists(mediaFN('favicon.ico'))) - return ml('favicon.ico'); - return DOKU_TPL.'images/favicon.ico'; +function tpl_getFavicon($abs=false) { + if (file_exists(mediaFN('favicon.ico'))) { + if($abs) return ml('favicon.ico', '', '', '', true); + else return ml('favicon.ico'); + } + if($abs) return DOKU_URL.substr(DOKU_TPL.'images/favicon.ico', strlen(DOKU_REL)); + else return DOKU_TPL.'images/favicon.ico'; } -- GitLab