fix unsharing of events
This commit is contained in:
parent
c65adc12d5
commit
e256ac8791
|
@ -34,7 +34,7 @@ if($sharetype == 'user' && !OC_User::userExists($sharewith)){
|
|||
OC_JSON::error(array('message'=>'group not found'));
|
||||
exit;
|
||||
}
|
||||
$success = OC_Calendar_Share::unshare(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::Event));
|
||||
$success = OC_Calendar_Share::unshare(OC_User::getUser(), $sharewith, $sharetype, $id, (($idtype=='calendar') ? OC_Calendar_Share::CALENDAR : OC_Calendar_Share::EVENT));
|
||||
if($success){
|
||||
OC_JSON::success();
|
||||
}else{
|
||||
|
|
|
@ -37,7 +37,7 @@ echo html_select_options($allusers, array());
|
|||
<script>
|
||||
$('#sharewithuser_<?php echo $user['share']; ?> > img').click(function(){
|
||||
$('#share_user option[value="<?php echo $user['share']; ?>"]').removeAttr('disabled');
|
||||
Calendar.UI.Share.unshare(<?php echo $id; ?>, 'calendar', '<?php echo $user['share']; ?>', 'user');
|
||||
Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>', '<?php echo $user['share']; ?>', 'user');
|
||||
$('#sharewithuser_<?php echo $user['share']; ?>').remove();
|
||||
$("#share_user").trigger("liszt:updated");
|
||||
});
|
||||
|
@ -63,7 +63,7 @@ echo html_select_options($allgroups, array());
|
|||
<script>
|
||||
$('#sharewithgroup_<?php echo $group['share']; ?> > img').click(function(){
|
||||
$('#share_group option[value="<?php echo $group['share']; ?>"]').removeAttr('disabled');
|
||||
Calendar.UI.Share.unshare(<?php echo $id; ?>, 'calendar', '<?php echo $group['share']; ?>', 'group');
|
||||
Calendar.UI.Share.unshare(<?php echo $id; ?>, '<?php echo (array_key_exists('calid', $_)?'calendar':'event');?>, '<?php echo $group['share']; ?>', 'group'); ?>
|
||||
$('#sharewithgroup_<?php echo $group['share']; ?>').remove();
|
||||
$("#share_group").trigger("liszt:updated");
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue