From 67d1c2dc65711ab685b997119afe36e0a8b92cfe Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Tue, 3 Dec 2013 21:03:10 +0100 Subject: [PATCH] Display the title if available and add a check for authentification. Refs T6 --- syntax.php | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/syntax.php b/syntax.php index f1622b8..3c84f1f 100644 --- a/syntax.php +++ b/syntax.php @@ -98,11 +98,19 @@ class syntax_plugin_navigation extends DokuWiki_Syntax_Plugin { $output = ''; foreach ($node->getNodes() as $node) { /** @var DokuWikiNode $node */ + $title = (strlen($node->getMetaData('title')) > 0 ? $node->getMetaData('title') : $node->getName()); + $access = auth_quickaclcheck($node->getFullID()); if ($node instanceof DokuWikiPage) { - $output .= '
  • ' . $node->getName() . '
  • '; - } else { + if ($access > 0) { + $output .= '
  • ' . $title . '
  • '; + } + + } else if($node instanceof DokuWikiNameSpace) { + /** @var DokuWikiNameSpace $node */ if ($this->depth <= $this->maxDepth) { - $output .= '
  • ' . $node->getName() . '
  • '; + if ($access > 0) { + $output .= '
  • ' . $title . '
  • '; + } } } }