PHRAS-3520_stamper-enhance (#4385)

* WIP DO NOT MERGE
add: stamp subdefs of class "preview"
apply watermark on stamped subdef (cache to be fixed)
fix: admin/collection settings (new ux, clean xml)

* WIP DO NOT MERGE
add: stamp subdefs of class "preview"
apply watermark on stamped subdef (cache to be fixed)
fix: admin/collection settings (new ux, clean xml)

* conf.export_stamp_choice now supports 'manage_collection' and 'manage_databox' (and bc true) to restrict right to remove stamp.

* fix test

* WIP DO NOT MERGE
add: stamp subdefs of class "preview"
apply watermark on stamped subdef (cache to be fixed)
fix: admin/collection settings (new ux, clean xml)

* conf.export_stamp_choice now supports 'manage_collection' and 'manage_databox' (and bc true) to restrict right to remove stamp.

* fix test

* fix compatibility with download-async ; add registry/actions/stamp-subdefs=false to conf
This commit is contained in:
jygaulier
2023-11-22 12:30:55 +01:00
committed by GitHub
parent 1ccba2d9a0
commit 07f4462672
11 changed files with 732 additions and 857 deletions

View File

@@ -803,7 +803,9 @@ class CollectionController extends Controller
try {
if ('' !== trim($prefs)) {
$domdoc = new \DOMDocument();
if (true === @$domdoc->loadXML($prefs)) {
if (true === @$domdoc->loadXML($prefs, LIBXML_NONET | LIBXML_NOBLANKS)) {
$domdoc->formatOutput = true;
$domdoc->saveXML(null, LIBXML_NOEMPTYTAG);
$collection->set_prefs($domdoc);
$success = true;
}