aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChad Little <clittle@users.sourceforge.net>2003-02-24 17:20:00 +0000
committerChad Little <clittle@users.sourceforge.net>2003-02-24 17:20:00 +0000
commit5dee3f3570b0dccd3f689f8ddf126e8d67aee087 (patch)
treeb02b7808d1197d7719e2546ad9f8e9f470593201
parent80cccbbcdd21acc878553d6725cb1b38638b7243 (diff)
downloadphpicalendar-5dee3f3570b0dccd3f689f8ddf126e8d67aee087.tar.gz
phpicalendar-5dee3f3570b0dccd3f689f8ddf126e8d67aee087.tar.bz2
phpicalendar-5dee3f3570b0dccd3f689f8ddf126e8d67aee087.zip
Fixed a bug where preferences set to no would still allow prefs to be set.
-rw-r--r--config.inc.php4
-rw-r--r--preferences.php7
2 files changed, 7 insertions, 4 deletions
diff --git a/config.inc.php b/config.inc.php
index 46caa0d..3977c7f 100644
--- a/config.inc.php
+++ b/config.inc.php
@@ -38,8 +38,8 @@ $this_months_events = 'yes'; // Display "This month's events" at the bottom o
$use_color_cals = 'yes'; // Display each calendar in the pop-up as a different color.
$daysofweek_dayview = 'no'; // Display the days of the week in day.php view.
$enable_rss = 'yes'; // Enable RSS access to your calendars (good thing).
-$show_search = 'yes'; // Show the search box in the sidebar.
-$header_always = 'no'; // Set to yes to have header on print.php
+$show_search = 'no'; // Show the search box in the sidebar.
+$header_always = 'yes'; // Set to yes to have header on print.php
$allow_preferences = 'yes'; // Allow visitors to change various preferences via cookies.
$printview_default = 'no'; // Set print view as the default view. day, week, and month only supported views for $default_view (listed well above).
$show_todos = 'yes'; // Show your todo list on the side of day and week view.
diff --git a/preferences.php b/preferences.php
index b21793a..a1057b1 100644
--- a/preferences.php
+++ b/preferences.php
@@ -1,8 +1,11 @@
<?php
+
+define('BASE','./');
+include(BASE.'functions/ical_parser.php');
+
if ($cookie_uri == '') {
$cookie_uri = $HTTP_SERVER_VARS['SERVER_NAME'].substr($HTTP_SERVER_VARS['PHP_SELF'],0,strpos($HTTP_SERVER_VARS['PHP_SELF'], '/'));
}
-define('BASE','./');
$current_view = "preferences";
$default_view = "$default_view" . ".php";
if ($allow_preferences == 'no') header("Location: $default_view");
@@ -42,7 +45,7 @@ if ($HTTP_COOKIE_VARS['phpicalendar']) {
#echo "$cookie_uri";
#print_r(unserialize($HTTP_COOKIE_VARS['phpicalendar']));
#print_r($phpicalendar);
-include(BASE.'functions/ical_parser.php');
+
if ((!isset($HTTP_COOKIE_VARS['phpicalendar'])) || ($cookie_unset)) {
# No cookie set -> use defaults from config file.

© 2014-2024 Faster IT GmbH | imprint | privacy policy