Keep old pages readable, detect stale settings writes, make backups honest
- Own CSS is parsed on write only. A page whose stored CSS no longer passes a stricter rule answers 200 and opens in the editor; that one block loses its CSS. A document read several times in one request is validated once. - Settings and theme refuse a write from an outdated form. - A backup fails when a media file does not arrive completely and leaves no half directory behind; rotation counts intact backups only. - The archive update takes its backup behind the maintenance page. - A package import puts all media in place before removing the old ones, reports honestly when that fails and keeps a maintenance state that was already on. - Restoring replaces the SQLite file in one move and points at pending migrations. - Six irreversible actions ask first, in a dialog of the admin's own. - Ctrl+S in the editor takes the field being typed in along; Delete no longer removes a block while a dialog is open. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
0d61aa0f22
commit
ead47cc924
25 files changed
+437
-72
No files matched your search
@@ -90,6 +90,16 @@ final class SitePackageTest extends TestCase
|
||||
self::assertFileDoesNotExist($this->sites['ziel']['root'].'/var/maintenance');
|
||||
}
|
||||
|
||||
public function testAnImportLeavesAMaintenanceStateThatWasAlreadyOn(): void
|
||||
{
|
||||
// Wer die Wartung vorher von Hand eingeschaltet hat, will sie nach dem Import noch haben.
|
||||
file_put_contents($this->sites['ziel']['root'].'/var/maintenance', "an\n");
|
||||
$result = $this->sites['ziel']['package']->import($this->sites['quelle']['package']->export());
|
||||
self::assertTrue($result['ok'], json_encode($result['steps'], JSON_UNESCAPED_UNICODE));
|
||||
self::assertFileExists($this->sites['ziel']['root'].'/var/maintenance');
|
||||
self::assertSame([str_repeat('a', 32).'-480.webp'], array_values(array_diff(scandir($this->sites['ziel']['root'].'/var/media'), ['.', '..'])));
|
||||
}
|
||||
|
||||
public function testAccountsComeAlongOnlyWhenChosenOnBothSides(): void
|
||||
{
|
||||
// Paket ohne Konten, Häkchen gesetzt: abgelehnt, nichts geändert.
|
||||
|
||||
Reference in new issue
Block a user