diff options
author | Christopher Smith <chris@jalakai.co.uk> | 2013-08-01 22:46:16 +0200 |
---|---|---|
committer | Christopher Smith <chris@jalakai.co.uk> | 2013-08-01 22:46:16 +0200 |
commit | 74ef17786eb9ce751a8dd7c66ab7523efa92c79f (patch) | |
tree | 03dda663b29febf4bb25c6b9b5fa674d103885c7 | |
parent | b1af90141d42f8844159ff4fad76968a8ee78687 (diff) | |
download | rpg-74ef17786eb9ce751a8dd7c66ab7523efa92c79f.tar.gz rpg-74ef17786eb9ce751a8dd7c66ab7523efa92c79f.tar.bz2 |
include namespace links when index access from the wiki start page
and no automatic sitemap.xml is being generated.
-rw-r--r-- | inc/html.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/inc/html.php b/inc/html.php index 53a100ec7..5f94d7dce 100644 --- a/inc/html.php +++ b/inc/html.php @@ -854,13 +854,17 @@ function html_index($ns){ * @author Andreas Gohr <andi@splitbrain.org> */ function html_list_index($item){ - global $ID; + global $ID, $conf; + + // prevent searchbots needlessly following links - only necessary when accessed from the homepage and no sitemap.xml is being generated + $nofollow = ($ID != $conf['start'] || $conf['sitemap']) ? ' rel="nofollow"' : ''; + $ret = ''; $base = ':'.$item['id']; $base = substr($base,strrpos($base,':')+1); if($item['type']=='d'){ // FS#2766, no need for search bots to follow namespace links in the index - $ret .= '<a href="'.wl($ID,'idx='.rawurlencode($item['id'])).'" title="' . $item['id'] . '" class="idx_dir" rel="nofollow"><strong>'; + $ret .= '<a href="'.wl($ID,'idx='.rawurlencode($item['id'])).'" title="' . $item['id'] . '" class="idx_dir"' . $nofollow . '><strong>'; $ret .= $base; $ret .= '</strong></a>'; }else{ |