Tasks: Use POST for ajax calls that change data
This commit is contained in:
parent
014895aeab
commit
4aee5a7ce4
3 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ $calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true);
|
|||
$first_calendar = reset($calendars);
|
||||
$cid = $first_calendar['id'];
|
||||
|
||||
$input = $_GET['text'];
|
||||
$input = $_POST['text'];
|
||||
$request = array();
|
||||
$request['summary'] = $input;
|
||||
$request["categories"] = null;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAppEnabled('tasks');
|
||||
|
||||
$id = $_GET['id'];
|
||||
$id = $_POST['id'];
|
||||
$task = OC_Calendar_App::getEventObject( $id );
|
||||
|
||||
OC_Calendar_Object::delete($id);
|
||||
|
|
|
@ -440,7 +440,7 @@ $(document).ready(function(){
|
|||
|
||||
$('#tasks_delete').live('click',function(){
|
||||
var id = $('#task_details').data('id');
|
||||
$.getJSON('ajax/delete.php',{'id':id},function(jsondata){
|
||||
$.post('ajax/delete.php',{'id':id},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#tasks [data-id="'+jsondata.data.id+'"]').remove();
|
||||
$('#task_details').data('id','');
|
||||
|
@ -455,7 +455,7 @@ $(document).ready(function(){
|
|||
|
||||
$('#tasks_addtask').click(function(){
|
||||
var input = $('#tasks_newtask').val();
|
||||
$.getJSON(OC.filePath('tasks', 'ajax', 'addtask.php'),{text:input},function(jsondata){
|
||||
$.post(OC.filePath('tasks', 'ajax', 'addtask.php'),{text:input},function(jsondata){
|
||||
if(jsondata.status == 'success'){
|
||||
$('#tasks_list').append(OC.Tasks.create_task_div(jsondata.task));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue