Skip to content

Commit 9fff825

Browse files
stonebuzzcedric-anne
authored andcommitted
fix(core): prevent error from clone action
1 parent b933482 commit 9fff825

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

inc/container.class.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ public static function titleList()
5353
__("Export to YAML", "fields") . "</a></div><br>";
5454
}
5555

56+
public function getForbiddenStandardMassiveAction()
57+
{
58+
$forbidden = parent::getForbiddenStandardMassiveAction();
59+
$forbidden[] = 'clone';
60+
return $forbidden;
61+
}
62+
5663
/**
5764
* Install or update plugin base data.
5865
*

inc/field.class.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ class PluginFieldsField extends CommonDBChild
4444
public static $itemtype = PluginFieldsContainer::class;
4545
public static $items_id = 'plugin_fields_containers_id';
4646

47+
48+
public function getForbiddenStandardMassiveAction()
49+
{
50+
$forbidden = parent::getForbiddenStandardMassiveAction();
51+
$forbidden[] = 'clone';
52+
return $forbidden;
53+
}
54+
55+
4756
/**
4857
* Install or update plugin base data.
4958
*

0 commit comments

Comments
 (0)