|
[F] Attachments for New Threads [with fix]
|
|
09-27-2008, 01:26 AM
(This post was last modified: 09-27-2008 01:37 AM by labrocca.)
Post: #1
|
|||
|
|||
[F] Attachments for New Threads [with fix] This user has been denied support.
This line is the problem.
Line 142 of newthread.php Code: if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && $mybb->settings['maxattachments'] == 0 && $attachcount < $mybb->settings['maxattachments'])It appears to be right as far as each variable is what it should be. So I guess it's related to the logic. I am pretty sure this is the line though causing the issue. I will try to find one that works. Fixed. Code: if($_FILES['attachment']['size'] > 0 && $forumpermissions['canpostattachments'] != 0 && ($mybb->settings['maxattachments'] == 0 || $attachcount < $mybb->settings['maxattachments']))The second operator looks for if max attachments = 0 OR attachcount is less than max attachments. It was set to AND...it's impossible for them both to be true. Also some error handling should be added if this fails because no errors are displayed like "max attachments reached" or anything. I tried to test my fix in all scenarios but of course I hope the mybb team does it's best to make sure I didn't screw up. ![]() Hey just noticed this: Ryan..your upgrade (changed files) from 1.4.1 to 1.4.2 has the correct line however...the current MYBB 1.4.2 from front page has the &&. At mybb central I looked at my file wondering why it worked and well..I had your changed files package with the OR statement. ![]() So I guess you need to change the download on home page and possible release a notice or whatever the heck you decide to do. Thanks. New MyBB plugin is "IPLH (IP Log History) v1.0". ![]() Vote for MyBB to add a Security section. |
|||
|
09-27-2008, 03:05 AM
Post: #2
|
|||
|
|||
| RE: Attachments for New Threads [with fix] | |||
|
09-27-2008, 06:07 AM
Post: #3
|
|||
|
|||
RE: Attachments for New Threads [with fix] This user has been denied support.
(09-27-2008 03:05 AM)Ryan Gordon Wrote:(09-27-2008 01:26 AM)labrocca Wrote: Ryan..your upgrade (changed files) from 1.4.1 to 1.4.2 has the correct line however...the current MYBB 1.4.2 from front page has the &&. I just hope nothing else is wrong in the main download. Any way you can make sure the latest version has all current fixes? Mistakes happen too..no biggie. This project is starting to get big ain't it. Harder and harder to manage I would assume. New MyBB plugin is "IPLH (IP Log History) v1.0". ![]() Vote for MyBB to add a Security section. |
|||
|
09-27-2008, 06:53 PM
(This post was last modified: 09-27-2008 06:55 PM by Ryan Gordon.)
Post: #4
|
|||
|
|||
|
RE: Attachments for New Threads [with fix]
Okay, the package is updated. And no, I don't personally have a way / the ability to check the package for all the fixes.
I'm moving this to "Forum and Website" since it was a problem with the download package |
|||
|
09-29-2008, 10:29 AM
Post: #5
|
|||
|
|||
RE: Attachments for New Threads [with fix]
(09-27-2008 06:53 PM)Ryan Gordon Wrote: Okay, the package is updated. And no, I don't personally have a way / the ability to check the package for all the fixes.Well, it was a bug in the code really. For users that have an earlier 1.4.2 download, might it be an idea to cross-post this under Fixed Bugs or somewhere more obvious than this board for people seeing this issue? David
|
|||
|
10-16-2008, 09:14 PM
Post: #6
|
|||
|
|||
RE: Attachments for New Threads [with fix]
(09-29-2008 10:29 AM)SteelD Wrote: Well, it was a bug in the code really. For users that have an earlier 1.4.2 download, might it be an idea to cross-post this under Fixed Bugs or somewhere more obvious than this board for people seeing this issue?Exactly my problem - I've been looking in bugs to track this problem and subscribing to other threads on the same problem. A more direct route would have been fixed bugs. Thanks for the fix. |
|||
|
10-17-2008, 12:53 AM
(This post was last modified: 10-17-2008 12:55 AM by Ryan Gordon.)
Post: #7
|
|||
|
|||
|
[F] Attachments for New Threads [with fix]
Cross posted under fixed bug reports
|
|||
|
10-19-2008, 02:12 AM
Post: #8
|
|||
|
|||
|
RE: [F] Attachments for New Threads [with fix]
Hi all,
I seem to be still having a problem with trying to attach a photo to a message, I uploaded the newthread.php file and still the same problem. Anybody else still having problems ? or did I miss something in this thread. Chmod is writeable 777 In the Upload directory there is 2 folders, 200810 Avatars the avatars file attributes is 777 the 200810 file "" "" is 755 , I change it to 777 but made no difference, any ideas? Thanks Dale |
|||
|
10-25-2008, 11:34 AM
Post: #9
|
|||
|
|||
|
Great the first post with the fix was solving every problem! Great Job!
|
|||
|
11-20-2008, 02:04 PM
Post: #10
|
|||
|
|||
|
RE: [F] Attachments for New Threads [with fix]
i'v upgrated to 1.4.3, and now i can't upload files again,
Nokia Series 60v3 Apps, Themes, Games Nokia Series 60v5 Apps, Themes, Games Nokia Series 60v2 Apps, Themes, Games http://www.sisarea.com |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread:
Search
Member List
Calendar
Help


This user has been denied support.

![[Image: 468x60_SF.gif]](http://supportforums.net/images/banners/468x60_SF.gif)



![[Image: forum_signature.png]](http://www.thecameraclub.org.uk/images/forum_signature.png)