diff options
author | lupo49 <post@lupo49.de> | 2011-04-26 21:49:33 +0200 |
---|---|---|
committer | lupo49 <post@lupo49.de> | 2011-04-26 21:49:33 +0200 |
commit | a7e5f74cc2ce69292dcbc773dd8a297832100cd5 (patch) | |
tree | 16c58129afaa584b8d88cba08d14405defb7dcbc | |
parent | 549bcf6b95fe06296a4b6f542c35ae53682365ff (diff) | |
download | rpg-a7e5f74cc2ce69292dcbc773dd8a297832100cd5.tar.gz rpg-a7e5f74cc2ce69292dcbc773dd8a297832100cd5.tar.bz2 |
allow tpl_getFavicon() returning the absolute path to the icon file
-rw-r--r-- | inc/template.php | 11 |
1 files 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'; } |