From ea3a65664d2f919033c5480026f6cefb570f7d95 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Tue, 18 Aug 2026 14:54:47 +0200 Subject: [PATCH] NC-Connector Verzeichnisfilter in Runtime schreiben --- nc-connector-install.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nc-connector-install.php b/nc-connector-install.php index 8e100c7..e2ae3f6 100644 --- a/nc-connector-install.php +++ b/nc-connector-install.php @@ -58,7 +58,6 @@ function decrypt_install_credentials($blob, $hexKey) $decoded = json_decode($plain, true); if (!is_array($decoded)) { - // Backward compatibility: old connections stored only the DB password. return array('db_password'=>$plain,'piwigo_user'=>'','piwigo_password'=>''); } if (empty($decoded['db_password'])) fail_install('Datenbankpasswort fehlt in den Connector-Zugangsdaten.'); @@ -124,10 +123,13 @@ try @unlink($piwigoPasswordPath); } - $storageLines = array('# storage_idsource_prefixlocal_mount'); + $storageLines = array('# storage_idsource_prefixlocal_mountinclude_prefix'); foreach ((array)($config['storages'] ?? array()) as $storage) { - $storageLines[] = (string)($storage['storage_id'] ?? '')."\t".trim((string)($storage['source_prefix'] ?? ''), '/')."\t".(string)($storage['local_mount'] ?? ''); + $storageLines[] = (string)($storage['storage_id'] ?? '')."\t" + .trim((string)($storage['source_prefix'] ?? ''), '/')."\t" + .(string)($storage['local_mount'] ?? '')."\t" + .trim((string)($storage['include_prefix'] ?? ''), '/'); } if (count($storageLines) === 1) fail_install('Keine Storage-Zuordnungen gespeichert.'); file_put_contents($storagePath, implode("\n", $storageLines)."\n", LOCK_EX); chmod($storagePath, 0600);