summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2007-05-13 09:21:27 +0200
committerAndreas Gohr <andi@splitbrain.org>2007-05-13 09:21:27 +0200
commitbae36d947e411cb24d82cb836b2d761f594b7f2c (patch)
treec3c90e6558fefa21355904a5d02e2e390f5bce7f
parentfaecdfdffdfb8a67b97b5d31903316301c7dc2d7 (diff)
downloadrpg-bae36d947e411cb24d82cb836b2d761f594b7f2c.tar.gz
rpg-bae36d947e411cb24d82cb836b2d761f594b7f2c.tar.bz2
disable alternative links for disabled actions
When export_raw or export_xhtml is disabled no rel darcs-hash:20070513072127-7ad00-e2a2451102cbaaef7de4a12982bd14da4b90b866.gz
-rw-r--r--inc/template.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/inc/template.php b/inc/template.php
index 76e016878..bbd77d586 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -203,10 +203,16 @@ function tpl_metaheaders($alt=true){
$head['link'][] = array( 'rel'=>'alternate', 'type'=>'application/rss+xml',
'title'=>'Current Namespace',
'href'=>DOKU_BASE.'feed.php?mode=list&ns='.$INFO['namespace']);
- $head['link'][] = array( 'rel'=>'alternate', 'type'=>'text/html', 'title'=>'Plain HTML',
- 'href'=>exportlink($ID, 'xhtml', '', false, '&'));
- $head['link'][] = array( 'rel'=>'alternate', 'type'=>'text/plain', 'title'=>'Wiki Markup',
- 'href'=>exportlink($ID, 'raw', '', false, '&'));
+
+ if(actionOK('export_xhtml')){
+ $head['link'][] = array( 'rel'=>'alternate', 'type'=>'text/html', 'title'=>'Plain HTML',
+ 'href'=>exportlink($ID, 'xhtml', '', false, '&'));
+ }
+
+ if(actionOK('export_raw')){
+ $head['link'][] = array( 'rel'=>'alternate', 'type'=>'text/plain', 'title'=>'Wiki Markup',
+ 'href'=>exportlink($ID, 'raw', '', false, '&'));
+ }
}
// setup robot tags apropriate for different modes