From 9e57c4ea3d7625b810c16bba463b36f5d9d1ed9f Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Wed, 19 Aug 2026 19:43:30 +0200 Subject: [PATCH 1/2] 0.9.6.28: Fallback nutzt denselben Piwigo-Syncpfad --- runtime/lib/piwigo-sync.php | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/runtime/lib/piwigo-sync.php b/runtime/lib/piwigo-sync.php index 3e1650d..827ec70 100644 --- a/runtime/lib/piwigo-sync.php +++ b/runtime/lib/piwigo-sync.php @@ -252,8 +252,6 @@ try ); decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'bratonien.nc.syncProductive', 'site_id'=>$site_id), $headers)); $orphan = decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>$site_id, 'simulate'=>0), $headers)); - // Entfernt alte technische bratonien-webdav-N Wrapper aus Site 1, - // nachdem deren generierte Verzeichnisse beim Reconcile entfernt wurden. if ($site_id !== 1) { decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>1, 'simulate'=>0), $headers)); @@ -284,16 +282,31 @@ try try { decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'pwg.session.login', 'username'=>$fallback_user, 'password'=>$fallback_password), array(), $cookie_file)); - http_request( - $base_url.'/admin.php?page=site_update&site='.$site_id, - array('sync'=>'files','display_info'=>1,'privacy_level'=>0,'sync_meta'=>1,'simulate'=>0,'subcats-included'=>1,'bratonien_connector'=>1,'submit'=>1), + + // Der Fallback darf keinen zweiten Strukturpfad benutzen. Auch mit + // Benutzer/Passwort wird exakt derselbe Bratonien-Sync wie mit API-Key + // ausgefuehrt. Dadurch werden alte technische WebDAV-Kategorien entfernt + // und vorhandene Piwigo-Alben wiederverwendet. + decode_ws(http_request( + $base_url.'/ws.php?format=json', + array('method'=>'bratonien.nc.syncProductive', 'site_id'=>$site_id), array(), $cookie_file - ); - $orphan = decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>$site_id, 'simulate'=>0), array(), $cookie_file)); + )); + $orphan = decode_ws(http_request( + $base_url.'/ws.php?format=json', + array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>$site_id, 'simulate'=>0), + array(), + $cookie_file + )); if ($site_id !== 1) { - decode_ws(http_request($base_url.'/ws.php?format=json', array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>1, 'simulate'=>0), array(), $cookie_file)); + decode_ws(http_request( + $base_url.'/ws.php?format=json', + array('method'=>'bratonien.nc.syncOrphans', 'site_id'=>1, 'simulate'=>0), + array(), + $cookie_file + )); } $added = (int)($orphan['added_orphans'] ?? 0); $deleted = (int)($orphan['deleted_orphans'] ?? 0); From d80163a7043c8c47dfe5dfb398d3449bfe302e27 Mon Sep 17 00:00:00 2001 From: Terranom674 Date: Wed, 19 Aug 2026 19:43:48 +0200 Subject: [PATCH 2/2] 0.9.6.28: Version fuer Strukturfix anheben --- main.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.inc.php b/main.inc.php index 467fd7b..27e26e3 100644 --- a/main.inc.php +++ b/main.inc.php @@ -1,7 +1,7 @@