Fix point for attached files when updating document

This commit is contained in:
Kijin Sung 2017-03-02 18:03:14 +09:00
parent dafbfadc93
commit 87648f49d4
2 changed files with 16 additions and 0 deletions

View file

@ -146,6 +146,13 @@ class pointController extends point
// Only give points if the document is being updated from TEMP to another status such as PUBLIC.
if ($obj->status === $oDocumentModel->getConfigStatus('temp') || $oDocument->get('status') !== $oDocumentModel->getConfigStatus('temp'))
{
if ($obj->uploaded_count > $oDocument->get('uploaded_count'))
{
$cur_point = getModel('point')->getPoint($member_srl, true);
$attached_files_point = $this->_getModulePointConfig($module_srl, 'upload_file');
$cur_point += $attached_files_point * ($obj->uploaded_count - $oDocument->get('uploaded_count'));
$this->setPoint($member_srl, $cur_point);
}
return new Object();
}
@ -258,6 +265,14 @@ class pointController extends point
return new Object();
}
/**
* @brief A trigger which gives points for uploaded file changes to a comment
*/
public function triggerUpdateComment($obj)
{
return new Object();
}
/**
* @brief A trigger which gives points for deleting a comment
*/