1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-21 16:01:40 +02:00

[ticket/12683] Pass tables via parameter and small fix

PHPBB3-12683
This commit is contained in:
rubencm
2021-04-09 19:36:54 +02:00
committed by Ruben Calvo
parent 565c806eda
commit f4977853be
16 changed files with 132 additions and 103 deletions

View File

@@ -16,6 +16,7 @@ namespace phpbb\search;
use phpbb\config\config;
use phpbb\search\exception\action_in_progress_exception;
use phpbb\search\exception\no_action_in_progress_exception;
use phpbb\search\exception\search_exception;
class state_helper
{
@@ -32,8 +33,8 @@ class state_helper
/**
* Constructor.
*
* @param \phpbb\config\config $config
* @param \phpbb\search\search_backend_factory $search_backend_factory
* @param config $config
* @param search_backend_factory $search_backend_factory
*/
public function __construct(config $config, search_backend_factory $search_backend_factory)
{
@@ -108,7 +109,7 @@ class state_helper
// Make sure the action is correct (just in case)
if (!in_array($action, ['create', 'delete']))
{
throw new \RuntimeException('Invalid action');
throw new search_exception('Invalid action');
}
$state = [