From: garvinhicking Date: Fri, 9 Dec 2005 13:19:23 +0000 (+0000) Subject: allow EDIT button X-Git-Tag: 1.0~242 X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=dd46dbb48415059db8b22435d05d9dc49d68db80;p=s9y.git allow EDIT button --- 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 . '
'; + } + } } }