Skip to content

Commit

Permalink
MDL-66118 hub: Drop support for the hub's display_homepage callback
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mudrd8mz committed Oct 4, 2019
1 parent 6d015e2 commit ffecbef
Showing 1 changed file with 0 additions and 12 deletions.
12 changes: 0 additions & 12 deletions index.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,6 @@
// 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();
Expand Down

0 comments on commit ffecbef

Please sign in to comment.