From 14ed121a904b67710c711230202d75dbc976fa57 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sun, 12 Dec 2004 12:34:59 +0000 Subject: [PATCH] Some checks added. SC#34. Merged from MOODLE_14_STABLE --- theme/index.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/theme/index.php b/theme/index.php index b5c8c2568b..e8c8caccbd 100644 --- a/theme/index.php +++ b/theme/index.php @@ -1,9 +1,9 @@ -theme = $preview; $CFG->stylesheet = "$CFG->wwwroot/theme/$CFG->theme/styles.php?themename=$preview"; $CFG->header = "$CFG->dirroot/theme/$CFG->theme/header.html"; @@ -42,7 +42,7 @@ "wwwroot/admin/index.php\">$stradministration -> ". "wwwroot/admin/configure.php\">$strconfiguration -> $strthemes"); - if ($choose) { + if ($choose and confirm_sesskey()) { if (set_config("theme", $choose)) { print_heading(get_string("themesaved")); print_continue("$CFG->wwwroot/"); @@ -68,6 +68,7 @@ print_heading(get_string("previeworchoose")); $themes = get_list_of_plugins("theme"); + $sesskey = !empty($USER->id) ? $USER->sesskey : ''; echo ""; echo ""; @@ -81,10 +82,10 @@ echo ""; if ($CFG->theme == $theme) { echo ""; - echo ""; + echo ""; } else { echo ""; echo ""; } -- 2.39.5
$strtheme 
body\">$theme$strsavechanges$strsavechangesbody\">"; - echo "$theme"; + echo "$theme"; echo "