summaryrefslogtreecommitdiffstats
path: root/lib/private/App
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-08-18 10:47:49 +0200
committerCarl Schwan <carl@carlschwan.eu>2022-08-23 19:44:04 +0200
commit9b8ca9ad1f3df5d32df241d8848c8dc92c9a1fc2 (patch)
tree72aa5edaaa4b3c3ded5931c6914988ac9dce9467 /lib/private/App
parent604c1752845df068a7dd5d168abfbfc04065ac3f (diff)
downloadnextcloud-server-9b8ca9ad1f3df5d32df241d8848c8dc92c9a1fc2.tar.gz
nextcloud-server-9b8ca9ad1f3df5d32df241d8848c8dc92c9a1fc2.zip
Move findBinaryFinder and isFunctionEnabled away from OC_Helper
findBinaryFinder is now a service that is still private but with some minor optimization (remove the hasKey check). isFunctionEnabled is now in OCP\Util Both function are still keep but all internal usage in nextcloud/server were migrated to the new usage, so that we can remove it in 26 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/App')
-rw-r--r--lib/private/App/Platform.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/App/Platform.php b/lib/private/App/Platform.php
index 15966d85c34..01bf6748654 100644
--- a/lib/private/App/Platform.php
+++ b/lib/private/App/Platform.php
@@ -26,6 +26,7 @@
namespace OC\App;
use OCP\IConfig;
+use OCP\IBinaryFinder;
/**
* Class Platform
@@ -70,9 +71,8 @@ class Platform {
/**
* @param $command
*/
- public function isCommandKnown($command): bool {
- $path = \OC_Helper::findBinaryPath($command);
- return ($path !== null);
+ public function isCommandKnown(string $command): bool {
+ return \OCP\Server::get(IBinaryFinder::class)->findBinaryPath($command) !== false;
}
public function getLibraryVersion(string $name): ?string {