Skip to content

Commit 0eb3c3e

Browse files
authored
Merge pull request #19932 from nextcloud/remove-placeholder-check
remove the requirement that everything that looks like a placeholder …
2 parents 7e1bee3 + 5908266 commit 0eb3c3e

File tree

2 files changed

+0
-77
lines changed

2 files changed

+0
-77
lines changed

apps/files_external/lib/config.php

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -252,20 +252,6 @@ public static function getBackendStatus($class, $options, $isPersonal, $testOnly
252252
continue;
253253
}
254254
$option = self::substitutePlaceholdersInConfig($option);
255-
if(!self::arePlaceholdersSubstituted($option)) {
256-
\OC::$server->getLogger()->error(
257-
'A placeholder was not substituted: {option} for mount type {class}',
258-
[
259-
'app' => 'files_external',
260-
'option' => $option,
261-
'class' => $class,
262-
]
263-
);
264-
throw new StorageNotAvailableException(
265-
'Mount configuration incomplete',
266-
StorageNotAvailableException::STATUS_INCOMPLETE_CONF
267-
);
268-
}
269255
}
270256
if (class_exists($class)) {
271257
try {
@@ -290,20 +276,6 @@ public static function getBackendStatus($class, $options, $isPersonal, $testOnly
290276
return StorageNotAvailableException::STATUS_ERROR;
291277
}
292278

293-
public static function arePlaceholdersSubstituted($option):bool {
294-
$result = true;
295-
if(is_array($option)) {
296-
foreach ($option as $optionItem) {
297-
$result = $result && self::arePlaceholdersSubstituted($optionItem);
298-
}
299-
} else if (is_string($option)) {
300-
if (strpos(rtrim($option, '$'), '$') !== false) {
301-
$result = false;
302-
}
303-
}
304-
return $result;
305-
}
306-
307279
/**
308280
* Read the mount points in the config file into an array
309281
*

apps/files_external/tests/Config/PlaceholderSubstituteTest.php

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)