summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorlupo49 <post@lupo49.de>2011-04-26 21:49:33 +0200
committerlupo49 <post@lupo49.de>2011-04-26 21:49:33 +0200
commita7e5f74cc2ce69292dcbc773dd8a297832100cd5 (patch)
tree16c58129afaa584b8d88cba08d14405defb7dcbc /inc
parent549bcf6b95fe06296a4b6f542c35ae53682365ff (diff)
downloadrpg-a7e5f74cc2ce69292dcbc773dd8a297832100cd5.tar.gz
rpg-a7e5f74cc2ce69292dcbc773dd8a297832100cd5.tar.bz2
allow tpl_getFavicon() returning the absolute path to the icon file
Diffstat (limited to 'inc')
-rw-r--r--inc/template.php11
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';
}