From df4226866779f75eacab7f62da36b22dc21d5e44 Mon Sep 17 00:00:00 2001 From: cash Date: Sun, 22 Aug 2010 23:42:26 +0000 Subject: Merged r6812:6837 from 1.7 branch to trunk (skipping some changes to plugins like groups and wire) git-svn-id: http://code.elgg.org/elgg/trunk@6851 36083f99-b078-4883-b0ff-0f9b5a30f544 --- mod/search/start.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/search/start.php') diff --git a/mod/search/start.php b/mod/search/start.php index ae5e71c97..4f42c5391 100644 --- a/mod/search/start.php +++ b/mod/search/start.php @@ -39,7 +39,8 @@ function search_init() { // can't use get_data() here because some servers don't have these globals set, // which throws a db exception. - $r = mysql_query('SELECT @@ft_min_word_len as min, @@ft_max_word_len as max'); + $dblink = get_db_link('read'); + $r = mysql_query('SELECT @@ft_min_word_len as min, @@ft_max_word_len as max', $dblink); if ($r && ($word_lens = mysql_fetch_assoc($r))) { $CONFIG->search_info['min_chars'] = $word_lens['min']; $CONFIG->search_info['max_chars'] = $word_lens['max']; -- cgit v1.2.3