From 54be1338e56b721dd24c049153eea295b6f386d5 Mon Sep 17 00:00:00 2001 From: Gerrit Uitslag Date: Tue, 18 Mar 2014 13:19:05 +0100 Subject: allow disabling the rss feed --- inc/template.php | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'inc/template.php') diff --git a/inc/template.php b/inc/template.php index 8bd3234cc..a3808aa81 100644 --- a/inc/template.php +++ b/inc/template.php @@ -318,15 +318,17 @@ function tpl_metaheaders($alt = true) { } if($alt) { - $head['link'][] = array( - 'rel' => 'alternate', 'type'=> 'application/rss+xml', - 'title'=> $lang['btn_recent'], 'href'=> DOKU_BASE.'feed.php' - ); - $head['link'][] = array( - 'rel' => 'alternate', 'type'=> 'application/rss+xml', - 'title'=> $lang['currentns'], - 'href' => DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace'] - ); + if(actionOK('rss')) { + $head['link'][] = array( + 'rel' => 'alternate', 'type'=> 'application/rss+xml', + 'title'=> $lang['btn_recent'], 'href'=> DOKU_BASE.'feed.php' + ); + $head['link'][] = array( + 'rel' => 'alternate', 'type'=> 'application/rss+xml', + 'title'=> $lang['currentns'], + 'href' => DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace'] + ); + } if(($ACT == 'show' || $ACT == 'search') && $INFO['writable']) { $head['link'][] = array( 'rel' => 'edit', @@ -335,7 +337,7 @@ function tpl_metaheaders($alt = true) { ); } - if($ACT == 'search') { + if(actionOK('rss') && $ACT == 'search') { $head['link'][] = array( 'rel' => 'alternate', 'type'=> 'application/rss+xml', 'title'=> $lang['searchresult'], -- cgit v1.2.3