Fork me on GitHub

Changes for #632

Description changed by Franz (2012-02-22 17:03:21)

 1:  1:
-[url]http://fluxbb.org/forums/viewtopic.php?id=6114[/url]+POST.php find: 
 + 
 +[code]$db->query('UPDATE '.$db->prefix.'topics SET num_replies='.$num_replies.',[/code] 
 + 
 +replace with: 
 + 
 +[code]$db->query('UPDATE '.$db->prefix.'topics SET num_replies=num_replies+1,[/code] 
 + 
 +delete : 
 + 
 +[code]$result = $db->query('SELECT COUNT(id) FROM '.$db->prefix.'posts WHERE topic_id='.$tid) or error('Unable to fetch post count for topic', __FILE__, __LINE__, $db->error()); 
 + $num_replies = $db->result($result, 0) - 1;[/code] 
 + 
 +There is no need for that query to run, will save performance in [b]larger[/b] boards only. 
 + 
 +For reference: [url]http://fluxbb.org/forums/viewtopic.php?id=6114[/url]