From: garvinhicking Date: Tue, 12 Jun 2007 12:43:17 +0000 (+0000) Subject: Fix bad admin query, thanks to Urs Enke X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=c329591c9aae42f091780862ab1de1db8c8cc3a3;p=s9y.git Fix bad admin query, thanks to Urs Enke --- diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 04b3383..694ec7c 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -401,7 +401,7 @@ function serendipity_deleteComment($id, $entry_id, $type='comments') { if ($_SESSION['serendipityAuthedUser'] === true) { $admin = ''; if (!serendipity_checkPermission('adminEntriesMaintainOthers')) { - $admin = " AND authorid = " . (int)$_SESSION['serendipityAuthorid'] ."'"; + $admin = " AND authorid = " . (int)$_SESSION['serendipityAuthorid']; } /* We have to figure out if the comment we are about to delete, is awaiting approval, @@ -465,7 +465,7 @@ function serendipity_allowCommentsToggle($entry_id, $switch = 'disable') { if ($_SESSION['serendipityAuthedUser'] === true) { $admin = ''; if (!serendipity_checkPermission('adminEntriesMaintainOthers')) { - $admin = " AND authorid = '" . (int)$_SESSION['serendipityAuthorid'] ."'"; + $admin = " AND authorid = " . (int)$_SESSION['serendipityAuthorid']; } $query = "UPDATE {$serendipity['dbPrefix']}entries SET allow_comments = '" . ($switch == 'disable' ? 'false' : 'true') . "' WHERE id = '". (int)$entry_id ."' $admin";