Skip to content
Snippets Groups Projects
Commit 54be1338 authored by Gerrit Uitslag's avatar Gerrit Uitslag
Browse files

allow disabling the rss feed

parent 494cd513
No related branches found
No related tags found
No related merge requests found
......@@ -15,6 +15,12 @@ require_once(DOKU_INC.'inc/init.php');
//close session
session_write_close();
//feed disabled?
if(!actionOK('rss')) {
echo '<error>RSS feed is disabled.</error>';
exit;
}
// get params
$opt = rss_parseOptions();
......
......@@ -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'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment