diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-24 11:46:25 +0200 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2016-10-24 11:46:25 +0200 |
commit | f589f1a1d62bac542f96082c3db2c9577c841e59 (patch) | |
tree | 82fac23710866b68289a39c26b2b8eda3b85f338 | |
parent | f054adb4291c83b05777688360780146af5f7d94 (diff) | |
download | nextcloud-server-f589f1a1d62bac542f96082c3db2c9577c841e59.tar.gz nextcloud-server-f589f1a1d62bac542f96082c3db2c9577c841e59.zip |
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>
-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 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ExternalShareControllerTest.php (renamed from apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php) | 2 | ||||
-rw-r--r-- | apps/files_sharing/tests/Controller/ShareControllerTest.php (renamed from apps/files_sharing/tests/Controllers/ShareControllerTest.php) | 4 |
6 files changed, 10 insertions, 10 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'); } diff --git a/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php index e5fd739c4fa..71a4f4adeba 100644 --- a/apps/files_sharing/tests/Controllers/ExternalShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ExternalShareControllerTest.php @@ -24,7 +24,7 @@ namespace OCA\Files_Sharing\Tests\Controllers; -use OCA\Files_Sharing\Controllers\ExternalSharesController; +use OCA\Files_Sharing\Controller\ExternalSharesController; use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\JSONResponse; use OCP\Http\Client\IClientService; diff --git a/apps/files_sharing/tests/Controllers/ShareControllerTest.php b/apps/files_sharing/tests/Controller/ShareControllerTest.php index 94891d868c2..dae7740b3ae 100644 --- a/apps/files_sharing/tests/Controllers/ShareControllerTest.php +++ b/apps/files_sharing/tests/Controller/ShareControllerTest.php @@ -33,7 +33,7 @@ namespace OCA\Files_Sharing\Tests\Controllers; use OC\Files\Filesystem; use OCA\FederatedFileSharing\FederatedShareProvider; -use OCA\Files_Sharing\Controllers\ShareController; +use OCA\Files_Sharing\Controller\ShareController; use OCP\AppFramework\Http\DataResponse; use OCP\Share\Exceptions\ShareNotFound; use OCP\AppFramework\Http\NotFoundResponse; @@ -96,7 +96,7 @@ class ShareControllerTest extends \Test\TestCase { ->method('isIncomingServer2serverShareEnabled')->willReturn(true); $this->eventDispatcher = $this->getMockBuilder('Symfony\Component\EventDispatcher\EventDispatcherInterface')->getMock(); - $this->shareController = new \OCA\Files_Sharing\Controllers\ShareController( + $this->shareController = new \OCA\Files_Sharing\Controller\ShareController( $this->appName, $this->getMockBuilder('\OCP\IRequest')->getMock(), $this->config, |