Skip to content

Commit f5b14a9

Browse files
committed
fix(target): rename a target overriden by a global var
$name is a global variable containing the last initialized plugin
1 parent 7083d9a commit f5b14a9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

front/targetchange.form.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@
1212

1313
// Edit an existing target change
1414
if (isset($_POST["update"])) {
15-
Session::checkRight("entity", UPDATE);
16-
1715
$target = new PluginFormcreatorTarget();
1816
$found = $target->find('items_id = ' . (int) $_POST['id']);
1917
$found = array_shift($found);
20-
$target->update(['id' => $found['id'], 'name' => $name]);
18+
$target->update(['id' => $found['id'], 'name' => $_POST['name']]);
2119
$targetticket->update($_POST);
2220
Html::back();
2321

2422
} else if (isset($_POST['actor_role'])) {
25-
Session::checkRight("entity", UPDATE);
2623
$id = (int) $_POST['id'];
2724
$actor_value = isset($_POST['actor_value_' . $_POST['actor_type']])
2825
? $_POST['actor_value_' . $_POST['actor_type']]

0 commit comments

Comments
 (0)