Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-14 05:49:24 +0400
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-14 05:49:24 +0400
commite256ac8791eedcb3dcab1ade0927f1831e24d2e2 (patch)
tree633416cc58089606b556328d27bd1b156fe83a2f /apps/calendar
parentc65adc12d5ff5beef79edcd26af698de1bdb377c (diff)
fix unsharing of events
Diffstat (limited to 'apps/calendar')
-rw-r--r--apps/calendar/ajax/share/unshare.php2
-rw-r--r--apps/calendar/templates/share.dropdown.php6
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/calendar/ajax/share/unshare.php b/apps/calendar/ajax/share/unshare.php
index 25a0ef48fcf..5bedbaaf0a6 100644
--- a/apps/calendar/ajax/share/unshare.php
+++ b/apps/calendar/ajax/share/unshare.php
@@ -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{
diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php
index 3ed75be6363..71556a6a21c 100644
--- a/apps/calendar/templates/share.dropdown.php
+++ b/apps/calendar/templates/share.dropdown.php
@@ -19,7 +19,7 @@ foreach($sharedelements as $sharedelement){
?>
<strong><?php echo $l->t('Users');?>:</strong><br>
<select id="share_user" title="<?php echo $l->t('select users');?>" data-placeholder="<?php echo $l->t('select users'); ?>">
-<option value=""></option>
+<option value=""></option>
<?php
$allocusers = OC_User::getUsers();
$allusers = array();
@@ -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");
});