cvs: phpweb / cal.php
| From: | Gabor Hojtsy | Date: | Wed, 15 Jan 2003 17:04:23 +0000 |
| Subject: | cvs: phpweb / cal.php | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-15038@lists.php.net to get a copy of this message | ||
goba Wed Jan 15 12:04:23 2003 EDT
Modified files:
/phpweb cal.php
Log:
Only allow the same year. The events.cvs file only contains data for
this month and the coming two months, starting from today, so providing
information for the future or the past is only an illusion. Only the
recurring events are displayed on those pages, so there is no point in
serving them.
Index: phpweb/cal.php
diff -u phpweb/cal.php:1.37 phpweb/cal.php:1.38
--- phpweb/cal.php:1.37 Mon Dec 16 12:25:10 2002
+++ phpweb/cal.php Wed Jan 15 12:04:21 2003
@@ -19,7 +19,7 @@
// If the year is not valid, set it to the current year
// This excludes all the "too old", or "too far in the future"
-// calendar to displays (so search engines can handle this page too)
+// calendar displays (so search engines can handle this page too)
if ($cy != 0 && !valid_year($cy)) {
$cy = date("Y");
}
@@ -355,9 +355,8 @@
// Get current year and compare to one sent in
$current_year = date("Y");
- // We only allow two years back (for historical reasons) and two
- // years forth (to plan your schedule for the next year)
- if (($year < $current_year - 2) || ($year > $current_year + 2)) {
+ // We only allow this year for displays
+ if ($year != $current_year) {
return FALSE;
}