From d50e13974902ba1adc176df351028baba84cbb44 Mon Sep 17 00:00:00 2001 From: Oliver Date: Tue, 16 Jan 2024 22:31:48 +0100 Subject: [PATCH 01/10] Resolves Bug 690 --- www/includes/forum.inc.php | 68 +++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/www/includes/forum.inc.php b/www/includes/forum.inc.php index 75ee2e8..b51b779 100644 --- a/www/includes/forum.inc.php +++ b/www/includes/forum.inc.php @@ -1075,27 +1075,33 @@ static function getBoardTitle($board) /** * Form for editing posts * - * @return String + * // TODO merge Forum::getFormEdit() into /templates/layout/partials/commentform.tpl + * + * @version 2.1 + * @since 1.0 Method added + * @since 2.0 `IneX` Code adjustements + * @since 2.1 `16.01.2024` `IneX` Bug #690 : Delete & Update Buttons Seite wechseln + * * @param int $comment_id + * @return string * - * @TODO merge Forum::getFormEdit() into /templates/layout/partials/commentform.tpl */ static function getFormEdit($comment_id) { - global $db, $user; + global $user; - if(!is_numeric($comment_id)) user_error( t('invalid-comment_id', 'commenting'), E_USER_WARNING); + if(!is_numeric($comment_id) || $comment_id<=0) user_error( t('invalid-comment_id', 'commenting'), E_USER_WARNING); + $passedBase64encodedUrl = filter_input(INPUT_GET, 'url', FILTER_DEFAULT, FILTER_REQUIRE_SCALAR) ?? '/forum.php'.$comment_id; $rs = Comment::getRecordset($comment_id); - $html = ' -
+ $html = '

Comment #'.$comment_id.' bearbeiten

- - + + - +