summaryrefslogtreecommitdiffstats
path: root/apps/calendar/appinfo
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-06-20 20:15:07 +0200
committerGeorg Ehrke <dev@georgswebsite.de>2012-06-20 20:15:07 +0200
commit40e7b567833ae74051e9d14adc3335a79732ca04 (patch)
tree740ae29e8099cb247d7ab10e6e3e967c3436a654 /apps/calendar/appinfo
parentc1d205cbf53f0844bbfe734ea9213761de5f99f1 (diff)
parent0f13cbb47daf46a2a2d121364529fd6082a74cc1 (diff)
downloadnextcloud-server-40e7b567833ae74051e9d14adc3335a79732ca04.tar.gz
nextcloud-server-40e7b567833ae74051e9d14adc3335a79732ca04.zip
Merge branch 'master' into calendar_export
Diffstat (limited to 'apps/calendar/appinfo')
-rw-r--r--apps/calendar/appinfo/app.php8
-rw-r--r--apps/calendar/appinfo/database.xml52
-rw-r--r--apps/calendar/appinfo/update.php7
-rw-r--r--apps/calendar/appinfo/version2
4 files changed, 67 insertions, 2 deletions
diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php
index 48192be6e76..22b91a41efe 100644
--- a/apps/calendar/appinfo/app.php
+++ b/apps/calendar/appinfo/app.php
@@ -5,10 +5,16 @@ OC::$CLASSPATH['OC_Calendar_Calendar'] = 'apps/calendar/lib/calendar.php';
OC::$CLASSPATH['OC_Calendar_Object'] = 'apps/calendar/lib/object.php';
OC::$CLASSPATH['OC_Calendar_Hooks'] = 'apps/calendar/lib/hooks.php';
OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre.php';
+OC::$CLASSPATH['OC_Calendar_Repeat'] = 'apps/calendar/lib/repeat.php';
OC::$CLASSPATH['OC_Calendar_Share'] = 'apps/calendar/lib/share.php';
OC::$CLASSPATH['OC_Search_Provider_Calendar'] = 'apps/calendar/lib/search.php';
OC::$CLASSPATH['OC_Calendar_Export'] = 'apps/calendar/lib/export.php';
OCP\Util::connectHook('OC_User', 'post_deleteUser', 'OC_Calendar_Hooks', 'deleteUser');
+OCP\Util::connectHook('OC_Calendar', 'addEvent', 'OC_Calendar_Repeat', 'generate');
+OCP\Util::connectHook('OC_Calendar', 'editEvent', 'OC_Calendar_Repeat', 'update');
+OCP\Util::connectHook('OC_Calendar', 'deleteEvent', 'OC_Calendar_Repeat', 'clean');
+OCP\Util::connectHook('OC_Calendar', 'moveEvent', 'OC_Calendar_Repeat', 'update');
+OCP\Util::connectHook('OC_Calendar', 'deleteCalendar', 'OC_Calendar_Repeat', 'cleanCalendar');
OCP\Util::addscript('calendar','loader');
OCP\Util::addscript("3rdparty", "chosen/chosen.jquery.min");
OCP\Util::addStyle("3rdparty", "chosen/chosen");
@@ -19,4 +25,4 @@ OCP\App::addNavigationEntry( array(
'icon' => OCP\Util::imagePath( 'calendar', 'icon.svg' ),
'name' => $l->t('Calendar')));
OCP\App::registerPersonal('calendar', 'settings');
-OC_Search::registerProvider('OC_Search_Provider_Calendar'); \ No newline at end of file
+OC_Search::registerProvider('OC_Search_Provider_Calendar');
diff --git a/apps/calendar/appinfo/database.xml b/apps/calendar/appinfo/database.xml
index 5a3ad32dc24..73457e6c6cc 100644
--- a/apps/calendar/appinfo/database.xml
+++ b/apps/calendar/appinfo/database.xml
@@ -290,4 +290,56 @@
</table>
+ <table>
+
+ <name>*dbprefix*calendar_repeat</name>
+
+ <declaration>
+
+ <field>
+ <name>id</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <autoincrement>1</autoincrement>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>eventid</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>calid</name>
+ <type>integer</type>
+ <default>0</default>
+ <notnull>true</notnull>
+ <unsigned>true</unsigned>
+ <length>4</length>
+ </field>
+
+ <field>
+ <name>startdate</name>
+ <type>timestamp</type>
+ <default>0000-00-00 00:00:00</default>
+ <notnull>false</notnull>
+ </field>
+
+ <field>
+ <name>enddate</name>
+ <type>timestamp</type>
+ <default>0000-00-00 00:00:00</default>
+ <notnull>false</notnull>
+ </field>
+
+ </declaration>
+
+ </table>
+
</database>
diff --git a/apps/calendar/appinfo/update.php b/apps/calendar/appinfo/update.php
index ce7f304a499..98159c33831 100644
--- a/apps/calendar/appinfo/update.php
+++ b/apps/calendar/appinfo/update.php
@@ -14,4 +14,11 @@ if (version_compare($installedVersion, '0.2.1', '<')) {
$stmt = OCP\DB::prepare( 'UPDATE *PREFIX*calendar_calendars SET calendarcolor=? WHERE id=?' );
$r = $stmt->execute(array($color,$id));
}
+}
+if (version_compare($installedVersion, '0.5', '<')) {
+ $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
+ foreach($calendars as $calendar){
+ OC_Calendar_Repeat::cleanCalendar($calendar['id']);
+ OC_Calendar_Repeat::generateCalendar($calendar['id']);
+ }
} \ No newline at end of file
diff --git a/apps/calendar/appinfo/version b/apps/calendar/appinfo/version
index 267577d47e4..2eb3c4fe4ee 100644
--- a/apps/calendar/appinfo/version
+++ b/apps/calendar/appinfo/version
@@ -1 +1 @@
-0.4.1
+0.5