aboutsummaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.php b/index.php
index 895e439ea..e858fcc97 100644
--- a/index.php
+++ b/index.php
@@ -105,6 +105,11 @@ $a->page['content'] .= '<div id="pause"></div>';
if($a->module != 'install')
require_once("nav.php");
+// make sure the desired theme exists, though if the default theme doesn't exist we're stuffed.
+
+if((x($_SESSION,'theme')) && (! file_exists('/view/theme/' . $_SESSION['theme'] . '/style.css')))
+ unset($_SESSION['theme']);
+
$a->page['htmlhead'] = replace_macros($a->page['htmlhead'], array(
'$stylesheet' => $a->get_baseurl() . '/view/theme/'
. ((x($_SESSION,'theme')) ? $_SESSION['theme'] : 'default')