| @@ 69-84 (lines=16) @@ | ||
| 66 | $return_value = array(); |
|
| 67 | if ($smcFunc['db_num_rows']($request) !== 0) |
|
| 68 | { |
|
| 69 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 70 | { |
|
| 71 | if (!isset($return_value[$row['id_cat']])) |
|
| 72 | $return_value[$row['id_cat']] = array( |
|
| 73 | 'id' => $row['id_cat'], |
|
| 74 | 'name' => $row['cat_name'], |
|
| 75 | 'boards' => array(), |
|
| 76 | ); |
|
| 77 | ||
| 78 | $return_value[$row['id_cat']]['boards'][$row['id_board']] = array( |
|
| 79 | 'id' => $row['id_board'], |
|
| 80 | 'name' => $row['board_name'], |
|
| 81 | 'child_level' => $row['child_level'], |
|
| 82 | 'selected' => isset($boardListOptions['selected_board']) && $boardListOptions['selected_board'] == $row['id_board'], |
|
| 83 | ); |
|
| 84 | } |
|
| 85 | } |
|
| 86 | $smcFunc['db_free_result']($request); |
|
| 87 | ||
| @@ 2793-2810 (lines=18) @@ | ||
| 2790 | ); |
|
| 2791 | $context['num_boards'] = $smcFunc['db_num_rows']($request); |
|
| 2792 | $context['categories'] = array(); |
|
| 2793 | while ($row = $smcFunc['db_fetch_assoc']($request)) |
|
| 2794 | { |
|
| 2795 | // This category hasn't been set up yet.. |
|
| 2796 | if (!isset($context['categories'][$row['id_cat']])) |
|
| 2797 | $context['categories'][$row['id_cat']] = array( |
|
| 2798 | 'id' => $row['id_cat'], |
|
| 2799 | 'name' => $row['cat_name'], |
|
| 2800 | 'boards' => array() |
|
| 2801 | ); |
|
| 2802 | ||
| 2803 | // Set this board up, and let the template know when it's a child. (indent them..) |
|
| 2804 | $context['categories'][$row['id_cat']]['boards'][$row['id_board']] = array( |
|
| 2805 | 'id' => $row['id_board'], |
|
| 2806 | 'name' => $row['name'], |
|
| 2807 | 'child_level' => $row['child_level'], |
|
| 2808 | 'selected' => $row['is_ignored'], |
|
| 2809 | ); |
|
| 2810 | } |
|
| 2811 | $smcFunc['db_free_result']($request); |
|
| 2812 | ||
| 2813 | require_once($sourcedir . '/Subs-Boards.php'); |
|