change some function names in OC_Calendar_Repeat
This commit is contained in:
parent
5c10683432
commit
e4529301ff
|
@ -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");
|
||||
|
|
|
@ -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']);
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue