diff options
author | Andrew Brown <andrew@casabrown.com> | 2014-02-17 17:37:06 -0800 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2014-06-05 19:23:44 +0200 |
commit | 8a223eb62d9d0a1f92ce869ba2639816843cd1a6 (patch) | |
tree | c119930b94a35bdeae8ccf0f486be43459dcf28d | |
parent | 794a133f9ada6d26638f7aba56a2260cb6655df4 (diff) | |
download | nextcloud-server-8a223eb62d9d0a1f92ce869ba2639816843cd1a6.tar.gz nextcloud-server-8a223eb62d9d0a1f92ce869ba2639816843cd1a6.zip |
Move legacy search to 'lib/private/legacy'
This fixes errors where apps would try to start providers using
OC_Search and would fail. Also, made OC_Search simply inherit from
\OC\Search.
-rw-r--r-- | lib/legacy/search.php | 68 | ||||
-rw-r--r-- | lib/private/legacy/search.php | 29 | ||||
-rw-r--r-- | lib/private/legacy/search/provider.php (renamed from lib/legacy/search/provider.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/search/provider/file.php (renamed from lib/legacy/search/provider/file.php) | 0 | ||||
-rw-r--r-- | lib/private/legacy/search/result.php (renamed from lib/legacy/search/result.php) | 0 |
5 files changed, 29 insertions, 68 deletions
diff --git a/lib/legacy/search.php b/lib/legacy/search.php deleted file mode 100644 index 61c7f167208..00000000000 --- a/lib/legacy/search.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** - * ownCloud - * - * @author Frank Karlitschek - * @copyright 2012 Frank Karlitschek frank@owncloud.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - - -/** - * provides an interface to all search providers - * @deprecated see lib/search.php - */ -class OC_Search { - static private $providers=array(); - static private $registeredProviders=array(); - - /** - * remove all registered search providers - * @deprecated see lib/search.php - */ - public static function clearProviders() { - return \OC\Search::clearProviders(); - } - - /** - * register a new search provider to be used - * @param string $provider class name of a OC_Search_Provider - * @deprecated see lib/search.php - */ - public static function registerProvider($class, $options=array()) { - return \OC\Search::registerProvider($class, $options); - } - - /** - * search all provider for $query - * @param string query - * @return array An array of OC_Search_Result's - * @deprecated see lib/search.php - */ - public static function search($query) { - return \OC\Search::search($query); - } - - /** - * remove an existing search provider - * @param string $provider class name of a OC_Search_Provider - * @deprecated see lib/search.php - */ - public static function removeProvider($provider) { - return \OC\Search::removeProvider($provider); - } - -} diff --git a/lib/private/legacy/search.php b/lib/private/legacy/search.php new file mode 100644 index 00000000000..e6396020225 --- /dev/null +++ b/lib/private/legacy/search.php @@ -0,0 +1,29 @@ +<?php +/** + * ownCloud + * + * @author Frank Karlitschek + * @copyright 2012 Frank Karlitschek frank@owncloud.org + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE + * License as published by the Free Software Foundation; either + * version 3 of the License, or any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU Affero General Public + * License along with this library. If not, see <http://www.gnu.org/licenses/>. + * + */ + +/** + * provides an interface to all search providers + * @deprecated see lib/search.php + */ +class OC_Search extends \OC\Search{ + +} diff --git a/lib/legacy/search/provider.php b/lib/private/legacy/search/provider.php index a14ae53c5d3..a14ae53c5d3 100644 --- a/lib/legacy/search/provider.php +++ b/lib/private/legacy/search/provider.php diff --git a/lib/legacy/search/provider/file.php b/lib/private/legacy/search/provider/file.php index e610281131d..e610281131d 100644 --- a/lib/legacy/search/provider/file.php +++ b/lib/private/legacy/search/provider/file.php diff --git a/lib/legacy/search/result.php b/lib/private/legacy/search/result.php index 7cacb3579e5..7cacb3579e5 100644 --- a/lib/legacy/search/result.php +++ b/lib/private/legacy/search/result.php |