Update card.php

This commit is contained in:
BENKE Charlene 2022-01-04 09:32:27 +01:00 committed by GitHub
parent 0bc33ef3b3
commit 883d6bd63a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1534,6 +1534,7 @@ if ($action == 'create') {
if (!empty($origin) && !empty($originid)) {
// Parse element/subelement (ex: project_task)
$element = $subelement = $origin;
$classname = ucfirst($subelement);
$regs = array();
if (preg_match('/^([^_]+)_([^_]+)/i', $origin, $regs)) {
$element = $regs[1];