4 Commits
1.1.3 ... 1.1.6

4 changed files with 120 additions and 10 deletions

42
CHANGELOG.md Normal file
View File

@@ -0,0 +1,42 @@
# Changelog
Alle nennenswerten Aenderungen an `webfarben/contao-dummy-copier` werden in dieser Datei dokumentiert.
## [1.1.5] - 2026-03-15
### Fixed
- Kompatibilitaet fuer Contao 4.13 und 5.x verbessert: Array-Serialisierung nutzt jetzt natives PHP `serialize()` statt `StringUtil::serialize()`.
## [1.1.4] - 2026-03-15
### Fixed
- SQL-Fehler in Umgebungen ohne `sorting`-Spalte in `tl_news` bzw. `tl_calendar_events` behoben.
- Sortierung fuer News/Events auf robuste ORDER-BY-Klauseln ohne `sorting` angepasst.
## [1.1.3] - 2026-03-15
### Changed
- Backend-Modul-Icon (`public/icon.svg`) hinzugefuegt/aktualisiert.
- README auf aktuellen Funktionsumfang und Installationsweg ueber Packagist gebracht.
## [1.1.2] - 2026-03-12
### Changed
- Paket-Metadaten (`homepage`, `support.source`, `support.issues`) auf GitHub als kanonische Quelle umgestellt.
## [1.1.1] - 2026-03-12
### Fixed
- Rewiring fuer interne News-Referenzen (`related`) in kopierten News verbessert.
- Reader-Modul-Referenzen in kopierten Modulen korrigiert (`news_readerModule`, `cal_readerModule`).
## [1.1.0] - 2026-03-12
### Added
- Kopieren von Newsarchiven und Newsbeitraegen (`tl_news_archive`, `tl_news`).
- Kopieren von Kalendern und Events (`tl_calendar`, `tl_calendar_events`).
- Auswahlfelder fuer Newsarchive/Kalender im Backend-Modul.
- Ergebnisdaten um Zaehler und Mapping fuer News/Kalender erweitert.
### Changed
- Referenz-Umschreibung fuer kopierte Module um Archivzuordnungen erweitert (`news_archives`, `cal_calendar`).

View File

@@ -50,3 +50,7 @@ Das Backend-Modul `Dummy Copier` erscheint anschliessend unter `System`.
- Nach Dateikopien ggf. `php vendor/bin/console contao:filesync` ausfuehren, damit die DBAFS-Daten synchronisiert werden.
- Das Bundle ist fuer pragmatische Redaktions- und Setup-Workflows gedacht. Projektspezifische Sonderfelder oder Referenzen koennen bei Bedarf erweitert werden.
## Changelog
- Siehe `CHANGELOG.md` fuer die dokumentierten Aenderungen ab `1.1.0`.

View File

@@ -1,6 +1,70 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" fill="none">
<rect x="4" y="5" width="11" height="9" rx="2" stroke="#1f2937" stroke-width="2"/>
<rect x="17" y="5" width="11" height="9" rx="2" stroke="#1f2937" stroke-width="2" opacity="0.55"/>
<rect x="4" y="18" width="11" height="9" rx="2" stroke="#1f2937" stroke-width="2" opacity="0.55"/>
<path d="M19 19h9m-4-4 4 4-4 4" stroke="#0f766e" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"/>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
viewBox="0 0 32 32"
fill="none"
version="1.1"
id="svg10"
sodipodi:docname="icon.svg"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<defs
id="defs14" />
<sodipodi:namedview
id="namedview12"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
showgrid="false"
inkscape:zoom="32"
inkscape:cx="14.015625"
inkscape:cy="16"
inkscape:window-width="2560"
inkscape:window-height="1408"
inkscape:window-x="2560"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="svg10" />
<rect
x="4"
y="5"
width="11"
height="9"
rx="2"
stroke="#1f2937"
stroke-width="2"
id="rect2" />
<rect
x="18"
y="5"
width="11"
height="9"
rx="2"
stroke="#1f2937"
stroke-width="2"
opacity="0.55"
id="rect4" />
<rect
x="4"
y="18"
width="11"
height="9"
rx="2"
stroke="#1f2937"
stroke-width="2"
opacity="0.55"
id="rect6" />
<path
d="m 19,22.5 h 9 m -4,-4 4,4 -4,4"
stroke="#0f766e"
stroke-width="2.5"
stroke-linecap="round"
stroke-linejoin="round"
id="path8" />
</svg>

Before

Width:  |  Height:  |  Size: 485 B

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -386,7 +386,7 @@ final class DummyCopier
$this->connection->update(
'tl_news',
[
'related' => StringUtil::serialize($mappedRelated),
'related' => serialize($mappedRelated),
'tstamp' => time(),
],
['id' => $newNewsId]
@@ -426,7 +426,7 @@ final class DummyCopier
$map[(int) $sourceArchiveId] = $newArchiveId;
$result->copiedNewsArchives++;
$newsIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_news WHERE pid = ? ORDER BY date, sorting, id', [(int) $sourceArchiveId]);
$newsIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_news WHERE pid = ? ORDER BY date, id', [(int) $sourceArchiveId]);
foreach ($newsIds as $newsId) {
$newsRow = $this->fetchRow('tl_news', (int) $newsId);
@@ -492,7 +492,7 @@ final class DummyCopier
$map[(int) $sourceCalendarId] = $newCalendarId;
$result->copiedCalendars++;
$eventIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_calendar_events WHERE pid = ? ORDER BY startTime, sorting, id', [(int) $sourceCalendarId]);
$eventIds = $this->connection->fetchFirstColumn('SELECT id FROM tl_calendar_events WHERE pid = ? ORDER BY startTime, id', [(int) $sourceCalendarId]);
foreach ($eventIds as $eventId) {
$eventRow = $this->fetchRow('tl_calendar_events', (int) $eventId);
@@ -658,7 +658,7 @@ final class DummyCopier
$mapped[] = (string) ($idMap[$id] ?? $id);
}
return StringUtil::serialize($mapped);
return serialize($mapped);
}
private function estimateContentCount(DummyCopyOptions $options): int