summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2014-03-19 12:10:48 +0100
committerAndreas Gohr <andi@splitbrain.org>2014-03-19 12:10:48 +0100
commit8d42cd79ea294fc836eca94c7bc469d5bad5e8eb (patch)
tree7ead6353ce259c3c6db0b7afed0ffe920a5947ce /inc
parentc6571d58ba8f02fc1afaeb54319f4289da993d02 (diff)
parent7ff009d9323a4431c9463fc8e5bfb3ada17f33e0 (diff)
downloadrpg-8d42cd79ea294fc836eca94c7bc469d5bad5e8eb.tar.gz
rpg-8d42cd79ea294fc836eca94c7bc469d5bad5e8eb.tar.bz2
Merge pull request #622 from splitbrain/disablefeed
allow disabling the rss feed
Diffstat (limited to 'inc')
-rw-r--r--inc/template.php22
1 files changed, 12 insertions, 10 deletions
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'],