From 8bac82c79a8792f8b6540e55303fd566b36c0e8e Mon Sep 17 00:00:00 2001 From: Jim Hu Date: Sat, 25 Mar 2006 20:22:47 +0000 Subject: Modifications to make preferences.php use new template right away upon reload --- preferences.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'preferences.php') diff --git a/preferences.php b/preferences.php index f3ec74d..c091fed 100644 --- a/preferences.php +++ b/preferences.php @@ -33,6 +33,10 @@ if ($action == 'setcookie') { $cookie_calendar = $_POST['cookie_calendar']; $cookie_view = $_POST['cookie_view']; $cookie_style = $_POST['cookie_style']; + if (isset($_POST['cookie_style']) && is_dir(BASE.'templates/'.$_POST['cookie_style'].'/')){ + $template = $_POST['cookie_style']; + } + $cookie_startday = $_POST['cookie_startday']; $cookie_time = $_POST['cookie_time']; $cookie_unset = $_POST['unset']; @@ -129,7 +133,7 @@ foreach ($daysofweek_lang as $daysofweek) { $dir_handle = @opendir(BASE.'templates/'); while ($file = readdir($dir_handle)) { if (($file != ".") && ($file != "..") && ($file != "CVS")) { - if (!is_file($file)) { + if (is_dir(BASE.'templates/'.$file)) { $file_disp = ucfirst($file); $style_select .= ($file == "$cookie_style") ? "\n" : "\n"; } -- cgit v1.2.3