diff --git a/Alpha/Controller/ArticleController.php b/Alpha/Controller/ArticleController.php index 3b7f5c9b..c323e5f3 100644 --- a/Alpha/Controller/ArticleController.php +++ b/Alpha/Controller/ArticleController.php @@ -338,31 +338,6 @@ public function doPUT($request) $viewState->set('markdownTextBoxRows', $params['markdownTextBoxRows']); } - // save an existing comment - // TODO: move to dedicated controller, or use generic Create::doPUT(). - if (isset($params['article_comment_id'])) { - $comment = new ArticleComment(); - - try { - $comment->load($params['article_comment_id']); - - // re-populates the old object from post data - $comment->populateFromArray($params); - - $success = $comment->save(); - - self::$logger->action('Updated the comment ['.$params['article_comment_id'].'] on the article ['.$record->getOID().']'); - - ActiveRecord::disconnect(); - - $this->setStatusMessage(View::displayUpdateMessage('Your comment has been updated.')); - - return $this->doGET($request); - } catch (AlphaException $e) { - self::$logger->error($e->getMessage()); - } - } - if (isset($params['title'])) { $title = str_replace($config->get('cms.url.title.separator'), ' ', $params['title']); diff --git a/Alpha/View/ArticleCommentView.php b/Alpha/View/ArticleCommentView.php index 5a768543..bba31e9b 100644 --- a/Alpha/View/ArticleCommentView.php +++ b/Alpha/View/ArticleCommentView.php @@ -164,7 +164,7 @@ public function editView($fields = array()) $fieldname = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(SecurityUtils::encrypt('version_num')) : 'version_num'); $html .= ''; - $fieldname = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(SecurityUtils::encrypt('article_comment_id')) : 'article_comment_id'); + $fieldname = ($config->get('security.encrypt.http.fieldnames') ? base64_encode(SecurityUtils::encrypt('ActiveRecordOID')) : 'ActiveRecordOID'); $html .= ''; // render special buttons for admins only