]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix login check in ajax files
authorGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 20:02:11 +0000 (21:02 +0100)
committerGeorg Ehrke <dev@georgswebsite.de>
Thu, 5 Jan 2012 20:02:11 +0000 (21:02 +0100)
apps/calendar/ajax/editeventform.php
apps/calendar/ajax/importdialog.php
apps/calendar/ajax/neweventform.php

index a38706263264b776c1ba251ab439c3dfb3b231ad..95cae39c1c2cc877ce9379aeef48a2979f30bfcf 100644 (file)
@@ -8,7 +8,9 @@
 
 require_once('../../../lib/base.php');
 
-OC_JSON::checkLoggedIn();
+if(!OC_USER::isLoggedIn()) {
+       die('<script type="text/javascript">document.location = oc_webroot;</script>');
+}
 OC_JSON::checkAppEnabled('calendar');
 
 $id = $_GET['id'];
index 8d8430da7aa9df137af187fa198208ea56b67f78..983a3d95a8400de43bce6d91cdb8c9b0c3259f53 100644 (file)
@@ -10,7 +10,9 @@ require_once('../../../lib/base.php');
 
 $l10n = new OC_L10N('calendar');
 
-OC_JSON::checkLoggedIn();
+if(!OC_USER::isLoggedIn()) {
+       die('<script type="text/javascript">document.location = oc_webroot;</script>');
+}
 OC_JSON::checkAppEnabled('calendar');
 
 $tmpl = new OC_Template('calendar', 'part.import');
index 88468dd3dbfbeca4b3b4e53ddd67b78afeddcd83..3870c879b0ed513dc586e5439474a08608a95f88 100644 (file)
@@ -8,7 +8,9 @@
 
 require_once('../../../lib/base.php');
 
-OC_JSON::checkLoggedIn();
+if(!OC_USER::isLoggedIn()) {
+       die('<script type="text/javascript">document.location = oc_webroot;</script>');
+}
 OC_JSON::checkAppEnabled('calendar');
 
 if (!isset($_POST['start'])){