Line 20 | Line 20 |
---|
*/ class tidy_search extends \phpbb\cron\task\base {
|
*/ class tidy_search extends \phpbb\cron\task\base {
|
| /** * phpBB root path * @var string */
|
protected $phpbb_root_path;
|
protected $phpbb_root_path;
|
| /** * PHP file extension * @var string */
|
protected $php_ext;
|
protected $php_ext;
|
| /** * Auth object * @var \phpbb\auth\auth */
|
protected $auth;
|
protected $auth;
|
| /** * Config object * @var \phpbb\config\config */
|
protected $config;
|
protected $config;
|
| /** * Database object * @var \phpbb\db\driver\driver_interface */
|
protected $db;
|
protected $db;
|
| /** * User object * @var \phpbb\user */
|
protected $user;
|
protected $user;
|
| /** * Event dispatcher object * @var \phpbb\event\dispatcher_interface */ protected $phpbb_dispatcher;
|
/** * Constructor. *
|
/** * Constructor. *
|
* @param string $phpbb_root_path The root path
| * @param string $phpbb_root_path The phpBB root path
|
* @param string $php_ext The PHP file extension
|
* @param string $php_ext The PHP file extension
|
* @param \phpbb\auth\auth $auth The auth * @param \phpbb\config\config $config The config * @param \phpbb\db\driver\driver_interface $db The db connection * @param \phpbb\user $user The user
| * @param \phpbb\auth\auth $auth The auth object * @param \phpbb\config\config $config The config object * @param \phpbb\db\driver\driver_interface $db The database object * @param \phpbb\user $user The user object * @param \phpbb\event\dispatcher_interface $phpbb_dispatcher The event dispatcher object
|
*/
|
*/
|
public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user)
| public function __construct($phpbb_root_path, $php_ext, \phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, \phpbb\event\dispatcher_interface $phpbb_dispatcher)
|
{ $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext;
| { $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext;
|
Line 45 | Line 81 |
---|
$this->config = $config; $this->db = $db; $this->user = $user;
|
$this->config = $config; $this->db = $db; $this->user = $user;
|
| $this->phpbb_dispatcher = $phpbb_dispatcher;
|
}
/**
| }
/**
|
Line 58 | Line 95 |
---|
// We do some additional checks in the module to ensure it can actually be utilised $error = false;
|
// We do some additional checks in the module to ensure it can actually be utilised $error = false;
|
$search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user);
| $search = new $search_type($error, $this->phpbb_root_path, $this->php_ext, $this->auth, $this->config, $this->db, $this->user, $this->phpbb_dispatcher);
|
if (!$error) {
| if (!$error) {
|