Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/photos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2020-10-12 18:14:19 +0300
committerGitHub <noreply@github.com>2020-10-12 18:14:19 +0300
commitf888afecbc9eb2183acf5a67ad3463eb0826eaa9 (patch)
treeded77ab21a36ac38cda77644256f302e87587c77 /lib
parent005726c31d9d2a8539a22663578e04d2710b7402 (diff)
parent695d42129cad02ff6690e133ea69b7757d2c9b84 (diff)
Merge branch 'master' into 208-show-png
Diffstat (limited to 'lib')
-rw-r--r--lib/AppInfo/Application.php20
-rw-r--r--lib/Controller/AlbumsController.php7
-rw-r--r--lib/Controller/PageController.php5
3 files changed, 21 insertions, 11 deletions
diff --git a/lib/AppInfo/Application.php b/lib/AppInfo/Application.php
index 1bbcc6b3..de3ade2a 100644
--- a/lib/AppInfo/Application.php
+++ b/lib/AppInfo/Application.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
@@ -25,14 +26,17 @@ declare(strict_types=1);
namespace OCA\Photos\AppInfo;
use OCP\AppFramework\App;
+use OCP\AppFramework\Bootstrap\IBootContext;
+use OCP\AppFramework\Bootstrap\IBootstrap;
+use OCP\AppFramework\Bootstrap\IRegistrationContext;
-class Application extends App {
-
- const APP_ID = 'photos';
+class Application extends App implements IBootstrap {
+ public const APP_ID = 'photos';
- const MIMES = [
- 'image/png', // rarely used but still used #208
+ public const MIMES = [
+ 'image/png',
'image/jpeg',
+ 'image/heic',
// 'image/gif', // too rarely used for photos
// 'image/x-xbitmap', // too rarely used for photos
// 'image/bmp', // too rarely used for photos
@@ -49,4 +53,10 @@ class Application extends App {
public function __construct() {
parent::__construct(self::APP_ID);
}
+
+ public function register(IRegistrationContext $context): void {
+ }
+
+ public function boot(IBootContext $context): void {
+ }
}
diff --git a/lib/Controller/AlbumsController.php b/lib/Controller/AlbumsController.php
index fc3044b5..d047474b 100644
--- a/lib/Controller/AlbumsController.php
+++ b/lib/Controller/AlbumsController.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019, Roeland Jago Douma <roeland@famdouma.nl>
@@ -98,7 +99,6 @@ class AlbumsController extends Controller {
'etag' => $node->getEtag(),
'fileid' => $node->getId(),
'filename' => $path,
- 'etag' => $node->getEtag(),
'lastmod' => $node->getMTime(),
'mime' => $node->getMimetype(),
'size' => $node->getSize(),
@@ -109,7 +109,7 @@ class AlbumsController extends Controller {
return $result;
}
- private function scanCurrentFolder(Folder $folder, bool $shared): iterable {
+ private function scanCurrentFolder(Folder $folder, bool $shared): iterable {
$nodes = $folder->getDirectoryListing();
// add current folder to iterable set
@@ -135,7 +135,8 @@ class AlbumsController extends Controller {
}
private function isShared(Node $node): bool {
- return $node->getStorage()->instanceOfStorage(SharedStorage::class);
+ return $node->getStorage()->instanceOfStorage(SharedStorage::class) ||
+ $node->getStorage()->instanceOfStorage(\OCA\GroupFolders\Mount\GroupFolderStorage::class);
}
private function scanFolder(Folder $folder, int $depth, bool $shared): bool {
diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php
index b4b0e99a..effb3e07 100644
--- a/lib/Controller/PageController.php
+++ b/lib/Controller/PageController.php
@@ -1,4 +1,5 @@
<?php
+
declare(strict_types=1);
/**
* @copyright Copyright (c) 2019 John Molakvoæ <skjnldsv@protonmail.com>
@@ -37,7 +38,6 @@ use OCP\IConfig;
use OCP\App\IAppManager;
class PageController extends Controller {
-
protected $appName;
/** @var IEventDispatcher */
@@ -62,7 +62,6 @@ class PageController extends Controller {
$this->eventDispatcher = $eventDispatcher;
$this->initialStateService = $initialStateService;
$this->config = $config;
-
}
/**
@@ -79,7 +78,7 @@ class PageController extends Controller {
$this->initialStateService->provideInitialState($this->appName, 'mimes', Application::MIMES);
$this->initialStateService->provideInitialState($this->appName, 'maps', $this->appManager->isEnabledForUser('maps') === true);
- Util::addScript($this->appName, 'photos');
+ Util::addScript($this->appName, 'photos-main');
Util::addStyle($this->appName, 'icons');
$response = new TemplateResponse($this->appName, 'main');