mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/14738] Add core events to improve modifying forum lists
PHPBB3-14738
This commit is contained in:
@@ -842,9 +842,26 @@ class acp_forums
|
||||
ORDER BY left_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ($row = $db->sql_fetchrow($result))
|
||||
$rowset = array();
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
do
|
||||
$rowset[(int) $row['forum_id']] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
/**
|
||||
* Modify the forum list data
|
||||
*
|
||||
* @event core.acp_manage_forums_modify_forum_list
|
||||
* @var array rowset Array with the forums list data
|
||||
* @since 3.1.10-RC1
|
||||
*/
|
||||
$vars = array('rowset');
|
||||
extract($phpbb_dispatcher->trigger_event('core.acp_manage_forums_modify_forum_list', compact($vars)));
|
||||
|
||||
if (!empty($rowset))
|
||||
{
|
||||
foreach ($rowset as $row)
|
||||
{
|
||||
$forum_type = $row['forum_type'];
|
||||
|
||||
@@ -888,7 +905,6 @@ class acp_forums
|
||||
'U_SYNC' => $url . '&action=sync')
|
||||
);
|
||||
}
|
||||
while ($row = $db->sql_fetchrow($result));
|
||||
}
|
||||
else if ($this->parent_id)
|
||||
{
|
||||
@@ -904,7 +920,7 @@ class acp_forums
|
||||
'U_SYNC' => $url . '&action=sync')
|
||||
);
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
unset($rowset);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
|
||||
|
Reference in New Issue
Block a user