From fedb73293b7a18885e9bda83faeccb96fb695c87 Mon Sep 17 00:00:00 2001 From: Patrick Murray-John Date: Mon, 30 Jan 2012 12:42:07 -0500 Subject: [PATCH] Minor bugfixes --- README | 5 +++-- controllers/CommentController.php | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README b/README index 5c3fdcb..915e8ae 100644 --- a/README +++ b/README @@ -77,6 +77,7 @@ to work with other plugins. An institution wants only trusted people to leave comments for anyone to read. It doesn't trust some of them enough to allow comments to be automatically public. -The trusted people could have the Researcher role in Omeka, with commenting configured to allow Researchers to comment. -The Admin role is the only role that can moderate comments, and Public is allowed to view comments. +The semi-trusted people could have the Researcher role in Omeka, with commenting configured to allow Researchers to comment. +The Admin role is the only role that can moderate comments to approve them, and Public is allowed to view comments. + diff --git a/controllers/CommentController.php b/controllers/CommentController.php index f9bca69..fe3222f 100644 --- a/controllers/CommentController.php +++ b/controllers/CommentController.php @@ -107,8 +107,11 @@ public function updateapprovedAction() $data = $comment->getAkismetData(); try { $ak->submitHam($data); + $response = array('status'=>'ok'); + $comment->save(); } catch (Exception $e) { _log($e->getMessage()); + $response = array('status'=>'fail', 'message'=>$e->getMessage()); } } else {