[feature/postgresql-fulltext-search] assign empty stats

Blank array is assigned to stats incase pgsql fulltext
search backend is not compatible

PHPBB3-9730
This commit is contained in:
Dhruv Goel 2012-06-10 17:13:03 +05:30
parent d1a49e01ce
commit 30508b406b

View file

@ -816,6 +816,12 @@ class phpbb_search_fulltext_postgres extends phpbb_search_base
{ {
global $db, $config; global $db, $config;
if($db->sql_layer != 'postgres')
{
$this->stats = array();
return;
}
$sql = "SELECT c2.relname, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS indexdef $sql = "SELECT c2.relname, pg_catalog.pg_get_indexdef(i.indexrelid, 0, true) AS indexdef
FROM pg_catalog.pg_class c1, pg_catalog.pg_index i, pg_catalog.pg_class c2 FROM pg_catalog.pg_class c1, pg_catalog.pg_index i, pg_catalog.pg_class c2
WHERE c1.relname = '" . POSTS_TABLE . "' WHERE c1.relname = '" . POSTS_TABLE . "'