Skip to content
Snippets Groups Projects
Commit 377849c8 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

* Adjusted themes.inc to make it bullet-proof. The theme problem hasn't

  been fixed yet though, but at least it won't try to load non-existing
  themes.  That is, you might not be able to select your prefered theme,
  but you should be able to surf the pages with the default theme no
  matter what.  Hence, it semi-fixes the theme problem reported earlier
  by UnConeD.

  Natrak: make sure the new user system won't suffer the same problem.
          Use file_exists(string filename) to check whether the theme
          does actually exist.  If not, load the default theme.
parent 9286bfc1
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
<?
global $user;
### Decode user cookie:
if (isset($user)) $cookie = explode(":", base64_decode($user));
if (isset($cookie[9])) include "themes/$cookie[9]/theme.class";
### Verify theme:
if (isset($cookie[9])) {
if (file_exists("themes/$cookie[9]/theme.class")) {
include "themes/$cookie[9]/theme.class";
}
else include "themes/default/theme.class";
}
else include "themes/default/theme.class";
$theme = new Theme();
?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment