mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-14 07:52:13 +09:00
Add option to control updating the document's last-updated timestamp when a comment is posted
This commit is contained in:
parent
8c797aaba1
commit
d3db01aae0
7 changed files with 49 additions and 35 deletions
|
|
@ -290,9 +290,10 @@ class commentController extends comment
|
|||
* Enter comments
|
||||
* @param object $obj
|
||||
* @param bool $manual_inserted
|
||||
* @param bool $update_document
|
||||
* @return object
|
||||
*/
|
||||
function insertComment($obj, $manual_inserted = FALSE)
|
||||
function insertComment($obj, $manual_inserted = FALSE, $update_document = TRUE)
|
||||
{
|
||||
if(!$manual_inserted && !checkCSRF())
|
||||
{
|
||||
|
|
@ -565,16 +566,9 @@ class commentController extends comment
|
|||
$oDocumentController = getController('document');
|
||||
|
||||
// Update the number of comments in the post
|
||||
if(!$using_validation)
|
||||
if(!$using_validation || $is_admin)
|
||||
{
|
||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
if($is_admin)
|
||||
{
|
||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, TRUE);
|
||||
}
|
||||
$output = $oDocumentController->updateCommentCount($document_srl, $comment_count, $obj->nick_name, $update_document);
|
||||
}
|
||||
|
||||
// call a trigger(after)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue