From ffecbefb06b26d030c0307989f335e976a6865af Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20Mudr=C3=A1k?= Date: Tue, 1 Oct 2019 17:28:32 +0200 Subject: [PATCH] MDL-66118 hub: Drop support for the hub's display_homepage callback There should never be any exceptional hacks like this for any particular plugin. The hub sites can make use of a wide range of other and cleaner mechanisms - such as a custom theme or the customfrontpageinclude directive - to implement a customized front page. Plus, we've dropped support for alternative hubs anyway. --- index.php | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/index.php b/index.php index 01b2b5ffb4c..2346d39b54e 100644 --- a/index.php +++ b/index.php @@ -91,18 +91,6 @@ if (get_home_page() != HOMEPAGE_SITE) { // Trigger event. course_view(context_course::instance(SITEID)); -// If the hub plugin is installed then we let it take over the homepage here. -if (file_exists($CFG->dirroot.'/local/hub/lib.php') and get_config('local_hub', 'hubenabled')) { - require_once($CFG->dirroot.'/local/hub/lib.php'); - $hub = new local_hub(); - $continue = $hub->display_homepage(); - // Function display_homepage() returns 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'); $PAGE->set_docs_path(''); $editing = $PAGE->user_is_editing(); -- 2.43.0