Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-56726

$CFG->admin ignored when requiring other scripts

XMLWordPrintable

    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-56726-master-cfgadmin
    • Hide
      • Set up a site with the admin folder in a non-standard location
        • Define $CFG->admin to something like myadmin
        • Rename the /admin to /myadmin
      • Purge all caches to make sure the class -> file maps used for autoloading are recreated.
      • Make sure that both events monitor and the boost theme works.
      Show
      Set up a site with the admin folder in a non-standard location Define $CFG->admin to something like myadmin Rename the /admin to /myadmin Purge all caches to make sure the class -> file maps used for autoloading are recreated. Make sure that both events monitor and the boost theme works.

      While peer-reviewing MDL-53945 I spotted three more non-mnet places where we incorrectly include scripts from /admin without respecting $CFG->admin.

      admin/tool/monitor/index.php:require_once($CFG->dirroot . '/admin/tool/monitor/lib.php');
      theme/boost/tests/behat/behat_theme_boost_behat_admin.php:require_once(__DIR__ . '/../../../../admin/tests/behat/behat_admin.php');
      theme/boost/classes/output/core/admin_renderer.php:require_once($CFG->dirroot . '/admin/renderer.php');
      

       

            mudrd8mz David Mudrák (@mudrd8mz)
            mudrd8mz David Mudrák (@mudrd8mz)
            Simey Lameze Simey Lameze
            Andrew Lyons Andrew Lyons
            Jake Dallimore Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.