From afca7e7eb41bc692ca11c4fb80f32c860e2bd3d5 Mon Sep 17 00:00:00 2001 From: Anika Henke Date: Fri, 12 Nov 2010 20:34:00 +0100 Subject: FS#1839: take favicon from mediadir (if it exists) --- inc/template.php | 13 +++++++++++++ lib/tpl/default/main.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/inc/template.php b/inc/template.php index cb98c83d7..00bfde723 100644 --- a/inc/template.php +++ b/inc/template.php @@ -1359,5 +1359,18 @@ function tpl_flush(){ } +/** + * Use favicon.ico from data/media root directory if it exists, otherwise use + * the one in the template's image directory. + * + * @author Anika Henke + */ +function tpl_getFavicon() { + if (file_exists(mediaFN('favicon.ico'))) + return ml('favicon.ico'); + return DOKU_TPL.'images/favicon.ico'; +} + + //Setup VIM: ex: et ts=4 enc=utf-8 : diff --git a/lib/tpl/default/main.php b/lib/tpl/default/main.php index d9231678b..754a6e482 100644 --- a/lib/tpl/default/main.php +++ b/lib/tpl/default/main.php @@ -29,7 +29,7 @@ if (!defined('DOKU_INC')) die(); - + -- cgit v1.2.3