diff options
author | Marc Alexander <admin@m-a-styles.de> | 2016-07-17 15:52:41 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2016-07-17 15:52:41 +0200 |
commit | e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1 (patch) | |
tree | 1cb9e05e8d86f0428c5282aa037ce178e45ba2f4 | |
parent | be8bf42fe3a9130c8e62814d2b1788349ac2e063 (diff) | |
parent | 960dc08946d589f5fef3d9e5659c755e4ccbf939 (diff) | |
download | forums-e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1.tar forums-e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1.tar.gz forums-e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1.tar.bz2 forums-e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1.tar.xz forums-e4aa8806b9578ce04fa69b42b7740fb0d32aeaa1.zip |
Merge branch '3.1.x' into 3.2.x
-rw-r--r-- | phpBB/search.php | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/phpBB/search.php b/phpBB/search.php index 193316f008..3d8c05fed9 100644 --- a/phpBB/search.php +++ b/phpBB/search.php @@ -1257,6 +1257,7 @@ if ($keywords || $author || $author_id || $search_id || $submit) } // Search forum +$rowset = array(); $s_forums = ''; $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f.right_id, f.forum_password, f.enable_indexing, fa.user_id FROM ' . FORUMS_TABLE . ' f @@ -1265,11 +1266,27 @@ $sql = 'SELECT f.forum_id, f.forum_name, f.parent_id, f.forum_type, f.left_id, f ORDER BY f.left_id ASC"; $result = $db->sql_query($sql); +while ($row = $db->sql_fetchrow($result)) +{ + $rowset[(int) $row['forum_id']] = $row; +} +$db->sql_freeresult($result); + $right = $cat_right = $padding_inc = 0; $padding = $forum_list = $holding = ''; $pad_store = array('0' => ''); -while ($row = $db->sql_fetchrow($result)) +/** +* Modify the forum select list for advanced search page +* +* @event core.search_modify_forum_select_list +* @var array rowset Array with the forums list data +* @since 3.1.10-RC1 +*/ +$vars = array('rowset'); +extract($phpbb_dispatcher->trigger_event('core.search_modify_forum_select_list', compact($vars))); + +foreach ($rowset as $row) { if ($row['forum_type'] == FORUM_CAT && ($row['left_id'] + 1 == $row['right_id'])) { @@ -1341,8 +1358,8 @@ if ($holding) $s_forums .= $holding; } -$db->sql_freeresult($result); unset($pad_store); +unset($rowset); if (!$s_forums) { |