|
[F] Merge posts - attachment(s) problem [R] [C-Michael83]
|
|
10-30-2008, 07:04 PM
Post: #1
|
|||
|
|||
|
[F] Merge posts - attachment(s) problem [R] [C-Michael83]
If you merge two posts and the first of them contains an attachment is is not shown anymore after the merge. The problem is that the attachmentcount is set to 0 in the threads table.
It's working correctly if the second post contains an attachment. Steps to reproduce: 1. Create a new thread and attach a file to your post. 2. Create a reply. 3. Merge the two posts. Greets, Michael -------------
|
|||
|
10-30-2008, 08:06 PM
Post: #2
|
|||
|
|||
|
RE: Merge posts - attachment(s) problem [R]
Hmm, shouldn't the attachmentcount be incremented to 1 when you attach the attachment to your first post then?
|
|||
|
10-30-2008, 10:17 PM
(This post was last modified: 10-30-2008 10:18 PM by Michael S..)
Post: #3
|
|||
|
|||
|
RE: Merge posts - attachment(s) problem [R]
It's 1 before the merge. The reason for the change can be found in the function merge_posts():
PHP Code: $query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND pid != '{$masterpid}' AND visible='1'");Greets, Michael -------------
|
|||
|
10-30-2008, 10:22 PM
Post: #4
|
|||
|
|||
|
RE: Merge posts - attachment(s) problem [R]
I'll have to look at the logs, but I'm pretty sure that was put in place to fix another bug for some reason
|
|||
|
10-30-2008, 10:57 PM
Post: #5
|
|||
|
|||
|
RE: Merge posts - attachment(s) problem [R]
Does this work? In inc/class_moderation.php find:
PHP Code: $query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND pid != '{$masterpid}' AND visible='1'");and replace with PHP Code: $query2 = $db->simple_select("attachments", "COUNT(aid) as count", "pid IN({$pidin}) AND visible='1'");I don't see why we wouldn't count the first post in the amount of attachments |
|||
|
10-30-2008, 11:22 PM
Post: #6
|
|||
|
|||
|
RE: Merge posts - attachment(s) problem [R]
I tested several cases and I could not find any problem. The fix is working fine.
Greets, Michael -------------
|
|||
|
10-30-2008, 11:56 PM
Post: #7
|
|||
|
|||
|
[F] Merge posts - attachment(s) problem [R]
Thank you for your bug report.
This bug has been fixed in our internal code repository. Please note that the problem will not be fixed here until these forums are updated. With regards, MyBB Group |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)
Search
Member List
Calendar
Help

![[Image: donation_drive_sig.png]](http://mybboard.net/assets/images/donation_drive_sig.png)

