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

github.com/nextcloud/gallery.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorOlivier Paroz <github@oparoz.com>2015-09-13 15:27:12 +0300
committerOlivier Paroz <github@oparoz.com>2015-09-13 15:27:12 +0300
commitb5d440519654dc171c171e2161416dd75db3cd05 (patch)
treecdf7ba310bb2b4f04d4f1ce23da01f216ccefdfa /config
parent7b863e9a5ab4a90c53bf70af8c8c04368a286924 (diff)
Decomplexify ConfigParser->buildAlbumConfig
Diffstat (limited to 'config')
-rw-r--r--config/configparser.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/config/configparser.php b/config/configparser.php
index 852ceb90..f6e0db85 100644
--- a/config/configparser.php
+++ b/config/configparser.php
@@ -146,8 +146,7 @@ class ConfigParser {
*/
private function buildAlbumConfig($currentConfig, $parsedConfig, $completionStatus, $level) {
foreach ($completionStatus as $key => $complete) {
- if (!empty($parsedConfig[$key])
- && !$this->isConfigItemComplete($key, $parsedConfig, $complete)
+ if (!$this->isConfigItemComplete($key, $parsedConfig, $complete)
) {
$parsedConfigItem = $parsedConfig[$key];
if ($this->isConfigUsable($parsedConfigItem, $level)) {
@@ -172,7 +171,9 @@ class ConfigParser {
* @return bool
*/
private function isConfigItemComplete($key, $parsedConfig, $complete) {
- return !(!$complete && array_key_exists($key, $parsedConfig));
+ return !(!$complete
+ && array_key_exists($key, $parsedConfig)
+ && !empty($parsedConfig[$key]));
}
/**