-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Here's a quick patch that allows a url to be constructed as follows:
index.php?cal=Calendar
- --- BEGIN DIFF
Index: index.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/index.php,v
retrieving revision 1.5
diff -u -r1.5 index.php
- --- index.php 17 Nov 2002 02:32:10 -0000 1.5
+++ index.php 23 Nov 2002 02:33:02 -0000
@@ -5,11 +5,18 @@
$phpicalendar =
unserialize(stripslashes($HTTP_COOKIE_VARS['phpicalendar']));
$default_view = $phpicalendar['cookie_view'];
}
+
if ($printview_default == 'yes') {
$default_view = "print.php?printview=$default_view";
} else {
$default_view = "$default_view" . ".php";
}
+
+if (isset($HTTP_GET_VARS['cal'])) {
+ $cal = $HTTP_GET_VARS['cal'];
+ $default_view .= "?cal=$cal";
+}
+
header("Location: $default_view");
- -?>
\ No newline at end of file
+?>
- --- END DIFF
I wanted to be able to create RSS links that automatically went to the
appropriate calendar, without bypassing the default calendar view. The
above patch fixes that, and this diff fixes the RSS generator:
- --- BEGIN DIFF
Index: rss.php
===================================================================
RCS file: /cvsroot/phpicalendar/phpicalendar/rss/rss.php,v
retrieving revision 1.15
diff -u -r1.15 rss.php
- --- rss.php 22 Nov 2002 21:16:58 -0000 1.15
+++ rss.php 23 Nov 2002 02:35:02 -0000
@@ -43,7 +75,7 @@
$rss .= '<rss version="0.91">'."\n";
$rss .= '<channel>'."\n";
$rss .= '<title>'.$cal_displayname.' - '.$theview.'</title>'."\n";
- -$rss .= '<link>'.htmlspecialchars ("$default_path").'</link>'."\n";
+$rss .= '<link>'.htmlspecialchars
("$default_path").'/index.php?cal='.$cal_displayname.'</link>'."\n";
$rss .= '<description>'.$cal_displayname.' '.$calendar_lang.' -
'.$theview.'</description>'."\n";
$rss .= '<language>'.$rss_language.'</language>'."\n";
$rss .= '<copyright>Copyright 2002, '.htmlspecialchars
("$default_path").'</copyright>'."\n";
- --- END DIFF
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)
iD8DBQE93unP0LjU31/N6YgRAkVBAKClEN8uKgO5gB4BnGpxvDXaEviXaACdG53O
BiPP+I3RHHGfvOU5e2cXi5U=
=vZcX
-----END PGP SIGNATURE-----
|