]> source.dussan.org Git - nextcloud-server.git/commitdiff
Contacts: Use POST instead of GET.
authorThomas Tanghus <thomas@tanghus.net>
Sat, 9 Jun 2012 13:00:18 +0000 (15:00 +0200)
committerThomas Tanghus <thomas@tanghus.net>
Sat, 9 Jun 2012 13:00:44 +0000 (15:00 +0200)
apps/contacts/ajax/deletecard.php
apps/contacts/ajax/deleteproperty.php
apps/contacts/js/contacts.js

index 6414fda93cb1be83f0fc693c44b1451cfd2ec6d2..e6d0405a240dcedee36dbbd304a66a1082c3c9e2 100644 (file)
@@ -29,7 +29,7 @@ function bailOut($msg) {
 OCP\JSON::checkLoggedIn();
 OCP\JSON::checkAppEnabled('contacts');
 
-$id = isset($_GET['id'])?$_GET['id']:null;
+$id = isset($_POST['id'])?$_POST['id']:null;
 if(!$id) {
        bailOut(OC_Contacts_App::$l10n->t('id is not set.'));
 }
index b0746d18a7973a095b36d8607d7a3eaa0b140ea7..e6c2bd9f803f6508438d8e3e54cc32f88f850503 100644 (file)
@@ -24,8 +24,8 @@
 OCP\JSON::checkLoggedIn();
 OCP\JSON::checkAppEnabled('contacts');
 
-$id = $_GET['id'];
-$checksum = $_GET['checksum'];
+$id = $_POST['id'];
+$checksum = $_POST['checksum'];
 
 $vcard = OC_Contacts_App::getContactVCard( $id );
 $line = OC_Contacts_App::getPropertyLineByChecksum($vcard, $checksum);
index 35d4a4a216de156bd0575fb9adda59f5aac04520..a241856300b9deedf6e80759e9ff3d18d8d0c77f 100644 (file)
@@ -368,7 +368,7 @@ Contacts={
                                $('#contacts_deletecard').tipsy('hide');
                                OC.dialogs.confirm(t('contacts', 'Are you sure you want to delete this contact?'), t('contacts', 'Warning'), function(answer) {
                                        if(answer == true) {
-                                               $.getJSON(OC.filePath('contacts', 'ajax', 'deletecard.php'),{'id':Contacts.UI.Card.id},function(jsondata){
+                                               $.post(OC.filePath('contacts', 'ajax', 'deletecard.php'),{'id':Contacts.UI.Card.id},function(jsondata){
                                                        if(jsondata.status == 'success'){
                                                                var newid = '';
                                                                var curlistitem = $('#leftcontent [data-id="'+jsondata.data.id+'"]');
@@ -707,7 +707,7 @@ Contacts={
                                Contacts.UI.loading(obj, true);
                                var checksum = Contacts.UI.checksumFor(obj);
                                if(checksum) {
-                                       $.getJSON(OC.filePath('contacts', 'ajax', 'deleteproperty.php'),{'id': this.id, 'checksum': checksum },function(jsondata){
+                                       $.post(OC.filePath('contacts', 'ajax', 'deleteproperty.php'),{'id': this.id, 'checksum': checksum },function(jsondata){
                                                if(jsondata.status == 'success'){
                                                        if(type == 'list') {
                                                                Contacts.UI.propertyContainerFor(obj).remove();