summaryrefslogtreecommitdiffstats
path: root/apps/calendar
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2011-12-22 16:31:01 +0100
committerGeorg Ehrke <dev@georgswebsite.de>2011-12-22 16:31:01 +0100
commit5e6fa608eb2d80cce3b1263eb68a8edcd1d0c05c (patch)
tree573495ff08282afdc666e162532b9278429f4854 /apps/calendar
parent469e983a0222ce5cce282e26af9af47ce7100bd4 (diff)
downloadnextcloud-server-5e6fa608eb2d80cce3b1263eb68a8edcd1d0c05c.tar.gz
nextcloud-server-5e6fa608eb2d80cce3b1263eb68a8edcd1d0c05c.zip
use OC_JSON::checkLoggedIn() in all ajax files
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/ajax/activation.php4
-rw-r--r--apps/calendar/ajax/choosecalendar.php4
-rw-r--r--apps/calendar/ajax/deletecalendar.php4
-rw-r--r--apps/calendar/ajax/deleteevent.php4
-rw-r--r--apps/calendar/ajax/editcalendar.php4
-rw-r--r--apps/calendar/ajax/editevent.php4
-rw-r--r--apps/calendar/ajax/editeventform.php4
-rw-r--r--apps/calendar/ajax/importdialog.php4
-rw-r--r--apps/calendar/ajax/newcalendar.php4
-rw-r--r--apps/calendar/ajax/newevent.php4
-rw-r--r--apps/calendar/ajax/neweventform.php4
11 files changed, 11 insertions, 33 deletions
diff --git a/apps/calendar/ajax/activation.php b/apps/calendar/ajax/activation.php
index 3c2bc6de23f..ada2e44547b 100644
--- a/apps/calendar/ajax/activation.php
+++ b/apps/calendar/ajax/activation.php
@@ -7,9 +7,7 @@
*/
require_once ("../../../lib/base.php");
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['calendarid'];
$calendar = OC_Calendar_App::getCalendar($calendarid);//access check
diff --git a/apps/calendar/ajax/choosecalendar.php b/apps/calendar/ajax/choosecalendar.php
index 0935a4c42ad..9281c8edbdc 100644
--- a/apps/calendar/ajax/choosecalendar.php
+++ b/apps/calendar/ajax/choosecalendar.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar");
$output -> printpage();
diff --git a/apps/calendar/ajax/deletecalendar.php b/apps/calendar/ajax/deletecalendar.php
index fc308da6dad..901cbbfcb08 100644
--- a/apps/calendar/ajax/deletecalendar.php
+++ b/apps/calendar/ajax/deletecalendar.php
@@ -7,9 +7,7 @@
*/
require_once('../../../lib/base.php');
-if(!OC_USER::isLoggedIn()) {
- die('<script type="text/javascript">document.location = oc_webroot;</script>');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$cal = $_POST["calendarid"];
diff --git a/apps/calendar/ajax/deleteevent.php b/apps/calendar/ajax/deleteevent.php
index 269f4a47f42..b25a5af1a29 100644
--- a/apps/calendar/ajax/deleteevent.php
+++ b/apps/calendar/ajax/deleteevent.php
@@ -9,9 +9,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die('<script type="text/javascript">document.location = oc_webroot;</script>');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$id = $_POST['id'];
diff --git a/apps/calendar/ajax/editcalendar.php b/apps/calendar/ajax/editcalendar.php
index e44763c9aaa..7aeb5bbe305 100644
--- a/apps/calendar/ajax/editcalendar.php
+++ b/apps/calendar/ajax/editcalendar.php
@@ -7,9 +7,7 @@
*/
require_once('../../../lib/base.php');
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
diff --git a/apps/calendar/ajax/editevent.php b/apps/calendar/ajax/editevent.php
index f00ab1d960b..5a487da1758 100644
--- a/apps/calendar/ajax/editevent.php
+++ b/apps/calendar/ajax/editevent.php
@@ -7,9 +7,7 @@
*/
require_once('../../../lib/base.php');
-if(!OC_USER::isLoggedIn()) {
- die('<script type="text/javascript">document.location = oc_webroot;</script>');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php
index fe6c6f73570..2c81539d2e0 100644
--- a/apps/calendar/ajax/editeventform.php
+++ b/apps/calendar/ajax/editeventform.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
-if(!OC_USER::isLoggedIn()) {
- die('<script type="text/javascript">document.location = oc_webroot;</script>');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$id = $_GET['id'];
diff --git a/apps/calendar/ajax/importdialog.php b/apps/calendar/ajax/importdialog.php
index 232b4ba5807..8d8430da7aa 100644
--- a/apps/calendar/ajax/importdialog.php
+++ b/apps/calendar/ajax/importdialog.php
@@ -10,9 +10,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$tmpl = new OC_Template('calendar', 'part.import');
diff --git a/apps/calendar/ajax/newcalendar.php b/apps/calendar/ajax/newcalendar.php
index a7935c95672..af3ba4fbbea 100644
--- a/apps/calendar/ajax/newcalendar.php
+++ b/apps/calendar/ajax/newcalendar.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$calendarcolor_options = OC_Calendar_Calendar::getCalendarColorOptions();
$calendar = array(
diff --git a/apps/calendar/ajax/newevent.php b/apps/calendar/ajax/newevent.php
index 1a696cf7780..c7c4d29943a 100644
--- a/apps/calendar/ajax/newevent.php
+++ b/apps/calendar/ajax/newevent.php
@@ -10,9 +10,7 @@ require_once('../../../lib/base.php');
$l10n = new OC_L10N('calendar');
-if(!OC_USER::isLoggedIn()) {
- die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
diff --git a/apps/calendar/ajax/neweventform.php b/apps/calendar/ajax/neweventform.php
index e12e99219e6..6de1f8ca307 100644
--- a/apps/calendar/ajax/neweventform.php
+++ b/apps/calendar/ajax/neweventform.php
@@ -8,9 +8,7 @@
require_once('../../../lib/base.php');
-if(!OC_USER::isLoggedIn()) {
- die('<script type="text/javascript">document.location = oc_webroot;</script>');
-}
+OC_JSON::checkLoggedIn();
OC_JSON::checkAppEnabled('calendar');
if (!isset($_POST['start'])){