Commit 377849c8 authored by Dries's avatar Dries
Browse files

* Adjusted 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
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment