From 9cf85b0c197ae9dc076c2f50d99173887bbd76ab Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 12 Feb 2013 13:43:32 +1300 Subject: [PATCH] If no versions registered for a module, don't show empty versions in template --- code/controllers/DocumentationViewer.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/controllers/DocumentationViewer.php b/code/controllers/DocumentationViewer.php index 790db75..c14b7a0 100755 --- a/code/controllers/DocumentationViewer.php +++ b/code/controllers/DocumentationViewer.php @@ -344,6 +344,8 @@ class DocumentationViewer extends Controller { $currentVersion = $this->getVersion(); foreach($versions as $key => $version) { + if(!$version) continue; + $linkingMode = ($currentVersion == $version) ? 'current' : 'link'; $output->push(new ArrayData(array(