Skip to content
Snippets Groups Projects
Commit 0c852503 authored by Jörn Friedrich Dreyer's avatar Jörn Friedrich Dreyer
Browse files

add function to remove a search provider

parent 00a30e66
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment