From 77a295d74fea6a8e54beeb322185d45a42e86bd9 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Thu, 20 Aug 2026 11:23:33 +0200 Subject: [PATCH 1/4] 0.9.6.3: einmalige Reparatur verwaister WebDAV-Bilder --- runtime/repair-webdav-orphans.php | 99 +++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 runtime/repair-webdav-orphans.php diff --git a/runtime/repair-webdav-orphans.php b/runtime/repair-webdav-orphans.php new file mode 100644 index 0000000..6599a32 --- /dev/null +++ b/runtime/repair-webdav-orphans.php @@ -0,0 +1,99 @@ +#!/usr/bin/env php +getMessage()."\n"); + exit(1); +} From fed089db4c7029b92f8bfb70269685c0e68aa86d Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Thu, 20 Aug 2026 11:23:54 +0200 Subject: [PATCH 2/4] =?UTF-8?q?0.9.6.3:=20Altlasten-Reparatur=20einmalig?= =?UTF-8?q?=20vor=20WebDAV-Sync=20ausf=C3=BChren?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- runtime/run-all.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime/run-all.sh b/runtime/run-all.sh index 33aeb96..525e70e 100644 --- a/runtime/run-all.sh +++ b/runtime/run-all.sh @@ -10,6 +10,11 @@ if ! php "$SCRIPT_DIR/reconcile-webdav.php"; then exit 1 fi +if ! php "$SCRIPT_DIR/repair-webdav-orphans.php"; then + echo "NC Connector: verwaiste WebDAV-Bilddatensaetze konnten nicht repariert werden." >&2 + exit 1 +fi + if ! php "$SCRIPT_DIR/cleanup-webdav-piwigo.php"; then echo "NC Connector: Piwigo-Inhalte geloeschter WebDAV-Verbindungen konnten nicht bereinigt werden." >&2 exit 1 From 7831a9513f60b362485bf21bd44c708c8f9d907c Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Thu, 20 Aug 2026 11:24:19 +0200 Subject: [PATCH 3/4] Version 0.9.6.3 --- main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.inc.php b/main.inc.php index f4e95cc..ded140f 100644 --- a/main.inc.php +++ b/main.inc.php @@ -1,7 +1,7 @@ Date: Thu, 20 Aug 2026 11:24:56 +0200 Subject: [PATCH 4/4] 0.9.6.3: WebDAV-Pfadfilter exakt begrenzen --- runtime/repair-webdav-orphans.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/runtime/repair-webdav-orphans.php b/runtime/repair-webdav-orphans.php index 6599a32..b531274 100644 --- a/runtime/repair-webdav-orphans.php +++ b/runtime/repair-webdav-orphans.php @@ -43,10 +43,12 @@ try $relativePrefix = './_data/bratonien-tools/nc-webdav-gallery/connection-'; $absolutePrefix = rtrim(PHPWG_ROOT_PATH, '/').'/_data/bratonien-tools/nc-webdav-gallery/connection-'; + $relativeLength = strlen($relativePrefix); + $absoluteLength = strlen($absolutePrefix); $query = "SELECT id,path FROM ".IMAGES_TABLE. - " WHERE path LIKE '".pwg_db_real_escape_string($relativePrefix)."%'". - " OR path LIKE '".pwg_db_real_escape_string($absolutePrefix)."%'"; + " WHERE LEFT(path,".$relativeLength.")='".pwg_db_real_escape_string($relativePrefix)."'". + " OR LEFT(path,".$absoluteLength.")='".pwg_db_real_escape_string($absolutePrefix)."'"; $result = pwg_query($query); $staleIds = array();