Skip to content

Commit f10a77e

Browse files
fix: use given title as proposed uname for cloned objects
1 parent 3b9c21a commit f10a77e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Controller/ModulesController.php

+5
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,11 @@ public function clone($id): ?Response
364364
'title' => $this->getRequest()->getQuery('title'),
365365
'status' => 'draft',
366366
];
367+
368+
if (!empty($modified['title'])) {
369+
$modified['uname'] = $modified['title'];
370+
}
371+
367372
$reset = (array)Configure::read(sprintf('Clone.%s.reset', $this->objectType));
368373
foreach ($reset as $field) {
369374
$modified[$field] = null;

0 commit comments

Comments
 (0)