mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-03 16:51:40 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
b894362419
48 changed files with 664 additions and 379 deletions
|
|
@ -2002,6 +2002,41 @@ class CommentController extends Comment
|
|||
$this->setMessage('success_declared_cancel');
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the number of uploaded files in the comment
|
||||
*
|
||||
* @param int|array $comment_srl_list
|
||||
* @return void
|
||||
*/
|
||||
public function updateUploadedCount($comment_srl_list)
|
||||
{
|
||||
if (!is_array($comment_srl_list))
|
||||
{
|
||||
$comment_srl_list = array($comment_srl_list);
|
||||
}
|
||||
|
||||
if (!count($comment_srl_list))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
$comment_srl_list = array_unique($comment_srl_list);
|
||||
|
||||
foreach($comment_srl_list as $comment_srl)
|
||||
{
|
||||
$comment_srl = (int)$comment_srl;
|
||||
if ($comment_srl <= 0)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$args = new stdClass;
|
||||
$args->comment_srl = $comment_srl;
|
||||
$args->uploaded_count = FileModel::getFilesCount($comment_srl);
|
||||
executeQuery('comment.updateUploadedCount', $args);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to add a pop-up menu when clicking for displaying child comments
|
||||
* @param string $url
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue