From 2b69f73dbe845c03d90dd691483a8989f18b209e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zden=C4=9Bk=20Borovec?= Date: Thu, 22 Aug 2024 00:06:44 +0200 Subject: [PATCH] add back the ability to edit articles --- docs/www/blog/index.php | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/docs/www/blog/index.php b/docs/www/blog/index.php index 8fdd5aa..4730823 100755 --- a/docs/www/blog/index.php +++ b/docs/www/blog/index.php @@ -8,26 +8,27 @@ include_once($COMMONS."/header.php"); */ function display_blog_preview($blogpost_id, $blogpost_addr, $title, $abstract, $date_posted, $tags){ - if(is_null($blogpost_addr)) { - printf(" + print_r("
- -

- %s -

-
-", $blogpost_id, $title); - } - else { + + ", $blogpost_addr, $title); + + if (isset($_COOKIE["PHPSESSID"]) && + (bool)($_SESSION["current_user"]->permissions & 128)) { + print_r("", $blogpost_id); } + print_r("
"); printf(" -"); + printf("edit
"); print_r("
");