only check for themes when there is a logged-in user

This commit is contained in:
Andrew Dolgov 2010-01-28 18:54:45 +03:00
parent a522a76734
commit b92fbcd8a5
1 changed files with 2 additions and 2 deletions

View File

@ -2047,7 +2047,7 @@
function get_user_theme($link) {
if (get_schema_version($link) >= 63) {
if (get_schema_version($link) >= 63 && $_SESSION["uid"]) {
$theme_name = get_pref($link, "_THEME_ID");
if (is_dir("themes/$theme_name")) {
return $theme_name;
@ -2062,7 +2062,7 @@
function get_user_theme_path($link) {
if (get_schema_version($link) >= 63) {
if (get_schema_version($link) >= 63 && $_SESSION["uid"]) {
$theme_name = get_pref($link, "_THEME_ID");
if ($theme_name && is_dir("themes/$theme_name")) {