Fix for updating comment values. See bug 335408.
git-svn-id: svn://10.0.0.236/trunk@201949 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -95,6 +95,12 @@ if (isset($_POST['c_submit'])) {
|
||||
|
||||
$db->query($_sql);
|
||||
|
||||
if (!DB::isError($db->record)) {
|
||||
// Calculate the lookup value in main for comment avg if our INSERT was successful.
|
||||
$_ratingSql = "UPDATE `main` SET `Rating` = ROUND((SELECT AVG(`CommentVote`) FROM `feedback` WHERE `ID` = {$_c_id}),2) WHERE `ID` = {$_c_id}";
|
||||
$db->query($_ratingSql);
|
||||
}
|
||||
|
||||
// For the template
|
||||
$added_comment = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user