assign('engine_info', $unifiedsearchlib->getEngineInfo()); if ($tiki_p_admin == 'y') { if (isset($_REQUEST['rebuild']) && $_REQUEST['rebuild'] == 'now') { $access->redirect(TikiLib::lib('service')->getUrl([ 'controller' => 'search', 'action' => 'rebuild', ])); } if (isset($_REQUEST['optimize']) && $_REQUEST['optimize'] == 'now') { @ini_set('max_execution_time', 0); @ini_set('memory_limit', -1); $stat = $unifiedsearchlib->getIndex('data-write')->optimize(); } if (! empty($_REQUEST['refresh_index_all_now']) && $_REQUEST['refresh_index_all_now'] == 'y') { require_once('lib/search/refresh-functions.php'); foreach (activated_features() as $feature) { refresh_index($feature); } $smarty->assign('refresh_index_all_now', $_REQUEST['refresh_index_all_now']); } if (! empty($_REQUEST['refresh_files_index_now']) && $_REQUEST['refresh_files_index_now'] == 'y') { require_once('lib/search/refresh-functions.php'); refresh_index('files'); $smarty->assign('refresh_files_index_now', $_REQUEST['refresh_files_index_now']); } if (! empty($_REQUEST['refresh_index_now']) && $_REQUEST['refresh_index_now'] == 'y') { require_once('lib/search/refresh-functions.php'); refresh_index('pages'); $smarty->assign('refresh_index_now', $_REQUEST['refresh_index_now']); } if (! empty($_REQUEST['refresh_tracker_index_now']) && $_REQUEST['refresh_tracker_index_now'] == 'y') { require_once('lib/search/refresh-functions.php'); refresh_index('tracker_items'); $smarty->assign('refresh_tracker_index_now', $_REQUEST['refresh_tracker_index_now']); } if (! empty($_POST['string_in_db_search'])) { require_once('lib/search/report_string_in_db.php'); $smarty->assign('searchString', $_REQUEST['string_in_db_search']); $smarty->assign('searchStringAgain', $_REQUEST['string_in_db_search']); if (! empty($_REQUEST['string_in_db_search_table'])) { $smarty->assign('tableFilter', $_REQUEST['string_in_db_search_table']); } } if (! empty($_POST['query'])) { require_once('lib/search/report_string_in_db.php'); $smarty->assign('searchStringAgain', $_REQUEST['query']); $smarty->assign('tableName', $_REQUEST['table']); if (! empty($_REQUEST['string_in_db_search_table'])) { $smarty->assign('tableFilter', $_REQUEST['string_in_db_search_table']); } } $tikilib = TikiLib::lib('tiki'); $allTables = $tikilib->listTables(); foreach ($allTables as $table) { if (substr($table, 0, 6) !== 'index_' || substr($table, 0, 10) == 'index_pref') { $tables[] = $table; } } $smarty->assign('tables', $tables); $popularTables = ['tiki_articles', 'tiki_blog_posts', 'tiki_calendar_items', 'tiki_comments', 'tiki_pages', 'tiki_tracker_item_fields']; $smarty->assign('popularTables', $popularTables); } $lastLogItem = $unifiedsearchlib->getLastLogItem(); if ($lastLogItem['web']) { $smarty->assign('lastLogItemWeb', $lastLogItem['web']); } else { $smarty->assign('lastLogItemWeb', tr('Unable to get info from log file.')); } if ($lastLogItem['console']) { $smarty->assign('lastLogItemConsole', $lastLogItem['console']); } else { $smarty->assign('lastLogItemConsole', tr('Unable to get info from log file.')); } if (isMySQLFulltextSearchSupported()) { $smarty->assign('no_fulltext_support', false); } else { $smarty->assign('no_fulltext_support', true); }