diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index af7bb86be5..36f2268b84 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -113,7 +113,7 @@ - + {% if backend.S_STATS is not empty %}
@@ -135,18 +135,23 @@ - + {% for stat in backend.S_STATS | batch(2, '') %} - {backend.data.STATISTIC_1}{L_COLON} - {backend.data.VALUE_1} - {backend.data.STATISTIC_2}{L_COLON} - {backend.data.VALUE_2} + {% for key, value in stat %} + {% if value is not empty %} + {{ key }}{L_COLON} + {{ value }} + {% else %} + + + {% endif %} + {% endfor %} - + {% endfor %} - + {% endif %}

diff --git a/phpBB/includes/acp/acp_search.php b/phpBB/includes/acp/acp_search.php index cda3e6a69f..81053d1f33 100644 --- a/phpBB/includes/acp/acp_search.php +++ b/phpBB/includes/acp/acp_search.php @@ -189,7 +189,7 @@ class acp_search } unset($cfg_array); - $this->tpl_name = 'acp_search'; + $this->tpl_name = 'acp_search_settings'; $this->page_title = 'ACP_SEARCH_SETTINGS'; $template->assign_vars([ @@ -340,45 +340,18 @@ class acp_search $name = $search->get_name(); $data = $search->index_stats(); - $statistics = array(); - foreach ($data as $statistic => $value) - { - $n = count($statistics); - if ($n && count($statistics[$n - 1]) < 3) - { - $statistics[$n - 1] += array('statistic_2' => $statistic, 'value_2' => $value); - } - else - { - $statistics[] = array('statistic_1' => $statistic, 'value_1' => $value); - } - } - $template->assign_block_vars('backend', array( 'L_NAME' => $name, 'NAME' => $type, - 'S_ACTIVE' => ($type == $config['search_type']) ? true : false, + 'S_ACTIVE' => $type == $config['search_type'], 'S_HIDDEN_FIELDS' => build_hidden_fields(array('search_type' => $type)), 'S_INDEXED' => (bool) $search->index_created(), - 'S_STATS' => (bool) count($statistics)) - ); - - foreach ($statistics as $statistic) - { - $template->assign_block_vars('backend.data', array( - 'STATISTIC_1' => $statistic['statistic_1'], - 'VALUE_1' => $statistic['value_1'], - 'STATISTIC_2' => (isset($statistic['statistic_2'])) ? $statistic['statistic_2'] : '', - 'VALUE_2' => (isset($statistic['value_2'])) ? $statistic['value_2'] : '') - ); - } + 'S_STATS' => $data, + )); } - unset($search); - unset($statistics); - unset($data); - $this->tpl_name = 'acp_search'; + $this->tpl_name = 'acp_search_index'; $this->page_title = 'ACP_SEARCH_INDEX'; $template->assign_vars(array(