This more or less completes the PHP side of the 1.5 themes
Added $user->theme and $course->theme choices, controlled by admin variables on the main config variables page. By default this is all turned off, since multiple themes can be a little disorienting. A hidden feature is session themes ... you can change the theme on any page by passing theme=xxxx as a parameter. By default this requires sesskey (so that people don't change theme on each other), but this security can be switched off using a hidden variable $CFG->allowthemechangeonurl = true; Good for quick tests.
This commit is contained in:
+1
-1
@@ -305,7 +305,7 @@ global $THEME;
|
||||
|
||||
/// Load up theme variables (colours etc)
|
||||
if (isset($_GET['theme'])) {
|
||||
if (confirm_sesskey()) {
|
||||
if ($CFG->allowthemechangeonurl || confirm_sesskey()) {
|
||||
if (!detect_munged_arguments($_GET['theme'], 0) and file_exists($CFG->dirroot .'/theme/'. $_GET['theme'])) {
|
||||
$SESSION->theme = $_GET['theme'];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user