hub server MDL-24015 add hub setting to not display the search form on the front page when users are not logged

This commit is contained in:
jerome mouneyrac 2010-10-08 08:54:36 +00:00
parent 252708c64d
commit a4e56bf335

View File

@ -75,8 +75,12 @@
if (get_config('local_hub', 'hubenabled') && file_exists($CFG->dirroot.'/local/hub/lib.php')) {
require_once($CFG->dirroot.'/local/hub/lib.php');
$hub = new local_hub();
$hub->display_homepage();
exit;
$continue = $hub->display_homepage();
//display_homepage() return true if the hub home page is not displayed
//mostly when search form is not displayed for not logged users
if (empty($continue)) {
exit;
}
}
$PAGE->set_pagetype('site-index');