aboutsummaryrefslogtreecommitdiffstats
path: root/functions/init.inc.php
diff options
context:
space:
mode:
authorJim Hu <jimhu@users.sourceforge.net>2005-11-29 08:35:48 +0000
committerJim Hu <jimhu@users.sourceforge.net>2005-11-29 08:35:48 +0000
commit9ac55e3b0c986411f19b9ca3aa99a087e2562b6b (patch)
tree3fd5ac2493872eff23381bdcd6233f0b5c67c2d7 /functions/init.inc.php
parent2b469d2b56c288f8fc18d004ed85e55832739e6f (diff)
downloadphpicalendar-9ac55e3b0c986411f19b9ca3aa99a087e2562b6b.tar.gz
phpicalendar-9ac55e3b0c986411f19b9ca3aa99a087e2562b6b.tar.bz2
phpicalendar-9ac55e3b0c986411f19b9ca3aa99a087e2562b6b.zip
init.inc.php - strip . from cpath, change time calc, calendar_functions.php change in getCalendarname to not truncate names not ending in .ics
Diffstat (limited to 'functions/init.inc.php')
-rw-r--r--functions/init.inc.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/functions/init.inc.php b/functions/init.inc.php
index 60a6633..034171f 100644
--- a/functions/init.inc.php
+++ b/functions/init.inc.php
@@ -26,16 +26,16 @@ if (isset($_COOKIE['phpicalendar'])) {
if (isset($phpicalendar['cookie_startday'])) $week_start_day = $phpicalendar['cookie_startday'];
if (isset($phpicalendar['cookie_time'])) $day_start = $phpicalendar['cookie_time'];
}
+#cpath modifies the calendar path based on the url or cookie values. This allows you to run multiple calendar subsets from a single phpicalendar installation. Operations on cpath are largely hidden from the end user.
if($_REQUEST['cpath']){
- $cpath = $_REQUEST['cpath'];
+ $cpath = str_replace('.','',$_REQUEST['cpath']);
$calendar_path .= "/$cpath";
$tmp_dir .= "/$cpath";
}elseif(isset($default_cpath_check)){
- $cpath = $default_cpath_check;
+ $cpath = str_replace('.','',$default_cpath_check);
$calendar_path .= "/$cpath";
$tmp_dir .= "/$cpath";
}
-
#these need cpath to be set
include_once(BASE.'functions/calendar_functions.php');
include_once(BASE.'functions/userauth_functions.php');
@@ -75,7 +75,7 @@ if (!isset($getdate)) {
if (isset($_GET['getdate']) && ($_GET['getdate'] !== '')) {
$getdate = $_GET['getdate'];
} else {
- $getdate = date('Ymd', strtotime("now + $second_offset seconds"));
+ $getdate = date('Ymd', time() + $second_offset);
}
}

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