]> git.proxmox.com Git - pmg-gui.git/commitdiff
Revert "doQuarantineAction: pass pmail parameter"
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Dec 2017 11:47:11 +0000 (12:47 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 28 Dec 2017 11:47:11 +0000 (12:47 +0100)
This reverts commit 794e411a4f1c5a4102dc7666bcc95fe6576d6a58.

Not required any longer, because the backend now encode all info inside
the id.

js/SpamQuarantine.js
js/Utils.js
js/VirusQuarantine.js

index 56c6726d5783b3c88b0c49db8fd97273f133254b..cec03c169e8c30a672f3f2321c7c43cc657440f2 100644 (file)
@@ -80,16 +80,10 @@ Ext.define('PMG.SpamQuarantine', {
            if (!selected.length) {
                return;
            }
-           var rec = selected[0];
 
            var action = button.reference;
 
-           var receiver = list.user;
-           if (action === 'deliver' || action === 'delete') {
-               receiver = rec.data.receiver || list.user;
-           }
-
-           PMG.Utils.doQuarantineAction(action, rec.data.id, receiver, function() {
+           PMG.Utils.doQuarantineAction(action, selected[0].data.id, function() {
                list.getController().load();
            });
        },
index ca510c225a281e742845250b7b432bff580a3be0..dbc3e78f77d84d0cbf4e0d7e1b1a05116d90e048 100644 (file)
@@ -678,15 +678,13 @@ Ext.define('PMG.Utils', {
        }
     },
 
-    doQuarantineAction: function(action, id, pmail, callback) {
-       var params = {
-           action: action,
-           id: id
-       };
-       if (pmail !== undefined) { params.pmail = pmail; }
+    doQuarantineAction: function(action, id, callback) {
        Proxmox.Utils.API2Request({
            url: '/quarantine/content/',
-           params: params,
+           params: {
+               action: action,
+               id: id
+           },
            method: 'POST',
            failure: function(response, opts) {
                Ext.Msg.alert(gettext('Error'), response.htmlStatus);
index a3dead828e768fcdca548c095c2f9486df71c60b..b33568b01fef4f4a922bf0d3985cb0544473afa5 100644 (file)
@@ -63,12 +63,10 @@ Ext.define('PMG.VirusQuarantine', {
            if (!selected.length) {
                return;
            }
-           var rec = selected[0];
 
            var action = button.reference;
-           var receiver = rec.data.receiver;
 
-           PMG.Utils.doQuarantineAction(action, rec.data.id, receiver, function() {
+           PMG.Utils.doQuarantineAction(action, selected[0].data.id, function() {
                list.getController().load();
            });
        },