Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge branch 'w11_MDL-31534_m22_pageinitroot' of git://github.com/sko…

…dak/moodle into MOODLE_22_STABLE
  • Loading branch information...
commit 7fabd5af5c80ed4cbf9f9e3943fccb580f8eab52 2 parents 13cd199 + c81e5bc
Eloy Lafuente (stronk7) stronk7 authored

Showing 1 changed file with 7 additions and 7 deletions. Show diff stats Hide diff stats

  1. +7 7 index.php
14 index.php
@@ -34,6 +34,13 @@
34 34
35 35 redirect_if_major_upgrade_required();
36 36
  37 + $urlparams = array();
  38 + if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) {
  39 + $urlparams['redirect'] = 0;
  40 + }
  41 + $PAGE->set_url('/', $urlparams);
  42 + $PAGE->set_course($SITE);
  43 +
37 44 if ($CFG->forcelogin) {
38 45 require_login();
39 46 } else {
@@ -42,13 +49,6 @@
42 49
43 50 $hassiteconfig = has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM));
44 51
45   - $urlparams = array();
46   - if ($CFG->defaulthomepage == HOMEPAGE_MY && optional_param('redirect', 1, PARAM_BOOL) === 0) {
47   - $urlparams['redirect'] = 0;
48   - }
49   - $PAGE->set_url('/', $urlparams);
50   - $PAGE->set_course($SITE);
51   -
52 52 /// If the site is currently under maintenance, then print a message
53 53 if (!empty($CFG->maintenance_enabled) and !$hassiteconfig) {
54 54 print_maintenance_message();

0 comments on commit 7fabd5a

Please sign in to comment.
Something went wrong with that request. Please try again.