Merge pull request #1413 from owncloud/enable_removing_search_providers

add function to remove a search provider
remotes/origin/stable5
Frank Karlitschek 12 years ago
commit 03c18a6186
  1. 16
      lib/search.php

@ -58,6 +58,22 @@ class OC_Search{
return $results;
}
/**
* remove an existing search provider
* @param string $provider class name of a OC_Search_Provider
*/
public static function removeProvider($provider) {
self::$registeredProviders = array_filter(
self::$registeredProviders,
function ($element) use ($provider) {
return ($element['class'] != $provider);
}
);
// force regeneration of providers on next search
self::$providers=array();
}
/**
* create instances of all the registered search providers
*/

Loading…
Cancel
Save