From 26114038cc4ea49e5621b4fe70cae80db7ccbd87 Mon Sep 17 00:00:00 2001 From: martin Date: Fri, 30 Aug 2002 16:02:10 +0000 Subject: [PATCH] Prints an error message if theme can't be set --- theme/index.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/theme/index.php b/theme/index.php index 74dccb2328..9eac783043 100644 --- a/theme/index.php +++ b/theme/index.php @@ -40,11 +40,14 @@ "wwwroot/admin\">$stradministration -> $strchoosetheme"); if ($choose) { - set_field("config", "value", $choose, "name", "theme"); - print_heading(get_string("themesaved")); - print_continue("$CFG->wwwroot"); - print_footer(); - exit; + if (set_field("config", "value", $choose, "name", "theme")) { + print_heading(get_string("themesaved")); + print_continue("$CFG->wwwroot"); + print_footer(); + exit; + } else { + error("Could not set the theme!"); + } } print_heading(get_string("previeworchoose")); -- 2.39.5