summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2015-01-14 13:56:49 +0100
committerThomas Müller <thomas.mueller@tmit.eu>2015-01-14 13:56:49 +0100
commit25806346c2fb33fb4a82906683ffafd950289b53 (patch)
tree9a6d672669822f6956566aa7f2b810e4b30721f8 /apps/files_sharing/lib
parent3a6d2fcc102a7e9c62a2233ccc50691470741337 (diff)
downloadnextcloud-server-25806346c2fb33fb4a82906683ffafd950289b53.tar.gz
nextcloud-server-25806346c2fb33fb4a82906683ffafd950289b53.zip
remove deprecated code - fixes #13119
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/middleware/sharingcheckmiddleware.php30
1 files changed, 15 insertions, 15 deletions
diff --git a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php b/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php
index af79cd9e94a..3508407f2a0 100644
--- a/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php
+++ b/apps/files_sharing/lib/middleware/sharingcheckmiddleware.php
@@ -10,10 +10,10 @@
namespace OCA\Files_Sharing\Middleware;
-use OCP\AppFramework\IApi;
-use \OCP\AppFramework\Middleware;
+use OCP\App\IAppManager;
+use OCP\AppFramework\Middleware;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\IAppConfig;
+use OCP\IConfig;
/**
* Checks whether the "sharing check" is enabled
@@ -24,22 +24,22 @@ class SharingCheckMiddleware extends Middleware {
/** @var string */
protected $appName;
- /** @var IAppConfig */
- protected $appConfig;
- /** @var IApi */
- protected $api;
+ /** @var IConfig */
+ protected $config;
+ /** @var IAppManager */
+ protected $appManager;
/***
* @param string $appName
- * @param IAppConfig $appConfig
- * @param IApi $api
+ * @param IConfig $config
+ * @param IAppManager $appManager
*/
public function __construct($appName,
- IAppConfig $appConfig,
- IApi $api) {
+ IConfig $config,
+ IAppManager $appManager) {
$this->appName = $appName;
- $this->appConfig = $appConfig;
- $this->api = $api;
+ $this->config = $config;
+ $this->appManager = $appManager;
}
/**
@@ -69,12 +69,12 @@ class SharingCheckMiddleware extends Middleware {
private function isSharingEnabled() {
// FIXME: This check is done here since the route is globally defined and not inside the files_sharing app
// Check whether the sharing application is enabled
- if(!$this->api->isAppEnabled($this->appName)) {
+ if(!$this->appManager->isEnabledForUser($this->appName)) {
return false;
}
// Check whether public sharing is enabled
- if($this->appConfig->getValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
+ if($this->config->getAppValue('core', 'shareapi_allow_links', 'yes') !== 'yes') {
return false;
}