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

$CFG->themedir Mostly Broken

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6.1, 1.6.2
    • 1.7
    • Libraries
    • None
    • Apache/Linux etc
    • Any
    • MOODLE_16_STABLE
    • MOODLE_17_STABLE

    Description

      The themedir configuration option seems to be quite broken from a few perspectives.

      In: lib/moodlelib.php, functio get_list_of_themes():

      if (!file_exists("$CFG->dirroot/theme/$theme/config.php")) { // bad folder

      Should be:
      if (!file_exists("$CFG->themedir/theme/$theme/config.php")) { // bad folder

      same goes for:

      include("$CFG->dirroot/theme/$theme/config.php");
      to:
      include("$CFG->themedir/$theme/config.php");

      In order to use theme/index.php to select a theme from this directory, one would have to change the get_list_of_plugins_line.

      As a trivial example in theme/index.php, i'd need to change:

      $themes = get_list_of_plugins("theme");

      to:
      $themes = get_list_of_plugins("local_theme_dir");

      Where local_theme_dir would be under my dirroot. This is what i've found skimming the surface. (Configurable theme directory would be quite powerful for me)

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda
              poltawski Dan Poltawski
              Nobody Nobody
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                7/Nov/06