diff --git a/admin/panels/entry/admin.entry.commedit.php b/admin/panels/entry/admin.entry.commedit.php new file mode 100644 index 0000000..9c63d35 --- /dev/null +++ b/admin/panels/entry/admin.entry.commedit.php @@ -0,0 +1,52 @@ +nosuchcomment = !comment_exists($_REQUEST['entry'], $_REQUEST['comment']); + $this->smarty->assign('entryid', $_REQUEST['entry']); + $this->smarty->assign('id', $_REQUEST['comment']); + } + + function main() { + if ($this->nosuchcomment) return PANEL_REDIRECT_DEFAULT; + + $e = entry_parse($_REQUEST['entry']); + if ($e) { + $this->smarty->assign('entrysubject', $e['subject']); + } else return PANEL_REDIRECT_DEFAULT; + + $comment = comment_parse($_REQUEST['entry'], $_REQUEST['comment']); + if ($comment) { + $this->smarty->assign('values', $comment); + } else return PANEL_REDIRECT_DEFAULT; + + + + } + + function onsave($content) { + if ($this->nosuchcomment) return PANEL_REDIRECT_DEFAULT; + + $comment = comment_parse($_REQUEST['entry'],$_REQUEST['comment']); + $content['ip-address'] = $comment['ip-address']; + $content['date'] = $comment['date']; + $success = comment_save($_REQUEST['entry'], $content); + $this->smarty->assign('success', $success? 1 : -1); + return PANEL_REDIRECT_CURRENT; + } + +} diff --git a/admin/panels/entry/admin.entry.commedit.tpl b/admin/panels/entry/admin.entry.commedit.tpl new file mode 100644 index 0000000..27031fa --- /dev/null +++ b/admin/panels/entry/admin.entry.commedit.tpl @@ -0,0 +1,34 @@ +
{$plang.descr}
+ + +{html_form} + + {include file='shared:errorlist.tpl'} + + + + +
+
+
+
+
+