diff --git a/admin/includes/panels.prototypes.php b/admin/includes/panels.prototypes.php index 9dddb32..f17da3d 100644 --- a/admin/includes/panels.prototypes.php +++ b/admin/includes/panels.prototypes.php @@ -111,7 +111,7 @@ function exec() { foreach($this->args as $mandatory_argument) { - if (!isset($_GET[$mandatory_argument])) { + if (!isset($_REQUEST[$mandatory_argument])) { return PANEL_REDIRECT_DEFAULT; } } @@ -159,7 +159,7 @@ * */ - function onsubmit() { + function onsubmit($data = null) { $returnvalue = 1; $valid_evts = array_intersect(array_keys($_POST), $this->events); @@ -167,7 +167,7 @@ if ($the_event=array_pop($valid_evts)) { $event = "on{$the_event}"; if (method_exists($this, $event)) - $returnvalue = call_user_func(array(&$this, $event)); + $returnvalue = call_user_func(array(&$this, $event), $data); } return $returnvalue; @@ -213,6 +213,7 @@ $dummyarr = array(); $errors = array(); + $content = array(); $lang_loaded = false; $l = null; @@ -256,13 +257,15 @@ $errors[$field] = $l['error'][$field]; if ($halt) break; + } else { + $content[$field] = $string; } } if(!$errors) { - $result = parent::onsubmit(); + $result = parent::onsubmit($content); } else { $this->smarty->assign('error', $errors); $result = $this->onerror(); diff --git a/admin/main.php b/admin/main.php index 6aeac92..98b9e2f 100755 --- a/admin/main.php +++ b/admin/main.php @@ -102,7 +102,7 @@ if ($retval == PANEL_REDIRECT_CURRENT) { foreach ($fp_admin_action->args as $mandatory_argument) { $with_arguments .= '&' . $mandatory_argument . - '=' . $_GET[$mandatory_argument]; + '=' . $_REQUEST[$mandatory_argument]; } } diff --git a/admin/panels/entry/admin.entry.commentlist.tpl b/admin/panels/entry/admin.entry.commentlist.tpl index 26a7733..eb63c98 100755 --- a/admin/panels/entry/admin.entry.commentlist.tpl +++ b/admin/panels/entry/admin.entry.commentlist.tpl @@ -40,10 +40,16 @@ function admin_entry_comment_delete() { return confirm({/literal}'{$plang.act_de {if $url}{$name}{else}{$name}{/if} {$email} {$ip_address} - + +{$plang.act_edit} + + {$plang.act_del} - + + {/comment} diff --git a/admin/panels/entry/admin.entry.php b/admin/panels/entry/admin.entry.php index c23a11c..3ad3b48 100755 --- a/admin/panels/entry/admin.entry.php +++ b/admin/panels/entry/admin.entry.php @@ -21,6 +21,7 @@ 'list' => true, 'write' => true, 'commentlist' => false, + 'commedit' => false, 'delete' => false, 'cats' => true, 'stats' => false diff --git a/fp-includes/core/core.comment.php b/fp-includes/core/core.comment.php index 0599f0f..6d28fca 100755 --- a/fp-includes/core/core.comment.php +++ b/fp-includes/core/core.comment.php @@ -108,7 +108,8 @@ $comment_dir = bdb_idtofile($id,BDB_COMMENT); - $comment['DATE'] = date_time(); + if (!isset($comment['DATE'])) + $comment['DATE'] = date_time(); $id = bdb_idfromtime(BDB_COMMENT, $comment['DATE']); $f = $comment_dir . $id . EXT; $str = utils_kimplode($comment); diff --git a/fp-interface/lang/en-us/lang.admin.entry.php b/fp-interface/lang/en-us/lang.admin.entry.php index d242795..3a07951 100755 --- a/fp-interface/lang/en-us/lang.admin.entry.php +++ b/fp-interface/lang/en-us/lang.admin.entry.php @@ -94,6 +94,7 @@ 'email' => 'Email', 'ip' => 'IP', 'actions' => 'Actions', + 'act_edit' => 'Edit', 'act_del' => 'Delete', 'act_del_confirm' => 'Do you really want to delete this comment?', 'nocomments' => 'This entry have not been commented, yet.', @@ -108,6 +109,26 @@ the comment', ); + + $lang['admin']['entry']['commedit'] = + array( + 'head' => "Edit comment for entry", + 'content' => 'Content', + 'date' => 'Date', + 'author' => 'Author', + 'www' => 'Web Site', + 'email' => 'Email', + 'ip' => 'IP', + 'submit' => 'Save' + + + ); + + $lang['admin']['entry']['commedit']['msgs'] = + array( + 1 => 'Comment has been edited', + -1 => 'An error occurred while trying to edit the comment', + ); /* delete action */ diff --git a/fp-interface/themes/leggero/leggero/res/admin.css b/fp-interface/themes/leggero/leggero/res/admin.css index b17690c..989f72a 100755 --- a/fp-interface/themes/leggero/leggero/res/admin.css +++ b/fp-interface/themes/leggero/leggero/res/admin.css @@ -237,6 +237,7 @@ input.maxsize, select.maxsize { width: 100% } } +.admin-entry-commentlist td , .admin-widgets-blockparser td , .admin-plugin-default td { padding: 1em .6em;