-
Bug
-
Resolution: Fixed
-
Blocker
-
3.0.x
-
None
-
PHP Environment: 5.2.11
Database: PostgreSQL 8.4.1
In 3.0.6-RC3, when editing an existing forum in ACP, forum_options is being unconditionally set to 0, clearing any exclude/news feeds setting. Looks like latest in SVN has the same issue.
URL of the form:
/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()):
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:
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 :-P