#!/usr/bin/env php . /** * @package GNUsocial * @copyright 2009 StatusNet, Inc. * @license https://www.gnu.org/licenses/agpl.html GNU AGPL v3 or later */ define('INSTALLDIR', dirname(__DIR__, 3)); define('PUBLICDIR', INSTALLDIR . DIRECTORY_SEPARATOR . 'public'); $longoptions = array('base=', 'network'); $helptext = << -2' ); } function sphinx_template($sn, $table, $query, $query_info) { $base = sphinx_base(); $dbtype = common_config('db', 'type'); print <<sitename} # source {$sn->dbname}_src_{$table} { type = {$dbtype} sql_host = {$sn->dbhost} sql_user = {$sn->dbuser} sql_pass = {$sn->dbpass} sql_db = {$sn->dbname} sql_query_pre = SET NAMES utf8; sql_query = {$query} sql_query_info = {$query_info} sql_attr_timestamp = created_ts } index {$sn->dbname}_{$table} { source = {$sn->dbname}_src_{$table} path = {$base}/data/{$sn->dbname}_{$table} docinfo = extern charset_type = utf-8 min_word_len = 3 } END; }