phpBB

Code Changes

File: includes/acp/acp_search.php

  Unmodified   Added   Modified   Removed
Line 54Line 54
		global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;

$submit = (isset($_POST['submit'])) ? true : false;

		global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;

$submit = (isset($_POST['submit'])) ? true : false;

 
		$form_key = 'acp_search';
add_form_key($form_key);

if ($submit && !check_form_key($form_key))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);
}


$search_types = $this->get_search_types();



$search_types = $this->get_search_types();


Line 232Line 239

function index($id, $mode)
{


function index($id, $mode)
{

		global $db, $user, $auth, $template, $cache;

		global $db, $user, $auth, $template, $cache, $request;

		global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;

$action = request_var('action', '');

		global $config, $phpbb_root_path, $phpbb_admin_path, $phpEx;

$action = request_var('action', '');

Line 243Line 250
			$action = '';
$this->state = array();
$this->save_state();

			$action = '';
$this->state = array();
$this->save_state();

 
		}
$submit = $request->is_set_post('submit', false);

$form_key = 'acp_search';
add_form_key($form_key);

if (!check_form_key($form_key) && in_array($action, array('delete', 'create')))
{
trigger_error($user->lang['FORM_INVALID'] . adm_back_link($this->u_action), E_USER_WARNING);

		}

if ($action)

		}

if ($action)

Line 449Line 465

$search = null;
$error = false;


$search = null;
$error = false;

		$search_options = '';

 
		foreach ($search_types as $type)
{
if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))

		foreach ($search_types as $type)
{
if ($this->init_search($type, $search, $error) || !method_exists($search, 'index_created'))

Line 599Line 614
	*/
function init_search($type, &$search, &$error)
{

	*/
function init_search($type, &$search, &$error)
{

		global $phpbb_root_path, $phpEx, $user, $auth, $config, $db;

		global $phpbb_root_path, $phpEx, $user, $auth, $config, $db, $phpbb_dispatcher;


if (!class_exists($type) || !method_exists($type, 'keyword_search'))
{


if (!class_exists($type) || !method_exists($type, 'keyword_search'))
{

Line 608Line 623
		}

$error = false;

		}

$error = false;

		$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user);

		$search = new $type($error, $phpbb_root_path, $phpEx, $auth, $config, $db, $user, $phpbb_dispatcher);


return $error;
}


return $error;
}