use OC_JSON::checkLoggedIn() in all ajax files

This commit is contained in:
Georg Ehrke 2011-12-22 16:31:01 +01:00
parent 469e983a02
commit 5e6fa608eb
11 changed files with 11 additions and 33 deletions

View File

@ -7,9 +7,7 @@
*/ */
require_once ("../../../lib/base.php"); require_once ("../../../lib/base.php");
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['calendarid']; $calendarid = $_POST['calendarid'];
$calendar = OC_Calendar_App::getCalendar($calendarid);//access check $calendar = OC_Calendar_App::getCalendar($calendarid);//access check

View File

@ -8,9 +8,7 @@
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar'); $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar"); $output = new OC_TEMPLATE("calendar", "part.choosecalendar");
$output -> printpage(); $output -> printpage();

View File

@ -7,9 +7,7 @@
*/ */
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$cal = $_POST["calendarid"]; $cal = $_POST["calendarid"];

View File

@ -9,9 +9,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar'); $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$id = $_POST['id']; $id = $_POST['id'];

View File

@ -7,9 +7,7 @@
*/ */
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions(); $calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();

View File

@ -7,9 +7,7 @@
*/ */
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST); $errarr = OC_Calendar_Object::validateRequest($_POST);

View File

@ -8,9 +8,7 @@
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$id = $_GET['id']; $id = $_GET['id'];

View File

@ -10,9 +10,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar'); $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$tmpl = new OC_Template('calendar', 'part.import'); $tmpl = new OC_Template('calendar', 'part.import');

View File

@ -8,9 +8,7 @@
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar'); $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions(); $calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
$calendar = array( $calendar = array(

View File

@ -10,9 +10,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar'); $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST); $errarr = OC_Calendar_Object::validateRequest($_POST);

View File

@ -8,9 +8,7 @@
require_once('../../../lib/base.php'); require_once('../../../lib/base.php');
if(!OC_USER::isLoggedIn()) { OC_JSON::checkLoggedIn();
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
OC_JSON::checkAppEnabled('calendar'); OC_JSON::checkAppEnabled('calendar');
if (!isset($_POST['start'])){ if (!isset($_POST['start'])){