diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 18 | ||||
-rw-r--r-- | lib/private/Files/Type/Detection.php | 12 | ||||
-rw-r--r-- | lib/private/Files/View.php | 2 | ||||
-rw-r--r-- | lib/private/Preview/MP3.php | 2 | ||||
-rw-r--r-- | lib/private/SystemTag/SystemTagManager.php | 5 |
5 files changed, 27 insertions, 12 deletions
diff --git a/lib/base.php b/lib/base.php index dde8e38218a..78f42dc0dbd 100644 --- a/lib/base.php +++ b/lib/base.php @@ -833,10 +833,14 @@ class OC { } $request = \OC::$server->getRequest(); + // Check if requested URL matches 'index.php/occ' + $isOccControllerRequested = preg_match('|/index\.php$|', $request->getScriptName()) === 1 + && strpos($request->getPathInfo(), '/occ/') === 0; + $requestPath = $request->getRawPathInfo(); if (substr($requestPath, -3) !== '.js') { // we need these files during the upgrade self::checkMaintenanceMode($request); - self::checkUpgrade(); + $needUpgrade = self::checkUpgrade(!$isOccControllerRequested); } // emergency app disabling @@ -854,8 +858,16 @@ class OC { exit(); } - // Always load authentication apps - OC_App::loadApps(['authentication']); + try { + // Always load authentication apps + OC_App::loadApps(['authentication']); + } catch (\OC\NeedsUpdateException $e) { + if ($isOccControllerRequested && $needUpgrade){ + OC::$server->getRouter()->match(\OC::$server->getRequest()->getRawPathInfo()); + return; + } + throw $e; + } // Load minimum set of apps if (!self::checkUpgrade(false) diff --git a/lib/private/Files/Type/Detection.php b/lib/private/Files/Type/Detection.php index 6191eae2754..2d68c92b14e 100644 --- a/lib/private/Files/Type/Detection.php +++ b/lib/private/Files/Type/Detection.php @@ -283,21 +283,21 @@ class Detection implements IMimeTypeDetector { // Is it a dir? if ($mimetype === 'dir') { - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder.svg'); return $this->mimetypeIcons[$mimetype]; } if ($mimetype === 'dir-shared') { - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-shared.svg'); return $this->mimetypeIcons[$mimetype]; } if ($mimetype === 'dir-external') { - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/folder-external.svg'); return $this->mimetypeIcons[$mimetype]; } // Icon exists? try { - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $icon . '.svg'); return $this->mimetypeIcons[$mimetype]; } catch (\RuntimeException $e) { // Specified image not found @@ -306,13 +306,13 @@ class Detection implements IMimeTypeDetector { // Try only the first part of the filetype $mimePart = substr($icon, 0, strpos($icon, '-')); try { - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/' . $mimePart . '.svg'); return $this->mimetypeIcons[$mimetype]; } catch (\RuntimeException $e) { // Image for the first part of the mimetype not found } - $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/file.png'); + $this->mimetypeIcons[$mimetype] = $this->urlGenerator->imagePath('core', 'filetypes/file.svg'); return $this->mimetypeIcons[$mimetype]; } } diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 31549c93cb2..7d9771e6394 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -1980,7 +1980,7 @@ class View { $mount = $this->getMountForLock($absolutePath, $lockMountPoint); if ($mount) { $storage = $mount->getStorage(); - if ($storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { + if ($storage && $storage->instanceOfStorage('\OCP\Files\Storage\ILockingStorage')) { $storage->releaseLock( $mount->getInternalPath($absolutePath), $type, diff --git a/lib/private/Preview/MP3.php b/lib/private/Preview/MP3.php index 8b1a0500538..f96b422f57a 100644 --- a/lib/private/Preview/MP3.php +++ b/lib/private/Preview/MP3.php @@ -68,7 +68,7 @@ class MP3 extends Provider { * @return bool|\OCP\IImage false if the default image is missing or invalid */ private function getNoCoverThumbnail() { - $icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.png'; + $icon = \OC::$SERVERROOT . '/core/img/filetypes/audio.svg'; if(!file_exists($icon)) { return false; diff --git a/lib/private/SystemTag/SystemTagManager.php b/lib/private/SystemTag/SystemTagManager.php index 3e32582025f..7055fafbf24 100644 --- a/lib/private/SystemTag/SystemTagManager.php +++ b/lib/private/SystemTag/SystemTagManager.php @@ -140,7 +140,10 @@ class SystemTagManager implements ISystemTagManager { if (!empty($nameSearchPattern)) { $query->andWhere( - $query->expr()->like('name', $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern) . '%')) + $query->expr()->like( + 'name', + $query->createNamedParameter('%' . $this->connection->escapeLikeParameter($nameSearchPattern). '%') + ) ); } |