Moodle
  1. Moodle
  2. MDL-4315

Use current_theme() instead of the $CFG-theme

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5.3
    • Fix Version/s: None
    • Component/s: Themes
    • Labels:
      None
    • Environment:
      All
    • Affected Branches:
      MOODLE_15_STABLE
    • Rank:
      14579

      Description

      This was discussed in http://moodle.org/mod/forum/discuss.php?d=31804 and mentioned by Martin in MDL-3313 (that bug is closed as it's not exactly the same bug as this) but I notice that many themes still use $CFG-theme instead of the function current_theme(), thus some of the logos etc. don't work if the theme is used as a course or user theme.

      Suggested fix, at least for the themes

      cornflower

      metal

      oceanblue

      orangewhite

      orangewhitepda

      and all of the standard themes

      change the use of $CFG->theme to use current_theme().

      Lot of the instances (like for the standard themes) are for the favicon.ico, so it's very minor, but still. Formal_white is quite broken as a course theme as the Moodle logo is missing.

        Activity

        Hide
        Martin Dougiamas added a comment -

        From Urs Hunkler (u.hunkler at elearningkontor.de) Monday, 14 November 2005, 02:01 AM:

        Samuli, I had changed the files already in my local repository but did not find the time to commit the changes to 1.5 and 1.6.

        From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 23 April 2006, 11:01 PM:

        Attached is a patched footer.html file for the orangewhite theme. I noticed that it still contained references to $CFG->theme and the link to the current course was not functioning (perhaps due to missing echo commands). I would recommend searching through the theme folder for any references to $CFG->theme and replacing them with the current_theme function. I have found numerous instances where this has not yet been done and thus have re-opened this bug.

        From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 23 April 2006, 11:15 PM:

        After going through the files I only found problems with the Orangewhite, orangewhitepda, and cornflower themes in the footer.html

        From Urs Hunkler (u.hunkler at elearningkontor.de) Monday, 24 April 2006, 02:57 AM:

        Thanks for looking for the wrong paths. I decided to take the validation links out in the orangewhite[pda] themes. cornflower is corrected.

        Show
        Martin Dougiamas added a comment - From Urs Hunkler (u.hunkler at elearningkontor.de) Monday, 14 November 2005, 02:01 AM: Samuli, I had changed the files already in my local repository but did not find the time to commit the changes to 1.5 and 1.6. From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 23 April 2006, 11:01 PM: Attached is a patched footer.html file for the orangewhite theme. I noticed that it still contained references to $CFG->theme and the link to the current course was not functioning (perhaps due to missing echo commands). I would recommend searching through the theme folder for any references to $CFG->theme and replacing them with the current_theme function. I have found numerous instances where this has not yet been done and thus have re-opened this bug. From Anthony Borrow (aborrow at jesuitcp.org) Sunday, 23 April 2006, 11:15 PM: After going through the files I only found problems with the Orangewhite, orangewhitepda, and cornflower themes in the footer.html From Urs Hunkler (u.hunkler at elearningkontor.de) Monday, 24 April 2006, 02:57 AM: Thanks for looking for the wrong paths. I decided to take the validation links out in the orangewhite [pda] themes. cornflower is corrected.

          People

          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: