removed local directory name used for testing.
[squirrelmail.git] / plugins / calendar / calendar.php
index 440c8d191d220a9ee18775e89ab7d3580380a707..b87d694336df2c0041598a35d9966d42090cc898 100644 (file)
@@ -3,7 +3,7 @@
 /**
  * calendar.php
  *
- * Copyright (c) 2002-2004 The SquirrelMail Project Team
+ * Copyright (c) 2002-2005 The SquirrelMail Project Team
  * Licensed under the GNU GPL. For full terms see the file COPYING.
  *
  * Originally contrubuted by Michal Szczotka <michal@tuxy.org>
@@ -34,16 +34,20 @@ require_once(SM_PATH . 'functions/html.php');
 
 /* get globals */
 
-if (isset($_GET['month'])) {
+// undo rg = on effects
+if (isset($month)) unset($month);
+if (isset($year))  unset($year);
+
+if (isset($_GET['month']) && is_numeric($_GET['month'])) {
     $month = $_GET['month'];
 }
-if (isset($_GET['year'])) {
+if (isset($_GET['year']) && is_numeric($_GET['year'])) {
     $year = $_GET['year'];
 }
-if (isset($_POST['year'])) {
+if (isset($_POST['year']) && is_numeric($_POST['year'])) {
     $year = $_POST['year'];
 }
-if (isset($_POST['month'])) {
+if (isset($_POST['month']) && is_numeric($_POST['month'])) {
     $month = $_POST['month'];
 }
 /* got 'em */
@@ -177,4 +181,4 @@ drawmonthview();
 endcalendar();
 
 ?>
-</body></html>
+</body></html>
\ No newline at end of file