Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2011-10-01 01:05:10 +0400
committerBart Visscher <bartv@thisnet.nl>2011-10-01 01:17:18 +0400
commitf4782a76907cf010faf9f4cd7deb3a67a2d02de9 (patch)
treeff3236d0f2785bc6946e84a80e69cf65a1fd6559 /apps/calendar
parentddd359989909add47912ad358bec55a924907d81 (diff)
Check if the application is actually enabled
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/ajax/activation.php1
-rw-r--r--apps/calendar/ajax/changeview.php1
-rw-r--r--apps/calendar/ajax/choosecalendar.php1
-rw-r--r--apps/calendar/ajax/createcalendar.php1
-rw-r--r--apps/calendar/ajax/deletecalendar.php1
-rw-r--r--apps/calendar/ajax/deleteevent.php1
-rw-r--r--apps/calendar/ajax/editcalendar.php1
-rw-r--r--apps/calendar/ajax/editevent.php1
-rw-r--r--apps/calendar/ajax/editeventform.php1
-rw-r--r--apps/calendar/ajax/getcal.php1
-rw-r--r--apps/calendar/ajax/newcalendar.php1
-rw-r--r--apps/calendar/ajax/newevent.php1
-rw-r--r--apps/calendar/ajax/neweventform.php1
-rw-r--r--apps/calendar/ajax/settimezone.php1
-rw-r--r--apps/calendar/ajax/updatecalendar.php1
-rw-r--r--apps/calendar/caldav.php1
-rw-r--r--apps/calendar/export.php1
-rw-r--r--apps/calendar/index.php1
18 files changed, 18 insertions, 0 deletions
diff --git a/apps/calendar/ajax/activation.php b/apps/calendar/ajax/activation.php
index 38f727e9488..89239f21759 100644
--- a/apps/calendar/ajax/activation.php
+++ b/apps/calendar/ajax/activation.php
@@ -10,6 +10,7 @@ require_once ("../../../lib/base.php");
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['calendarid'];
OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
$cal = OC_Calendar_Calendar::findCalendar($calendarid);
diff --git a/apps/calendar/ajax/changeview.php b/apps/calendar/ajax/changeview.php
index d19a11585a0..b396ff4945b 100644
--- a/apps/calendar/ajax/changeview.php
+++ b/apps/calendar/ajax/changeview.php
@@ -10,6 +10,7 @@ require_once ("../../../lib/base.php");
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$currentview = $_GET["v"];
OC_Preferences::setValue(OC_USER::getUser(), "calendar", "currentview", $currentview);
?>
diff --git a/apps/calendar/ajax/choosecalendar.php b/apps/calendar/ajax/choosecalendar.php
index 44ff22906f1..0935a4c42ad 100644
--- a/apps/calendar/ajax/choosecalendar.php
+++ b/apps/calendar/ajax/choosecalendar.php
@@ -11,6 +11,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$output = new OC_TEMPLATE("calendar", "part.choosecalendar");
$output -> printpage();
?>
diff --git a/apps/calendar/ajax/createcalendar.php b/apps/calendar/ajax/createcalendar.php
index 7d80333b258..82176d4368a 100644
--- a/apps/calendar/ajax/createcalendar.php
+++ b/apps/calendar/ajax/createcalendar.php
@@ -12,6 +12,7 @@ $l10n = new OC_L10N('calendar');
// Check if we are a user
OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
$userid = OC_User::getUser();
$calendarid = OC_Calendar_Calendar::addCalendar($userid, $_POST['name'], $_POST['description'], 'VEVENT,VTODO,VJOURNAL', null, 0, $_POST['color']);
diff --git a/apps/calendar/ajax/deletecalendar.php b/apps/calendar/ajax/deletecalendar.php
index 30607b92e6f..e8ffe0d0598 100644
--- a/apps/calendar/ajax/deletecalendar.php
+++ b/apps/calendar/ajax/deletecalendar.php
@@ -12,6 +12,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
+OC_JSON::checkAppEnabled('calendar');
$cal = $_POST["calendarid"];
$calendar = OC_Calendar_Calendar::findCalendar($cal);
diff --git a/apps/calendar/ajax/deleteevent.php b/apps/calendar/ajax/deleteevent.php
index a6750267bd2..9e3c7dd87dd 100644
--- a/apps/calendar/ajax/deleteevent.php
+++ b/apps/calendar/ajax/deleteevent.php
@@ -12,6 +12,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
+OC_JSON::checkAppEnabled('calendar');
$id = $_POST['id'];
$data = OC_Calendar_Object::find($id);
diff --git a/apps/calendar/ajax/editcalendar.php b/apps/calendar/ajax/editcalendar.php
index 8f798d1bbf2..7ff869f8885 100644
--- a/apps/calendar/ajax/editcalendar.php
+++ b/apps/calendar/ajax/editcalendar.php
@@ -11,6 +11,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$calendar = OC_Calendar_Calendar::findCalendar($_GET['calendarid']);
$tmpl = new OC_Template("calendar", "part.editcalendar");
$tmpl->assign('new', false);
diff --git a/apps/calendar/ajax/editevent.php b/apps/calendar/ajax/editevent.php
index 7187e05d56f..3abf4de98b3 100644
--- a/apps/calendar/ajax/editevent.php
+++ b/apps/calendar/ajax/editevent.php
@@ -13,6 +13,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
+OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
if($errarr){
diff --git a/apps/calendar/ajax/editeventform.php b/apps/calendar/ajax/editeventform.php
index e2d32d03d3d..34d6c657cec 100644
--- a/apps/calendar/ajax/editeventform.php
+++ b/apps/calendar/ajax/editeventform.php
@@ -13,6 +13,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
+OC_JSON::checkAppEnabled('calendar');
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
$category_options = OC_Calendar_Object::getCategoryOptions($l10n);
diff --git a/apps/calendar/ajax/getcal.php b/apps/calendar/ajax/getcal.php
index 7fa4f87cd31..c59cb873fdc 100644
--- a/apps/calendar/ajax/getcal.php
+++ b/apps/calendar/ajax/getcal.php
@@ -10,6 +10,7 @@ require_once ("../../../lib/base.php");
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser(), 1);
$events = array();
diff --git a/apps/calendar/ajax/newcalendar.php b/apps/calendar/ajax/newcalendar.php
index ffcffb8afd7..199f95fb463 100644
--- a/apps/calendar/ajax/newcalendar.php
+++ b/apps/calendar/ajax/newcalendar.php
@@ -11,6 +11,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$calendar = array(
'id' => 'new',
'displayname' => 'Test',
diff --git a/apps/calendar/ajax/newevent.php b/apps/calendar/ajax/newevent.php
index 9ac3b0aaff6..1a696cf7780 100644
--- a/apps/calendar/ajax/newevent.php
+++ b/apps/calendar/ajax/newevent.php
@@ -13,6 +13,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die("<script type=\"text/javascript\">document.location = oc_webroot;</script>");
}
+OC_JSON::checkAppEnabled('calendar');
$errarr = OC_Calendar_Object::validateRequest($_POST);
if($errarr){
diff --git a/apps/calendar/ajax/neweventform.php b/apps/calendar/ajax/neweventform.php
index 7099ea718e9..9bab2cd4846 100644
--- a/apps/calendar/ajax/neweventform.php
+++ b/apps/calendar/ajax/neweventform.php
@@ -13,6 +13,7 @@ $l10n = new OC_L10N('calendar');
if(!OC_USER::isLoggedIn()) {
die('<script type="text/javascript">document.location = oc_webroot;</script>');
}
+OC_JSON::checkAppEnabled('calendar');
$calendar_options = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
$category_options = OC_Calendar_Object::getCategoryOptions($l10n);
diff --git a/apps/calendar/ajax/settimezone.php b/apps/calendar/ajax/settimezone.php
index 2b82bc8e4bc..c726a11471d 100644
--- a/apps/calendar/ajax/settimezone.php
+++ b/apps/calendar/ajax/settimezone.php
@@ -13,6 +13,7 @@ $l=new OC_L10N('calendar');
// Check if we are a user
OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
// Get data
if( isset( $_POST['timezone'] ) ){
diff --git a/apps/calendar/ajax/updatecalendar.php b/apps/calendar/ajax/updatecalendar.php
index d53515d0deb..5cf48d50ea1 100644
--- a/apps/calendar/ajax/updatecalendar.php
+++ b/apps/calendar/ajax/updatecalendar.php
@@ -12,6 +12,7 @@ $l10n = new OC_L10N('calendar');
// Check if we are a user
OC_JSON::checkLoggedIn();
+OC_JSON::checkAppEnabled('calendar');
$calendarid = $_POST['id'];
OC_Calendar_Calendar::editCalendar($calendarid, $_POST['name'], $_POST['description'], null, null, null, $_POST['color']);
diff --git a/apps/calendar/caldav.php b/apps/calendar/caldav.php
index 83f6a5ab51d..b581274398d 100644
--- a/apps/calendar/caldav.php
+++ b/apps/calendar/caldav.php
@@ -10,6 +10,7 @@
$RUNTIME_NOSETUPFS = true;
require_once('../../lib/base.php');
+OC_Util::checkAppEnabled('calendar');
// Backends
$authBackend = new OC_Connector_Sabre_Auth();
diff --git a/apps/calendar/export.php b/apps/calendar/export.php
index a6fdaba1d2f..feb4755a3aa 100644
--- a/apps/calendar/export.php
+++ b/apps/calendar/export.php
@@ -8,6 +8,7 @@
require_once ("../../lib/base.php");
OC_Util::checkLoggedIn();
+OC_Util::checkAppEnabled('calendar');
$cal = $_GET["calid"];
$calendar = OC_Calendar_Calendar::findCalendar($cal);
if($calendar["userid"] != OC_User::getUser()){
diff --git a/apps/calendar/index.php b/apps/calendar/index.php
index 39f961d1bb9..1e4d724b307 100644
--- a/apps/calendar/index.php
+++ b/apps/calendar/index.php
@@ -8,6 +8,7 @@
require_once ('../../lib/base.php');
OC_Util::checkLoggedIn();
+OC_Util::checkAppEnabled('calendar');
// Create default calendar ...
$calendars = OC_Calendar_Calendar::allCalendars(OC_User::getUser());
if( count($calendars) == 0){