Prints an error message if theme can't be set
authormartin <martin>
Fri, 30 Aug 2002 16:02:10 +0000 (16:02 +0000)
committermartin <martin>
Fri, 30 Aug 2002 16:02:10 +0000 (16:02 +0000)
theme/index.php

index 74dccb232826632d2d8ef4d84ef4b107bed8d4a6..9eac7830435131e758a9e796fa12e5ed707daf00 100644 (file)
                  "<A HREF=\"$CFG->wwwroot/admin\">$stradministration</A> -> $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"));