mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/15540] Fix tests
PHPBB3-15540
This commit is contained in:
@@ -78,7 +78,8 @@ class acp_search
|
||||
foreach ($search_types as $search)
|
||||
{
|
||||
// Only show available search backends
|
||||
if($search->is_available()) {
|
||||
if ($search->is_available())
|
||||
{
|
||||
|
||||
$name = $search->get_name();
|
||||
|
||||
@@ -88,16 +89,20 @@ class acp_search
|
||||
$identifier = substr($type, strrpos($type, '\\') + 1);
|
||||
$search_options .= "<option value=\"$type\"$selected data-toggle-setting=\"#search_{$identifier}_settings\">$name</option>";
|
||||
|
||||
if (method_exists($search, 'acp')) {
|
||||
if (method_exists($search, 'acp'))
|
||||
{
|
||||
$vars = $search->acp();
|
||||
|
||||
if (!$submit) {
|
||||
if (!$submit)
|
||||
{
|
||||
$template->assign_block_vars('backend', array(
|
||||
'NAME' => $name,
|
||||
'SETTINGS' => $vars['tpl'],
|
||||
'IDENTIFIER' => $identifier,
|
||||
));
|
||||
} else if (is_array($vars['config'])) {
|
||||
}
|
||||
else if (is_array($vars['config']))
|
||||
{
|
||||
$settings = array_merge($settings, $vars['config']);
|
||||
}
|
||||
}
|
||||
|
@@ -1404,11 +1404,6 @@ function mcp_fork_topic($topic_ids)
|
||||
$search_backend_factory = $phpbb_container->get('search.backend_factory');
|
||||
$search = $search_backend_factory->get_active();
|
||||
$search_mode = 'post';
|
||||
|
||||
if ($error)
|
||||
{
|
||||
trigger_error($error);
|
||||
}
|
||||
}
|
||||
else if (!isset($search_type) && !$topic_row['enable_indexing'])
|
||||
{
|
||||
|
@@ -296,6 +296,11 @@ abstract class base implements search_backend_interface
|
||||
{
|
||||
$rows = $this->get_posts_between($post_counter + 1, $post_counter + self::BATCH_SIZE);
|
||||
|
||||
if ($this->db->sql_buffer_nested_transactions())
|
||||
{
|
||||
$rows = iterator_to_array($rows);
|
||||
}
|
||||
|
||||
foreach ($rows as $row)
|
||||
{
|
||||
// Indexing enabled for this forum
|
||||
@@ -415,7 +420,7 @@ abstract class base implements search_backend_interface
|
||||
AND post_id <= ' . $final_id;
|
||||
$result = $this->db->sql_query($sql);
|
||||
|
||||
while($row = $this->db->sql_fetchrow($result))
|
||||
while ($row = $this->db->sql_fetchrow($result))
|
||||
{
|
||||
yield $row;
|
||||
}
|
||||
|
@@ -123,7 +123,7 @@ class fulltext_mysql extends base implements search_backend_interface
|
||||
public function is_available(): bool
|
||||
{
|
||||
// Check if we are using mysql
|
||||
if($this->db->get_sql_layer() != 'mysqli')
|
||||
if ($this->db->get_sql_layer() != 'mysqli')
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@@ -649,7 +649,8 @@ class fulltext_sphinx implements search_backend_interface
|
||||
*/
|
||||
public function delete_index(int &$post_counter = null): ?array
|
||||
{
|
||||
if ($this->index_created()) {
|
||||
if ($this->index_created())
|
||||
{
|
||||
$this->db_tools->sql_table_drop(SPHINX_TABLE);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user