diff options
author | Zach Copley <zach@controlyourself.ca> | 2009-06-21 22:30:39 -0700 |
---|---|---|
committer | Zach Copley <zach@controlyourself.ca> | 2009-06-21 22:30:39 -0700 |
commit | 9014a0a90d9ab5ee408aded51f379fd084fcd82c (patch) | |
tree | c30dea6917805d3218f030fc59185f00841e3abc /classes/Memcached_DataObject.php | |
parent | b8f3f32f3f12339c3838fcfc883815d63a36dca7 (diff) | |
parent | 876ab059273a5f223170d6b2c0b9b4342b06c50f (diff) |
Merge branch '0.8.x' of git@gitorious.org:laconica/dev into 0.8.x
* '0.8.x' of git@gitorious.org:laconica/dev:
Add like for search
got rid of 'skin' concept a while ago
add collecta.com link
Update copyright dates in files modified in 2009
change Controlez-Vous to Control Yourself
ignore config.php.*
Position of max_file_size position helps IE
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index f945e94ff..f7cbb9d5b 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -1,7 +1,7 @@ <?php /* * Laconica - a distributed open-source microblogging tool - * Copyright (C) 2008, Controlez-Vous, Inc. + * Copyright (C) 2008, 2009, Control Yourself, Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -193,7 +193,14 @@ class Memcached_DataObject extends DB_DataObject // unable to connect to sphinx' search daemon if (!$connected) { if ('mysql' === common_config('db', 'type')) { - $search_engine = new MySQLSearch($this, $table); + $type = common_config('search', 'type'); + if ($type == 'like') { + $search_engine = new MySQLLikeSearch($this, $table); + } else if ($type == 'fulltext') { + $search_engine = new MySQLSearch($this, $table); + } else { + throw new ServerException('Unknown search type: ' . $type); + } } else { $search_engine = new PGSearch($this, $table); } |