X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=plugins%2Fcalendar%2Fcalendar.php;h=b87d694336df2c0041598a35d9966d42090cc898;hb=65d0d1624a60633c008fd0b5631ca37713a7ad7c;hp=440c8d191d220a9ee18775e89ab7d3580380a707;hpb=8d8da447778a43b78bc95f9601b385416ad84477;p=squirrelmail.git diff --git a/plugins/calendar/calendar.php b/plugins/calendar/calendar.php index 440c8d19..b87d6943 100644 --- a/plugins/calendar/calendar.php +++ b/plugins/calendar/calendar.php @@ -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 @@ -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(); ?> - + \ No newline at end of file