diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-24 12:46:25 +0300 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-24 12:46:25 +0300 |
commit | f589f1a1d62bac542f96082c3db2c9577c841e59 (patch) | |
tree | 82fac23710866b68289a39c26b2b8eda3b85f338 /apps/files_sharing/lib | |
parent | f054adb4291c83b05777688360780146af5f7d94 (diff) |
Move files_sharing Controllers => Controller
lib/Controller is the default location for controllers. So lets put them
all in there.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r-- | apps/files_sharing/lib/AppInfo/Application.php | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ExternalSharesController.php (renamed from apps/files_sharing/lib/Controllers/ExternalSharesController.php) | 4 | ||||
-rw-r--r-- | apps/files_sharing/lib/Controller/ShareController.php (renamed from apps/files_sharing/lib/Controllers/ShareController.php) | 2 | ||||
-rw-r--r-- | apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/apps/files_sharing/lib/AppInfo/Application.php b/apps/files_sharing/lib/AppInfo/Application.php index 29cdf702a51..922db7dac75 100644 --- a/apps/files_sharing/lib/AppInfo/Application.php +++ b/apps/files_sharing/lib/AppInfo/Application.php @@ -32,8 +32,8 @@ use OCA\Files_Sharing\Middleware\OCSShareAPIMiddleware; use OCA\Files_Sharing\MountProvider; use OCP\AppFramework\App; use OC\AppFramework\Utility\SimpleContainer; -use OCA\Files_Sharing\Controllers\ExternalSharesController; -use OCA\Files_Sharing\Controllers\ShareController; +use OCA\Files_Sharing\Controller\ExternalSharesController; +use OCA\Files_Sharing\Controller\ShareController; use OCA\Files_Sharing\Middleware\SharingCheckMiddleware; use \OCP\IContainer; use OCP\IServerContainer; diff --git a/apps/files_sharing/lib/Controllers/ExternalSharesController.php b/apps/files_sharing/lib/Controller/ExternalSharesController.php index 24b3211e009..fe4c09dd195 100644 --- a/apps/files_sharing/lib/Controllers/ExternalSharesController.php +++ b/apps/files_sharing/lib/Controller/ExternalSharesController.php @@ -24,7 +24,7 @@ * */ -namespace OCA\Files_Sharing\Controllers; +namespace OCA\Files_Sharing\Controller; use OCP\AppFramework\Controller; use OCP\IRequest; @@ -35,7 +35,7 @@ use OCP\AppFramework\Http\DataResponse; /** * Class ExternalSharesController * - * @package OCA\Files_Sharing\Controllers + * @package OCA\Files_Sharing\Controller */ class ExternalSharesController extends Controller { diff --git a/apps/files_sharing/lib/Controllers/ShareController.php b/apps/files_sharing/lib/Controller/ShareController.php index 8e3405311e9..62725115dd6 100644 --- a/apps/files_sharing/lib/Controllers/ShareController.php +++ b/apps/files_sharing/lib/Controller/ShareController.php @@ -30,7 +30,7 @@ * */ -namespace OCA\Files_Sharing\Controllers; +namespace OCA\Files_Sharing\Controller; use OC_Files; use OC_Util; diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php index 7c5eb5afbdc..7e9109bf2d1 100644 --- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php +++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php @@ -78,10 +78,10 @@ class SharingCheckMiddleware extends Middleware { throw new NotFoundException('Sharing is disabled.'); } - if ($controller instanceof \OCA\Files_Sharing\Controllers\ExternalSharesController && + if ($controller instanceof \OCA\Files_Sharing\Controller\ExternalSharesController && !$this->externalSharesChecks()) { throw new S2SException('Federated sharing not allowed'); - } else if ($controller instanceof \OCA\Files_Sharing\Controllers\ShareController && + } else if ($controller instanceof \OCA\Files_Sharing\Controller\ShareController && !$this->isLinkSharingEnabled()) { throw new NotFoundException('Link sharing is disabled'); } |