From edaf25cebd5f03b595220f6072944ebbd88afe02 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sat, 5 Apr 2014 20:04:31 +0200 Subject: [PATCH] [ticket/223] Display whois_online if module is enabled The page_header() function's default was changed from true to false which means we now have to call it with the second parameter set to true if we want to display the whois online list. B3P-223 --- controller/main.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/controller/main.php b/controller/main.php index 95037077..22f042f5 100644 --- a/controller/main.php +++ b/controller/main.php @@ -150,6 +150,7 @@ class main */ $portal_config = obtain_portal_config(); $portal_modules = obtain_portal_modules(); + $display_online = false; /** * set up column_count array @@ -268,6 +269,13 @@ class main 'TITLE' => (isset($this->user->lang[$row['module_name']])) ? $this->user->lang[$row['module_name']] : utf8_normalize_nfc($row['module_name']), )); } + + // Check if we need to show the online list + if ($row['module_classname'] === '\board3\portal\modules\whois_online') + { + $display_online = true; + } + unset($template_module); } $module_count['total'] = sizeof($portal_modules); @@ -294,7 +302,7 @@ class main )); // And now to output the page. - page_header($this->user->lang('PORTAL')); + page_header($this->user->lang('PORTAL'), $display_online); // foobar_body.html is in ./ext/foobar/example/styles/prosilver/template/foobar_body.html $this->template->set_filenames(array(