mirror of
https://github.com/e107inc/e107.git
synced 2025-01-16 20:28:28 +01:00
fixes #3269 switched v1 tables to v2
Fixed issue with null values in table (on duplicate)
This commit is contained in:
parent
604cda1f83
commit
0afb9e67bf
@ -796,7 +796,7 @@ class e107forum
|
||||
$qry = '
|
||||
INSERT INTO `#user_extended` (user_extended_id, user_plugin_forum_posts)
|
||||
VALUES ('.USERID.', 1)
|
||||
ON DUPLICATE KEY UPDATE user_plugin_forum_posts = user_plugin_forum_posts + 1
|
||||
ON DUPLICATE KEY UPDATE user_plugin_forum_posts = IFNULL(user_plugin_forum_posts, 0) + 1
|
||||
';
|
||||
$result = $sql->gen($qry);
|
||||
}
|
||||
|
3
top.php
3
top.php
@ -193,7 +193,8 @@ if ($action == 'top')
|
||||
$text .= "</table>\n</div>";
|
||||
if ($subaction == 'forum')
|
||||
{
|
||||
$ftotal = $sql->db_Count('user', '(*)', 'WHERE `user_forums` > 0');
|
||||
//$ftotal = $sql->db_Count('user', '(*)', 'WHERE `user_forums` > 0');
|
||||
$ftotal = $sql->count('user_extended', '(*)', 'WHERE `user_plugin_forum_posts` > 0');
|
||||
$parms = "{$ftotal},{$view},{$from},".e_SELF.'?[FROM].top.forum.'.$view;
|
||||
$text .= "<div class='nextprev'>".$tp->parseTemplate("{NEXTPREV={$parms}}").'</div>';
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user