aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-11-17 00:54:08 +0100
committerGitHub <noreply@github.com>2016-11-17 00:54:08 +0100
commit8a02647e659509b8ce118aab4b7d7a6243fca524 (patch)
treef7fe2b4fbfd0092063e0a6be0e67ebc257b5e682 /lib
parent204a0849b4cf8633f4cbe0f122ce90c9d0f9768c (diff)
parentb373f52fa8c0eb80338e5f06981f4a048f5720e1 (diff)
downloadnextcloud-server-8a02647e659509b8ce118aab4b7d7a6243fca524.tar.gz
nextcloud-server-8a02647e659509b8ce118aab4b7d7a6243fca524.zip
Merge pull request #2122 from nextcloud/downstream-26520
Hack to prevent warning for read-only wrapper in public links
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Filesystem.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/private/Files/Filesystem.php b/lib/private/Files/Filesystem.php
index ac0e66973d4..42a6d950332 100644
--- a/lib/private/Files/Filesystem.php
+++ b/lib/private/Files/Filesystem.php
@@ -214,10 +214,13 @@ class Filesystem {
/**
* @param bool $shouldLog
+ * @return bool previous value
* @internal
*/
public static function logWarningWhenAddingStorageWrapper($shouldLog) {
- self::$logWarningWhenAddingStorageWrapper = (bool)$shouldLog;
+ $previousValue = self::$logWarningWhenAddingStorageWrapper;
+ self::$logWarningWhenAddingStorageWrapper = (bool) $shouldLog;
+ return $previousValue;
}
/**
@@ -226,7 +229,7 @@ class Filesystem {
* @param int $priority
*/
public static function addStorageWrapper($wrapperName, $wrapper, $priority = 50) {
- if (self::$logWarningWhenAddingStorageWrapper && $wrapperName !== 'readonly') {
+ if (self::$logWarningWhenAddingStorageWrapper) {
\OC::$server->getLogger()->warning("Storage wrapper '{wrapper}' was not registered via the 'OC_Filesystem - preSetup' hook which could cause potential problems.", [
'wrapper' => $wrapperName,
'app' => 'filesystem',