fix non-admin user select and delete comments.
Thanks to berberic (forum)
This commit is contained in:
@ -541,7 +541,7 @@ function serendipity_deleteComment($id, $entry_id, $type='comments', $token=fals
|
|||||||
|
|
||||||
// Load articles author id and check it
|
// Load articles author id and check it
|
||||||
$sql = serendipity_db_query("SELECT authorid FROM {$serendipity['dbPrefix']}entries
|
$sql = serendipity_db_query("SELECT authorid FROM {$serendipity['dbPrefix']}entries
|
||||||
WHERE entry_id = ". $entry_id, true);
|
WHERE id = ". $entry_id, true);
|
||||||
if ($sql['authorid'] != $serendipity['authorid']) {
|
if ($sql['authorid'] != $serendipity['authorid']) {
|
||||||
return false; // wrong user having no adminEntriesMaintainOthers right
|
return false; // wrong user having no adminEntriesMaintainOthers right
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user