replace deprecated et2_dialog with new Et2Dialog

This commit is contained in:
ralf 2025-01-07 08:58:58 +01:00
parent 22f695b2e2
commit bb12fea3c9

View File

@ -623,6 +623,11 @@ function stringAttrs(array $attrs)
{
return '';
}
// replace deprecated et2_dialog with new Et2Dialog
if (!empty($attrs['onclick']) && strpos($attrs['onclick'], 'et2_dialog.') !== false)
{
$attrs['onclick'] = str_replace('et2_dialog.', 'Et2Dialog.', $attrs['onclick']);
}
return ' '.implode(' ', array_map(static function ($name, $value) {
return $name . '="' . $value . '"';
}, array_keys($attrs), $attrs));