mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Remove unnecessary reload of point from DB
This commit is contained in:
parent
0b9a3fd56c
commit
7e74b45c5c
1 changed files with 12 additions and 12 deletions
|
|
@ -32,7 +32,7 @@ class pointController extends point
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
$this->setPoint($member_srl, $cur_point + $point, 'signup');
|
$this->setPoint($member_srl, $cur_point + $point, 'signup');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@ class pointController extends point
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
$this->setPoint($member_srl, $cur_point + $point);
|
$this->setPoint($member_srl, $cur_point + $point);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,7 +103,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Add points for the document.
|
// Add points for the document.
|
||||||
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
||||||
|
|
@ -141,7 +141,7 @@ class pointController extends point
|
||||||
{
|
{
|
||||||
if ($obj->uploaded_count > $oDocument->get('uploaded_count'))
|
if ($obj->uploaded_count > $oDocument->get('uploaded_count'))
|
||||||
{
|
{
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
$attached_files_point = $this->_getModulePointConfig($module_srl, 'upload_file');
|
$attached_files_point = $this->_getModulePointConfig($module_srl, 'upload_file');
|
||||||
$cur_point += $attached_files_point * ($obj->uploaded_count - $oDocument->get('uploaded_count'));
|
$cur_point += $attached_files_point * ($obj->uploaded_count - $oDocument->get('uploaded_count'));
|
||||||
$this->setPoint($member_srl, $cur_point);
|
$this->setPoint($member_srl, $cur_point);
|
||||||
|
|
@ -150,7 +150,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Add points for the document.
|
// Add points for the document.
|
||||||
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
||||||
|
|
@ -198,7 +198,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Subtract points for the document.
|
// Subtract points for the document.
|
||||||
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
$document_point = $this->_getModulePointConfig($module_srl, 'insert_document');
|
||||||
|
|
@ -238,7 +238,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Add points for the comment.
|
// Add points for the comment.
|
||||||
$comment_point = $this->_getModulePointConfig($module_srl, 'insert_comment');
|
$comment_point = $this->_getModulePointConfig($module_srl, 'insert_comment');
|
||||||
|
|
@ -290,7 +290,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Add points for the comment.
|
// Add points for the comment.
|
||||||
$comment_point = $this->_getModulePointConfig($module_srl, 'insert_comment');
|
$comment_point = $this->_getModulePointConfig($module_srl, 'insert_comment');
|
||||||
|
|
@ -323,7 +323,7 @@ class pointController extends point
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the points of the member
|
// Get the points of the member
|
||||||
$cur_point = getModel('point')->getPoint($member_srl, true);
|
$cur_point = getModel('point')->getPoint($member_srl);
|
||||||
|
|
||||||
// Subtract points for the file.
|
// Subtract points for the file.
|
||||||
$file_point = $this->_getModulePointConfig($module_srl, 'upload_file');
|
$file_point = $this->_getModulePointConfig($module_srl, 'upload_file');
|
||||||
|
|
@ -504,7 +504,7 @@ class pointController extends point
|
||||||
{
|
{
|
||||||
$point = -1 * $point;
|
$point = -1 * $point;
|
||||||
}
|
}
|
||||||
$cur_point = getModel('point')->getPoint($logged_member_srl, true);
|
$cur_point = getModel('point')->getPoint($logged_member_srl);
|
||||||
$this->setPoint($logged_member_srl, $cur_point + $point);
|
$this->setPoint($logged_member_srl, $cur_point + $point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -520,7 +520,7 @@ class pointController extends point
|
||||||
{
|
{
|
||||||
$point = -1 * $point;
|
$point = -1 * $point;
|
||||||
}
|
}
|
||||||
$cur_point = getModel('point')->getPoint($target_member_srl, true);
|
$cur_point = getModel('point')->getPoint($target_member_srl);
|
||||||
$this->setPoint($target_member_srl, $cur_point + $point);
|
$this->setPoint($target_member_srl, $cur_point + $point);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -560,7 +560,7 @@ class pointController extends point
|
||||||
$config = $oModuleModel->getModuleConfig('point');
|
$config = $oModuleModel->getModuleConfig('point');
|
||||||
|
|
||||||
// Get the default configuration information
|
// Get the default configuration information
|
||||||
$current_point = $oPointModel->getPoint($member_srl, true);
|
$current_point = $oPointModel->getPoint($member_srl);
|
||||||
$current_level = $oPointModel->getLevel($current_point, $config->level_step);
|
$current_level = $oPointModel->getLevel($current_point, $config->level_step);
|
||||||
|
|
||||||
// Change points
|
// Change points
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue