From 782807733e52295b535005074a62cee46640b0db Mon Sep 17 00:00:00 2001 From: Adrian Lang <lang@cosmocode.de> Date: Wed, 16 Jun 2010 10:01:44 +0200 Subject: [PATCH] Restore hiding of unavailable links --- inc/template.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/inc/template.php b/inc/template.php index 2ebc7a36d..6776d4a09 100644 --- a/inc/template.php +++ b/inc/template.php @@ -596,7 +596,6 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ $out = ''; $id = $ID; $query = array(); - $build_link = true; $more = ''; switch($type){ case 'edit': @@ -640,7 +639,6 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ $more = 'class="action index" accesskey="x"'; break; case 'top': - $build_link = false; $out = '<a href="#dokuwiki__top" class="action top" accesskey="x">'. $pre.(($inner)?$inner:$lang['btn_top']).$suf.'</a>'; break; @@ -692,11 +690,10 @@ function tpl_actionlink($type,$pre='',$suf='',$inner='',$return=false){ } break; default: - $build_link = false; $out = '[unknown link type]'; break; } - if ($build_link) { + if ($more !== '') { if (is_array($query) && !isset($query['do'])) { $query['do'] = $type; } -- GitLab