From 50e128f43f3a0170d741d9ef7543c94cefd01bc7 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("
");