aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_sharing/lib')
-rw-r--r--apps/files_sharing/lib/Activity/Providers/RemoteShares.php2
-rw-r--r--apps/files_sharing/lib/Capabilities.php2
-rw-r--r--apps/files_sharing/lib/Command/CleanupRemoteStorages.php6
-rw-r--r--apps/files_sharing/lib/ExpireSharesJob.php1
-rw-r--r--apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php2
-rw-r--r--apps/files_sharing/lib/ShareBackend/Folder.php6
6 files changed, 9 insertions, 10 deletions
diff --git a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
index cf4954800e8..f89fb0b0052 100644
--- a/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
+++ b/apps/files_sharing/lib/Activity/Providers/RemoteShares.php
@@ -23,9 +23,7 @@ namespace OCA\Files_Sharing\Activity\Providers;
use OCP\Activity\IEvent;
use OCP\Activity\IManager;
-use OCP\Activity\IProvider;
use OCP\Federation\ICloudIdManager;
-use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUserManager;
use OCP\L10N\IFactory;
diff --git a/apps/files_sharing/lib/Capabilities.php b/apps/files_sharing/lib/Capabilities.php
index 22a8a8a0a3d..e8e6a4c26f3 100644
--- a/apps/files_sharing/lib/Capabilities.php
+++ b/apps/files_sharing/lib/Capabilities.php
@@ -71,7 +71,7 @@ class Capabilities implements ICapability {
$public['upload'] = $this->config->getAppValue('core', 'shareapi_allow_public_upload', 'yes') === 'yes';
$public['upload_files_drop'] = $public['upload'];
}
- $res["public"] = $public;
+ $res['public'] = $public;
$res['resharing'] = $this->config->getAppValue('core', 'shareapi_allow_resharing', 'yes') === 'yes';
diff --git a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php
index 504caba1417..389b0dc4985 100644
--- a/apps/files_sharing/lib/Command/CleanupRemoteStorages.php
+++ b/apps/files_sharing/lib/Command/CleanupRemoteStorages.php
@@ -60,11 +60,11 @@ class CleanupRemoteStorages extends Command {
$remoteStorages = $this->getRemoteStorages();
- $output->writeln(count($remoteStorages) . " remote storage(s) need(s) to be checked");
+ $output->writeln(count($remoteStorages) . ' remote storage(s) need(s) to be checked');
$remoteShareIds = $this->getRemoteShareIds();
- $output->writeln(count($remoteShareIds) . " remote share(s) exist");
+ $output->writeln(count($remoteShareIds) . ' remote share(s) exist');
foreach ($remoteShareIds as $id => $remoteShareId) {
if (isset($remoteStorages[$remoteShareId])) {
@@ -79,7 +79,7 @@ class CleanupRemoteStorages extends Command {
}
if (empty($remoteStorages)) {
- $output->writeln("<info>no storages deleted</info>");
+ $output->writeln('<info>no storages deleted</info>');
} else {
$dryRun = $input->getOption('dry-run');
foreach ($remoteStorages as $id => $numericId) {
diff --git a/apps/files_sharing/lib/ExpireSharesJob.php b/apps/files_sharing/lib/ExpireSharesJob.php
index 19c0606dc46..212b7fa008e 100644
--- a/apps/files_sharing/lib/ExpireSharesJob.php
+++ b/apps/files_sharing/lib/ExpireSharesJob.php
@@ -44,7 +44,6 @@ class ExpireSharesJob extends TimedJob {
*/
public function run($argument) {
$connection = \OC::$server->getDatabaseConnection();
- $logger = \OC::$server->getLogger();
//Current time
$now = new \DateTime();
diff --git a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
index 5712b96b97d..9dd8d2e5ae9 100644
--- a/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
+++ b/apps/files_sharing/lib/Middleware/SharingCheckMiddleware.php
@@ -37,6 +37,7 @@ use OCA\Files_Sharing\Exceptions\S2SException;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
use OCP\Share\IManager;
+use OCP\Share\Exceptions\ShareNotFound;
/**
* Checks whether the "sharing check" is enabled
@@ -88,6 +89,7 @@ class SharingCheckMiddleware extends Middleware {
* @param string $methodName
* @throws NotFoundException
* @throws S2SException
+ * @throws ShareNotFound
*/
public function beforeController($controller, $methodName) {
if(!$this->isSharingEnabled()) {
diff --git a/apps/files_sharing/lib/ShareBackend/Folder.php b/apps/files_sharing/lib/ShareBackend/Folder.php
index 4929bebf40b..07e353cc6a6 100644
--- a/apps/files_sharing/lib/ShareBackend/Folder.php
+++ b/apps/files_sharing/lib/ShareBackend/Folder.php
@@ -50,8 +50,8 @@ class Folder extends File implements \OCP\Share_Backend_Collection {
$share['file_path'] = $name;
$displayNameOwner = \OCP\User::getDisplayName($share['uid_owner']);
$displayNameShareWith = \OCP\User::getDisplayName($share['share_with']);
- $share['displayname_owner'] = ($displayNameOwner) ? $displayNameOwner : $share['uid_owner'];
- $share['share_with_displayname'] = ($displayNameShareWith) ? $displayNameShareWith : $share['uid_owner'];
+ $share['displayname_owner'] = $displayNameOwner ? $displayNameOwner : $share['uid_owner'];
+ $share['share_with_displayname'] = $displayNameShareWith ? $displayNameShareWith : $share['uid_owner'];
$result[] = $share;
}
@@ -72,7 +72,7 @@ class Folder extends File implements \OCP\Share_Backend_Collection {
$query = \OCP\DB::prepare('SELECT `parent` FROM `*PREFIX*filecache` WHERE `fileid` = ?');
$result = $query->execute(array($child));
$row = $result->fetchRow();
- $parent = ($row) ? $row['parent'] : null;
+ $parent = $row ? $row['parent'] : null;
return $parent;
}