summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2012-06-26 18:04:22 +0200
committerThomas Tanghus <thomas@tanghus.net>2012-06-26 18:15:24 +0200
commit1b2d09f9ca3e23abbb368f44b63df4133bbb4d6b (patch)
tree7b0fe6330c9cae808d4c780118fc3be1d28e0caf
parentd8b181cd844401ee8587bac99a101fcc532fcacf (diff)
downloadnextcloud-server-1b2d09f9ca3e23abbb368f44b63df4133bbb4d6b.tar.gz
nextcloud-server-1b2d09f9ca3e23abbb368f44b63df4133bbb4d6b.zip
Added missing requesttoken.
-rw-r--r--apps/contacts/ajax/loadcard.php2
-rw-r--r--apps/contacts/js/contacts.js3
2 files changed, 4 insertions, 1 deletions
diff --git a/apps/contacts/ajax/loadcard.php b/apps/contacts/ajax/loadcard.php
index fbb831f4a12..1309faaa7a2 100644
--- a/apps/contacts/ajax/loadcard.php
+++ b/apps/contacts/ajax/loadcard.php
@@ -27,6 +27,7 @@ OCP\JSON::checkAppEnabled('contacts');
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
+$requesttoken = $_GET['requesttoken'];
$freeSpace=OC_Filesystem::free_space('/');
$freeSpace=max($freeSpace,0);
@@ -41,6 +42,7 @@ $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesi
$tmpl->assign('adr_types',$adr_types);
$tmpl->assign('phone_types',$phone_types);
$tmpl->assign('email_types',$email_types);
+$tmpl->assign('requesttoken', $requesttoken);
$tmpl->assign('id','');
$page = $tmpl->fetchPage();
diff --git a/apps/contacts/js/contacts.js b/apps/contacts/js/contacts.js
index 036734049b6..204fe18a52d 100644
--- a/apps/contacts/js/contacts.js
+++ b/apps/contacts/js/contacts.js
@@ -315,6 +315,7 @@ Contacts={
},
add:function(n, fn, aid, isnew){ // add a new contact
aid = aid?aid:$('#contacts h3.active').first().data('id');
+ console.log('add() aid: ' + aid);
var localAddcontact = function(n, fn, aid, isnew) {
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
function(jsondata) {
@@ -359,7 +360,7 @@ Contacts={
var card = $('#card')[0];
if(!card) {
- $.getJSON(OC.filePath('contacts', 'ajax', 'loadcard.php'),{},function(jsondata){
+ $.getJSON(OC.filePath('contacts', 'ajax', 'loadcard.php'),{'requesttoken': requesttoken},function(jsondata){
if(jsondata.status == 'success'){
$('#rightcontent').html(jsondata.data.page).ready(function() {
Contacts.UI.loadHandlers();