URL of the form:
- Code: Select all
/adm/index.php?i=forums&sid=<sid>&icat=7&mode=manage&parent_id=1&f=2&action=edit
This is the problem section of code in acp_forums.php(acp_forums::main()):
- Code: Select all
case 'edit':
$forum_data = array(
'forum_id' => $forum_id
);
// No break here
case 'add':
$forum_data += array(
'parent_id' => request_var('forum_parent_id', $this->parent_id),
'forum_type' => request_var('forum_type', FORUM_POST),
'type_action' => request_var('type_action', ''),
'forum_status' => request_var('forum_status', ITEM_UNLOCKED),
'forum_parents' => '',
'forum_options' => 0,
I'm not entirely sure what the best fix is here - forum_options obviously does need to be set to a default value when adding a forum, but should really be omitted from the UPDATE, since it's not maintained by acp_forums.php. Possibly just add the following as a quick fix, and preferable to reading then writing it:
- Code: Select all
if ($action == 'edit')
{
unset($forum_data['forum_options']);
}
Alternatively, add booleans for the options to the forum form, but this causes extra hassle / inconsistency when mods also use forum_options.
And finally, S_FORUM_OPTIONS is not related to forum_options... naughty devs