Skip to content

Commit

Permalink
fix(target): rename a target overriden by a global var
Browse files Browse the repository at this point in the history
$name is a global variable containing the last initialized plugin
  • Loading branch information
btry committed Oct 13, 2017
1 parent 7083d9a commit f5b14a9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions front/targetchange.form.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@

// Edit an existing target change
if (isset($_POST["update"])) {
Session::checkRight("entity", UPDATE);

$target = new PluginFormcreatorTarget();
$found = $target->find('items_id = ' . (int) $_POST['id']);
$found = array_shift($found);
$target->update(['id' => $found['id'], 'name' => $name]);
$target->update(['id' => $found['id'], 'name' => $_POST['name']]);
$targetticket->update($_POST);
Html::back();

} else if (isset($_POST['actor_role'])) {
Session::checkRight("entity", UPDATE);
$id = (int) $_POST['id'];
$actor_value = isset($_POST['actor_value_' . $_POST['actor_type']])
? $_POST['actor_value_' . $_POST['actor_type']]
Expand Down

0 comments on commit f5b14a9

Please sign in to comment.