]> source.dussan.org Git - nextcloud-server.git/commitdiff
set sendMail status back to false
authorBjoern Schiessle <schiessle@owncloud.com>
Fri, 30 Aug 2013 14:29:22 +0000 (16:29 +0200)
committerBjoern Schiessle <schiessle@owncloud.com>
Fri, 30 Aug 2013 14:29:22 +0000 (16:29 +0200)
core/ajax/share.php
core/js/share.js

index 9727f7d02e3da8875638260a37dfcc228ead94a3..76a67f54720bd070480507a5ff5e98785d6f5fa3 100644 (file)
@@ -134,7 +134,7 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
                                                                \OCP\User::getDisplayName()
                                                );
                                        } catch (Exception $exception) {
-                                               $noMail[] = \OCP\User::getDisplayName($recipient['displayName']);
+                                               $noMail[] = \OCP\User::getDisplayName($recipient);
                                        }
                                } else {
                                        $noMail[] = \OCP\User::getDisplayName($recipient);
@@ -151,12 +151,10 @@ if (isset($_POST['action']) && isset($_POST['itemType']) && isset($_POST['itemSo
                        break;
                case 'informRecipientsDisabled':
                        $itemSource = $_POST['itemSource'];
+                       $shareType = $_POST['shareType'];
                        $itemType = $_POST['itemType'];
                        $recipient = $_POST['recipient'];
-                       //$share = $shareManager->getShares($itemType, array('shareWith' => $recipient, 'isShareWithUser' => true, 'itemSource' => $itemSource));
-                       //$share[0]->setMailSend(false);
-                       //$shareManager->update($share[0]);
-                       //write status to db
+                       \OCP\Share::setSendMailStatus($itemType, $itemSource, $shareType, false);
                        OCP\JSON::success();
                        break;
 
index 7d7f580c9bb7543fda53a0477352005ae91d2e7e..e253f77ef2755b2a0adf078c0097e549fe65f820 100644 (file)
@@ -695,9 +695,7 @@ $(document).ready(function() {
                }
        });
 
-       $(document).on('click', '#dropdown input[name=mailNotification]', function(event) {
-               event.preventDefault();
-               event.stopPropagation();
+       $(document).on('click', '#dropdown input[name=mailNotification]', function() {
                var li = $(this).parent();
                var itemType = $('#dropdown').data('item-type');
                var itemSource = $('#dropdown').data('item-source');