From dd46dbb48415059db8b22435d05d9dc49d68db80 Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Fri, 9 Dec 2005 13:19:23 +0000 Subject: [PATCH] allow EDIT button --- docs/NEWS | 2 ++ include/plugin_internal.inc.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/docs/NEWS b/docs/NEWS index ce5db2a..71f9462 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,8 @@ Version 1.0 () ------------------------------------------------------------------------ + * Allow to edit a HTML nugget with a frontend link (garvinhicking) + * Added sidebar plugin to show statistical data (garvinhicking) * Changed detection of "last_modified" timestamp, so that the date diff --git a/include/plugin_internal.inc.php b/include/plugin_internal.inc.php index 8490d73..7341364 100644 --- a/include/plugin_internal.inc.php +++ b/include/plugin_internal.inc.php @@ -1177,6 +1177,14 @@ class serendipity_html_nugget_plugin extends serendipity_plugin { } else { echo $this->get_config('content'); } + + if (serendipity_userLoggedIn()) { + $is_plugin_owner = ($this->serendipity_owner == $serendipity['authorid'] || serendipity_checkPermission('adminPluginsMaintainOthers')); + + if ($is_plugin_owner) { + echo '
' . EDIT . '
'; + } + } } } -- 2.39.5