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

github.com/nextcloud/tasks.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsahne123 <dev@sahne.it>2015-06-21 10:23:30 +0300
committersahne123 <dev@sahne.it>2015-06-21 10:23:30 +0300
commit4de763894c95a25e7941764fc04502e0c1ecf99e (patch)
tree08aa8bd6052be656f7cf6c5f81176078b6838bb5 /service
parent4fb07b7a03dbd58cc176107a45acf8fb5a2797e7 (diff)
check privacy for shared tasks
Diffstat (limited to 'service')
-rw-r--r--service/tasksservice.php17
1 files changed, 10 insertions, 7 deletions
diff --git a/service/tasksservice.php b/service/tasksservice.php
index 166abc95..e7e618dd 100644
--- a/service/tasksservice.php
+++ b/service/tasksservice.php
@@ -40,7 +40,9 @@ class TasksService {
if(is_null($task['summary'])) {
continue;
}
- $vtodo = Helper::parseVTODO($task['calendardata']);
+ if(!($vtodo = Helper::parseVTODO($task))){
+ continue;
+ }
try {
$task_data = Helper::arrayForJSON($task['id'], $vtodo, $user_timezone, $calendar['id']);
switch($type){
@@ -102,12 +104,13 @@ class TasksService {
$user_timezone = \OC_Calendar_App::getTimezone();
$task = array();
if($object['objecttype']=='VTODO' && !is_null($object['summary'])) {
- $vtodo = Helper::parseVTODO($object['calendardata']);
- try {
- $task_data = Helper::arrayForJSON($object['id'], $vtodo, $user_timezone, $object['calendarid']);
- $task[] = $task_data;
- } catch(\Exception $e) {
- \OCP\Util::writeLog('tasks', $e->getMessage(), \OCP\Util::ERROR);
+ if($vtodo = Helper::parseVTODO($object)){
+ try {
+ $task_data = Helper::arrayForJSON($object['id'], $vtodo, $user_timezone, $object['calendarid']);
+ $task[] = $task_data;
+ } catch(\Exception $e) {
+ \OCP\Util::writeLog('tasks', $e->getMessage(), \OCP\Util::ERROR);
+ }
}
}
return array(