Contacts: Use POST instead of GET.
This commit is contained in:
parent
23533a763a
commit
59d16c5f9a
|
@ -32,7 +32,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.'));
|
||||
}
|
||||
|
|
|
@ -27,8 +27,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);
|
||||
|
|
|
@ -355,7 +355,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+'"]');
|
||||
|
@ -711,7 +711,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();
|
||||
|
|
Loading…
Reference in New Issue