Current time: 03-19-2010, 09:16 AM Hello There, Guest! (LoginRegister)


 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[F] override style in forum
08-24-2008, 11:05 AM (This post was last modified: 08-24-2008 08:32 PM by witek.)
Post: #1
[F] override style in forum
MyBB version 1.4.1

Steps to reproduce:

1. Default style is "Style A".

2. I set "Style B" for one forum and checked "override" flag.

3. Go to adding new thread on this forum. I see "Style B" - OK.

4. Fill in subject and leave message empty, submit the form.

5. You will go back to new thread page (message cannot be empty), I see "Style A" now - not OK.

6. It's because there is a field "tid" with empty value in the form on new thread page and the condition
Code:
if(isset($mybb->input['tid']))
in line #138 in file 'global.php' is true however $mybb->input['tid'] is empty. It should be
Code:
if(isset($mybb->input['tid']) && $mybb->input['tid'] > 0)
or
Code:
if(!empty($mybb->input['tid']))
or sth like this.

The following plugin also helps:
Code:
function wc_remove_empty_tid() {
    global $mybb;
    if (isset($mybb->input['tid']) && empty($mybb->input['tid'])) {
        unset($mybb->input['tid']);
    }
}

$plugins->add_hook("global_start", "wc_remove_empty_tid");
Visit this user's website Find all posts by this user
08-26-2008, 03:55 AM
Post: #2
[F] override style in forum
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.

[Image: ryangordon.png]
My Blog - My Mods
Visit this user's website Find all posts by this user


Forum Jump: