Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
3bcf176a
Commit
3bcf176a
authored
12 years ago
by
Georg Ehrke
Browse files
Options
Downloads
Patches
Plain Diff
add some hooks to fix calendar sharing
parent
7e9455c3
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
apps/calendar/appinfo/app.php
+5
-0
5 additions, 0 deletions
apps/calendar/appinfo/app.php
apps/calendar/lib/share.php
+23
-1
23 additions, 1 deletion
apps/calendar/lib/share.php
with
28 additions
and
1 deletion
apps/calendar/appinfo/app.php
+
5
−
0
View file @
3bcf176a
...
...
@@ -8,12 +8,17 @@ OC::$CLASSPATH['OC_Connector_Sabre_CalDAV'] = 'apps/calendar/lib/connector_sabre
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'
;
//General Hooks
OCP\Util
::
connectHook
(
'OC_User'
,
'post_deleteUser'
,
'OC_Calendar_Hooks'
,
'deleteUser'
);
//Repeating Events Hooks
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'
);
//Sharing Hooks
OCP\Util
::
connectHook
(
'OC_Calendar'
,
'deleteEvent'
,
'OC_Calendar_Share'
,
'post_eventdelete'
);
OCP\Util
::
connectHook
(
'OC_Calendar'
,
'deleteCalendar'
,
'OC_Calendar_Share'
,
'post_caldelete'
);
OCP\Util
::
addscript
(
'calendar'
,
'loader'
);
OCP\Util
::
addscript
(
"3rdparty"
,
"chosen/chosen.jquery.min"
);
OCP\Util
::
addStyle
(
"3rdparty"
,
"chosen/chosen"
);
...
...
This diff is collapsed.
Click to expand it.
apps/calendar/lib/share.php
+
23
−
1
View file @
3bcf176a
...
...
@@ -258,7 +258,7 @@ class OC_Calendar_Share{
}
/*
* @brief delete all shared calendars / events after a user was deleted
* @brief delete
s
all shared calendars / events after a user was deleted
* @param (string) $userid
* @return (bool)
*/
...
...
@@ -273,4 +273,26 @@ class OC_Calendar_Share{
$stmt
->
execute
(
array
(
$userid
));
return
true
;
}
/*
* @brief deletes all shared events of a calendar
* @param integer $calid
* @return boolean
*/
public
static
function
post_caldelete
(
$calid
){
$stmt
=
OCP\DB
::
prepare
(
'DELETE FROM *PREFIX*calendar_share_calendar WHERE calendarid = ?'
);
$stmt
->
execute
(
array
(
$calid
));
return
true
;
}
/*
* @brief deletes all shares of an event
* @param integer $eventid
* @return boolean
*/
public
static
function
post_eventdelete
(
$eventid
){
$stmt
=
OCP\DB
::
prepare
(
'DELETE FROM *PREFIX*calendar_share_event WHERE eventid = ?'
);
$stmt
->
execute
(
array
(
$eventid
));
return
true
;
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment