mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-02-12 06:54:28 +01:00
Added missing requesttoken.
This commit is contained in:
parent
14b22239ee
commit
fb0d6cf7f7
@ -27,6 +27,7 @@ OCP\JSON::checkAppEnabled('contacts');
|
|||||||
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
|
||||||
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
|
$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
|
||||||
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
|
||||||
|
$requesttoken = $_GET['requesttoken'];
|
||||||
|
|
||||||
$freeSpace=OC_Filesystem::free_space('/');
|
$freeSpace=OC_Filesystem::free_space('/');
|
||||||
$freeSpace=max($freeSpace,0);
|
$freeSpace=max($freeSpace,0);
|
||||||
@ -41,6 +42,7 @@ $tmpl->assign('uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesi
|
|||||||
$tmpl->assign('adr_types',$adr_types);
|
$tmpl->assign('adr_types',$adr_types);
|
||||||
$tmpl->assign('phone_types',$phone_types);
|
$tmpl->assign('phone_types',$phone_types);
|
||||||
$tmpl->assign('email_types',$email_types);
|
$tmpl->assign('email_types',$email_types);
|
||||||
|
$tmpl->assign('requesttoken', $requesttoken);
|
||||||
$tmpl->assign('id','');
|
$tmpl->assign('id','');
|
||||||
$page = $tmpl->fetchPage();
|
$page = $tmpl->fetchPage();
|
||||||
|
|
||||||
|
@ -315,6 +315,7 @@ Contacts={
|
|||||||
},
|
},
|
||||||
add:function(n, fn, aid, isnew){ // add a new contact
|
add:function(n, fn, aid, isnew){ // add a new contact
|
||||||
aid = aid?aid:$('#contacts h3.active').first().data('id');
|
aid = aid?aid:$('#contacts h3.active').first().data('id');
|
||||||
|
console.log('add() aid: ' + aid);
|
||||||
var localAddcontact = function(n, fn, aid, isnew) {
|
var localAddcontact = function(n, fn, aid, isnew) {
|
||||||
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
|
$.post(OC.filePath('contacts', 'ajax', 'addcontact.php'), { n: n, fn: fn, aid: aid, isnew: isnew },
|
||||||
function(jsondata) {
|
function(jsondata) {
|
||||||
@ -359,7 +360,7 @@ Contacts={
|
|||||||
|
|
||||||
var card = $('#card')[0];
|
var card = $('#card')[0];
|
||||||
if(!card) {
|
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'){
|
if(jsondata.status == 'success'){
|
||||||
$('#rightcontent').html(jsondata.data.page).ready(function() {
|
$('#rightcontent').html(jsondata.data.page).ready(function() {
|
||||||
Contacts.UI.loadHandlers();
|
Contacts.UI.loadHandlers();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user