mirror of
https://github.com/phpbb/phpbb.git
synced 2025-05-31 03:29:23 +02:00
[ticket/11031] Fix conversion of topic_replies to topic_posts
PHPBB3-11031
This commit is contained in:
parent
6dd4620609
commit
881ad935d5
@ -399,7 +399,7 @@ if (!$get_info)
|
||||
array('is_orphan', 0, ''),
|
||||
array('poster_id', 'attachments.user_id_1 AS poster_id', 'phpbb_user_id'),
|
||||
array('physical_filename', 'attachments_desc.physical_filename', 'import_attachment'),
|
||||
array('real_filename', 'attachments_desc.real_filename', ''),
|
||||
array('real_filename', 'attachments_desc.real_filename', 'phpbb_set_encoding'),
|
||||
array('download_count', 'attachments_desc.download_count', ''),
|
||||
array('attach_comment', 'attachments_desc.comment', array('function1' => 'phpbb_set_encoding', 'function2' => 'utf8_htmlspecialchars')),
|
||||
array('extension', 'attachments_desc.extension', ''),
|
||||
@ -497,7 +497,7 @@ if (!$get_info)
|
||||
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
|
||||
array('topic_time', 'topics.topic_time', ''),
|
||||
array('topic_views', 'topics.topic_views', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies + 1', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
|
||||
array('topic_posts_unapproved', 0, ''),
|
||||
array('topic_posts_softdeleted',0, ''),
|
||||
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
|
||||
@ -531,7 +531,7 @@ if (!$get_info)
|
||||
array('topic_title', 'topics.topic_title', 'phpbb_set_encoding'),
|
||||
array('topic_time', 'topics.topic_time', ''),
|
||||
array('topic_views', 'topics.topic_views', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies + 1', ''),
|
||||
array('topic_posts_approved', 'topics.topic_replies', 'phpbb_topic_replies_to_posts'),
|
||||
array('topic_posts_unapproved', 0, ''),
|
||||
array('topic_posts_softdeleted',0, ''),
|
||||
array('topic_last_post_id', 'topics.topic_last_post_id', ''),
|
||||
|
@ -540,6 +540,15 @@ function phpbb_user_id($user_id)
|
||||
return (int) $user_id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return correct user id value
|
||||
* Everyone's id will be one higher to allow the guest/anonymous user to have a positive id as well
|
||||
*/
|
||||
function phpbb_topic_replies_to_posts($num_replies)
|
||||
{
|
||||
return (int) $num_replies + 1;
|
||||
}
|
||||
|
||||
/* Copy additional table fields from old forum to new forum if user wants this (for Mod compatibility for example)
|
||||
function phpbb_copy_table_fields()
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user