Line 842 | Line 842 |
---|
ORDER BY left_id"; $result = $db->sql_query($sql);
|
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'];
| { $forum_type = $row['forum_type'];
|
Line 888 | Line 905 |
---|
'U_SYNC' => $url . '&action=sync') ); }
|
'U_SYNC' => $url . '&action=sync') ); }
|
while ($row = $db->sql_fetchrow($result));
| |
} else if ($this->parent_id) {
| } else if ($this->parent_id) {
|
Line 904 | Line 920 |
---|
'U_SYNC' => $url . '&action=sync') ); }
|
'U_SYNC' => $url . '&action=sync') ); }
|
$db->sql_freeresult($result);
| unset($rowset);
|
$template->assign_vars(array( 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
| $template->assign_vars(array( 'ERROR_MSG' => (sizeof($errors)) ? implode('<br />', $errors) : '',
|
Line 1411 | Line 1427 |
---|
$diff = sizeof($moved_forums) * 2;
$moved_ids = array();
|
$diff = sizeof($moved_forums) * 2;
$moved_ids = array();
|
for ($i = 0; $i < sizeof($moved_forums); ++$i)
| for ($i = 0, $size = sizeof($moved_forums); $i < $size; ++$i)
|
{ $moved_ids[] = $moved_forums[$i]['forum_id']; }
| { $moved_ids[] = $moved_forums[$i]['forum_id']; }
|
Line 1786 | Line 1802 |
---|
*/ function delete_forum_content($forum_id) {
|
*/ function delete_forum_content($forum_id) {
|
global $db, $config, $phpbb_root_path, $phpEx;
| global $db, $config, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
|
include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
| include_once($phpbb_root_path . 'includes/functions_posting.' . $phpEx);
|
Line 1917 | Line 1933 |
---|
}
$table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
|
}
$table_ary = array(FORUMS_ACCESS_TABLE, FORUMS_TRACK_TABLE, FORUMS_WATCH_TABLE, LOG_TABLE, MODERATOR_CACHE_TABLE, POSTS_TABLE, TOPICS_TABLE, TOPICS_TRACK_TABLE);
|
| /** * Perform additional actions before forum content deletion * * @event core.delete_forum_content_before_query * @var array table_ary Array of tables from which all rows will be deleted that hold the forum_id * @var int forum_id the forum id * @var array topic_ids Array of the topic ids from the forum to be deleted * @var array post_counts Array of counts of posts in the forum, by poster_id * @since 3.1.6-RC1 */ $vars = array( 'table_ary', 'forum_id', 'topic_ids', 'post_counts', ); extract($phpbb_dispatcher->trigger_event('core.delete_forum_content_before_query', compact($vars)));
|
foreach ($table_ary as $table) {
| foreach ($table_ary as $table) {
|