diff --git a/lib/Controller/ArchiveController.php b/lib/Controller/ArchiveController.php index 7fe86035..8c5a4ba6 100644 --- a/lib/Controller/ArchiveController.php +++ b/lib/Controller/ArchiveController.php @@ -60,7 +60,7 @@ class ArchiveController extends ApiBase // Create archive folder in the root of the user's configured timeline $configPath = Exif::removeExtraSlash(Exif::getPhotosPath($this->config, $uid)); - $configPaths = \explode(';', $configPath); + $configPaths = explode(';', $configPath); $timelineFolders = []; $timelinePaths = []; @@ -85,7 +85,7 @@ class ArchiveController extends ApiBase } // Hit a timeline folder - if (in_array($parent->getPath(), $timelinePaths)) { + if (\in_array($parent->getPath(), $timelinePaths, true)) { break; } diff --git a/lib/Db/TimelineQueryDays.php b/lib/Db/TimelineQueryDays.php index d754e542..49e29c04 100644 --- a/lib/Db/TimelineQueryDays.php +++ b/lib/Db/TimelineQueryDays.php @@ -161,7 +161,9 @@ trait TimelineQueryDays $query->addSelect('f.etag', 'f.path', 'f.name AS basename'); // SELECT rootid if not a single folder - if ($recursive) $query->addSelect('cte_f.rootid'); + if ($recursive) { + $query->addSelect('cte_f.rootid'); + } // JOIN with mimetypes to get the mimetype $query->join('f', 'mimetypes', 'mimetypes', $query->expr()->eq('f.mimetype', 'mimetypes.id')); diff --git a/lib/Util.php b/lib/Util.php index a2c661e4..2ddd9cb6 100644 --- a/lib/Util.php +++ b/lib/Util.php @@ -4,9 +4,6 @@ declare(strict_types=1); namespace OCA\Memories; -use OCA\Memories\AppInfo\Application; -use OCP\IConfig; - class Util { public static $TAG_DAYID_START = -(1 << 30); // the world surely didn't exist