diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-30 22:26:29 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-30 22:26:29 +0200 |
commit | f15941a967669c9a7e1e1c391b55e61a39e44484 (patch) | |
tree | d0fb8214999d48ae4a68e3bcef9e4d0bbe21e327 /apps/calendar/lib | |
parent | 4890bbb30d68d9b8afbadbe1b263035ecb9df676 (diff) | |
download | nextcloud-server-f15941a967669c9a7e1e1c391b55e61a39e44484.tar.gz nextcloud-server-f15941a967669c9a7e1e1c391b55e61a39e44484.zip |
improve dropimport
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r-- | apps/calendar/lib/import.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/calendar/lib/import.php b/apps/calendar/lib/import.php index 969725f5274..9076a747a4f 100644 --- a/apps/calendar/lib/import.php +++ b/apps/calendar/lib/import.php @@ -20,6 +20,11 @@ class OC_Calendar_Import{ private $calobject; /* + * @brief var counts the number of imported elements + */ + private $count; + + /* * @brief var to check if errors happend while initialization */ private $error; @@ -62,6 +67,7 @@ class OC_Calendar_Import{ public function __construct($ical){ $this->error = null; $this->ical = $ical; + $this->count = 0; try{ $this->calobject = OC_VObject::parse($this->ical); }catch(Exception $e){ @@ -89,6 +95,7 @@ class OC_Calendar_Import{ $object->DTEND->getDateTime()->setTimezone(new DateTimeZone($this->tz)); $vcalendar = $this->createVCalendar($object->serialize()); OC_Calendar_Object::add($this->id, $vcalendar); + $this->count++; } return true; } @@ -184,6 +191,15 @@ class OC_Calendar_Import{ $this->userid = $userid; return true; } + + /* + * @brief returns the private + * @param string $id of the user + * @return boolean + */ + public function getCount(){ + return $this->count; + } /* * private methods |