/** * Check if the searchindext table is FTS enabled. * @return bool False if not enabled. */ function checkForEnabledSearch() { if (self::$fulltextEnabled === null) { self::$fulltextEnabled = false; $table = $this->tableName('searchindex'); $res = $this->query("SELECT sql FROM sqlite_master WHERE tbl_name = '{$table}'", __METHOD__); if ($res) { $row = $res->fetchRow(); self::$fulltextEnabled = stristr($row['sql'], 'fts') !== false; } } return self::$fulltextEnabled; }