Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Prints an error message if theme can't be set

  • Loading branch information...
commit 26114038cc4ea49e5621b4fe70cae80db7ccbd87 1 parent 54824c7
martin authored
Showing with 8 additions and 5 deletions.
  1. +8 −5 theme/index.php
View
13 theme/index.php
@@ -40,11 +40,14 @@
"<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"));
Please sign in to comment.
Something went wrong with that request. Please try again.