diff options
author | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-10-04 00:02:24 +0200 |
---|---|---|
committer | Siebrand Mazeland <s.mazeland@xs4all.nl> | 2010-10-04 00:02:24 +0200 |
commit | 1652ded48c9c62c40157a5142e5231adbc574ddb (patch) | |
tree | 15796c59bd411160154f2ae85e4acd44a34da047 /plugins/SphinxSearch/SphinxSearchPlugin.php | |
parent | 362f395e035682cd8d2437cfca904654687be867 (diff) |
i18n/L10n review, extension credits added.
Diffstat (limited to 'plugins/SphinxSearch/SphinxSearchPlugin.php')
-rw-r--r-- | plugins/SphinxSearch/SphinxSearchPlugin.php | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/plugins/SphinxSearch/SphinxSearchPlugin.php b/plugins/SphinxSearch/SphinxSearchPlugin.php index 7a27a4c04..ad34a7cc1 100644 --- a/plugins/SphinxSearch/SphinxSearchPlugin.php +++ b/plugins/SphinxSearch/SphinxSearchPlugin.php @@ -41,8 +41,6 @@ foreach($sphinxDefaults as $key => $val) { } } - - /** * Plugin for Sphinx search backend. * @@ -53,7 +51,6 @@ foreach($sphinxDefaults as $key => $val) { * @link http://laconi.ca/ * @link http://twitter.com/ */ - class SphinxSearchPlugin extends Plugin { /** @@ -86,7 +83,8 @@ class SphinxSearchPlugin extends Plugin { if (common_config('sphinx', 'enabled')) { if (!class_exists('SphinxClient')) { - throw new ServerException('Sphinx PHP extension must be installed.'); + // TRANS: Server exception. + throw new ServerException(_m('Sphinx PHP extension must be installed.')); } $engine = new SphinxSearch($target, $table); if ($engine->is_connected()) { @@ -97,4 +95,28 @@ class SphinxSearchPlugin extends Plugin // Sphinx disabled or disconnected return true; } + + /** + * Provide plugin version information. + * + * This data is used when showing the version page. + * + * @param array &$versions array of version data arrays; see EVENTS.txt + * + * @return boolean hook value + */ + function onPluginVersion(&$versions) + { + $url = 'http://status.net/wiki/Plugin:SphinxSearch'; + + $versions[] = array('name' => 'SphinxSearch', + 'version' => STATUSNET_VERSION, + 'author' => 'Brion Vibber', + 'homepage' => $url, + 'rawdescription' => + // TRANS: Plugin description. + _m('Plugin for Sphinx search backend.')); + + return true; + } } |