Skip to content

Commit

Permalink
Upgrade: Support more seamless upgrade to 4.5 by only requiring /cach…
Browse files Browse the repository at this point in the history
…e/classes/loaders.php if it is present, resolves #708. (#764)
  • Loading branch information
abias committed Nov 20, 2024
1 parent fb4d0c8 commit 22ae30f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Changes

### Unreleased

* 2024-11-19 - Upgrade: Support more seamless upgrade to 4.5 by only requiring /cache/classes/loaders.php if it is present, resolves #708.
* 2024-11-19 - Bugfix: The starred courses popover showed a JavaScript error in the browser JS console, resolves #759.
* 2024-11-19 - Bugfix: The starred courses popover in the navbar must only be shown if Boost Union or Boost Union child is active, resolves #759.
* 2024-11-18 - Improvement: Add the possibility to restrict smart menus and smart menu items to site admins and non-site admins only, resolves #421.
Expand Down
6 changes: 5 additions & 1 deletion classes/cache/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@

defined('MOODLE_INTERNAL') || die();

require_once($CFG->dirroot.'/cache/classes/loaders.php');
// Require the cache loaders class, but only if the file exists (which is the case before Moodle 4.5).
// This is just done to support a seamless upgrade to 4.5.
if (file_exists($CFG->dirroot.'/cache/classes/loaders.php')) {
require_once($CFG->dirroot.'/cache/classes/loaders.php');
}

/**
* Custom cache loader to handle the smart menus and items deletion.
Expand Down

0 comments on commit 22ae30f

Please sign in to comment.