Couldn't delete a FAQ in 2.8.13

Please report bugs here!

Moderator: Thorsten

Post Reply
sanberdu
Posts: 1
Joined: Mon Oct 13, 2014 2:02 pm

Couldn't delete a FAQ in 2.8.13

Post by sanberdu »

I was receiving 'You are not authorized' messages whenever I tried to delete a FAQ.
I made the following update to record.show.php:

function deleteRecord(record_id, record_lang)
{
<?php
echo ' var csrf = "' . $user->getCsrfTokenFromSession() . "\";\n";
?>
if (confirm('<?php print addslashes($PMF_LANG["ad_entry_del_1"] . " " . $PMF_LANG["ad_entry_del_3"]); ?>')) {
$('#saving_data_indicator').html('<img src="images/indicator.gif" /> deleting ...');
$.ajax({
type: "POST",
url: "index.php?action=ajax&ajax=records&ajaxaction=delete_record",
data: "record_id=" + record_id + "&record_lang=" + record_lang + "&csrf=" + csrf,
success: function(msg) {
$("#record_" + record_id + "_" + record_lang).fadeOut("slow");
$('#saving_data_indicator').html('<?php print $PMF_LANG['ad_entry_delsuc']; ?>');
}
});
}
}
Thorsten
Posts: 15561
Joined: Tue Sep 25, 2001 11:14 am
Location: #phpmyfaq
Contact:

Re: Couldn't delete a FAQ in 2.8.13

Post by Thorsten »

Hi,

already fixed for the 2.8.16 release this month. Thanks! :)

bye
Thorsten
phpMyFAQ Maintainer and Lead Developer
amazon.de Wishlist
Post Reply