Improve handling of calendar export $_GET params

* a notice would be reported if either of the 'cal' or 'event' $_GET params
   where not supplied, which would result in 'Cannot modify header information'
   warnings
This commit is contained in:
John Kristensen 2011-10-12 15:23:39 +11:00
parent ef8826ac2d
commit c86d1824fe
1 changed files with 2 additions and 2 deletions

View File

@ -9,8 +9,8 @@
require_once ("../../lib/base.php");
OC_Util::checkLoggedIn();
OC_Util::checkAppEnabled('calendar');
$cal = $_GET["calid"];
$event = $_GET["eventid"];
$cal = isset($_GET["calid"]) ? $_GET["calid"] : NULL;
$event = isset($_GET["eventid"]) ? $_GET["eventid"] : NULL;
if(isset($cal)){
$calendar = OC_Calendar_Calendar::findCalendar($cal);
if($calendar["userid"] != OC_User::getUser()){