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

$CFG->admin ignored when requiring other scripts

    XMLWordPrintable

    Details

    • Testing Instructions:
      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.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-56726-master-cfgadmin

      Description

      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');
      

       

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mudrd8mz David Mudrák (@mudrd8mz)
              Reporter:
              mudrd8mz David Mudrák (@mudrd8mz)
              Peer reviewer:
              Simey Lameze
              Integrator:
              Andrew Nicols
              Tester:
              Jake Dallimore
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Bas Brands
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16