summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/search.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/search.php b/lib/search.php
index 3c3378ad13c..e5a65f7157d 100644
--- a/lib/search.php
+++ b/lib/search.php
@@ -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