From e4529301ff2ff8f8b6cb668cd48243070dabebde Mon Sep 17 00:00:00 2001 From: Georg Ehrke Date: Fri, 15 Jun 2012 11:34:21 +0200 Subject: [PATCH] change some function names in OC_Calendar_Repeat --- apps/calendar/appinfo/app.php | 2 +- apps/calendar/appinfo/update.php | 4 ++-- apps/calendar/lib/repeat.php | 16 ++++++++-------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/apps/calendar/appinfo/app.php b/apps/calendar/appinfo/app.php index 89821d37d8..f1f2a26d87 100644 --- a/apps/calendar/appinfo/app.php +++ b/apps/calendar/appinfo/app.php @@ -13,7 +13,7 @@ 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::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"); diff --git a/apps/calendar/appinfo/update.php b/apps/calendar/appinfo/update.php index ab8a5263bd..98159c3383 100644 --- a/apps/calendar/appinfo/update.php +++ b/apps/calendar/appinfo/update.php @@ -18,7 +18,7 @@ if (version_compare($installedVersion, '0.2.1', '<')) { 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']); + OC_Calendar_Repeat::cleanCalendar($calendar['id']); + OC_Calendar_Repeat::generateCalendar($calendar['id']); } } \ No newline at end of file diff --git a/apps/calendar/lib/repeat.php b/apps/calendar/lib/repeat.php index 889a0eb3f4..d1b14eea91 100644 --- a/apps/calendar/lib/repeat.php +++ b/apps/calendar/lib/repeat.php @@ -49,7 +49,7 @@ class OC_Calendar_Repeat{ * @param (int) $id - id of the calendar * @return (array) */ - public static function getcalendar($id){ + public static function getCalendar($id){ $stmt = OCP\DB::prepare('SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?'); $result = $stmt->execute(array($id)); $return = array(); @@ -65,7 +65,7 @@ class OC_Calendar_Repeat{ * @param (string) $until - end for period in UTC * @return (array) */ - public static function getcalendar_inperiod($id, $from, $until){ + public static function getCalendar_inperiod($id, $from, $until){ $stmt = OCP\DB::prepare( 'SELECT * FROM *PREFIX*calendar_repeat WHERE calid = ?' .' AND ((startdate >= ? AND startdate <= ?)' .' OR (enddate >= ? AND enddate <= ?))'); @@ -122,7 +122,7 @@ class OC_Calendar_Repeat{ * @param (int) id - id of the calendar * @return (bool) */ - public static function generatecalendar($id){ + public static function generateCalendar($id){ $allobjects = OC_Calendar_Object::all($id); foreach($allobjects['id'] as $eventid){ self::generate($eventid); @@ -144,9 +144,9 @@ class OC_Calendar_Repeat{ * @param (int) id - id of the calendar * @return (bool) */ - public static function updatecalendar($id){ - self::cleancalendar($id); - self::generatecalendar($id); + public static function updateCalendar($id){ + self::cleanCalendar($id); + self::generateCalendar($id); return true; } /* @@ -182,7 +182,7 @@ class OC_Calendar_Repeat{ * @return (bool) */ public static function is_calendar_cached($id){ - $cachedevents = count(self::getcalendar($id)); + $cachedevents = count(self::getCalendar($id)); $repeatingevents = 0; $allevents = OC_Calendar_Object::all($id); foreach($allevents as $event){ @@ -210,7 +210,7 @@ class OC_Calendar_Repeat{ * @param (int) id - id of the calendar * @return (bool) */ - public static function cleancalendar($id){ + public static function cleanCalendar($id){ $stmt = OCP\DB::prepare('DELETE FROM *PREFIX*calendar_repeat WHERE calid = ?'); $stmt->execute(array($id)); }