Skip to content

Commit 0d7c4dd

Browse files
committed
fix: various fixes on duplicate / import
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent ba70895 commit 0d7c4dd

File tree

6 files changed

+4
-7
lines changed

6 files changed

+4
-7
lines changed

inc/item_targetticket.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ protected function convertUuids(&$parameter) {
182182
public function deleteObsoleteItems(CommonDBTM $container, array $exclude)
183183
{
184184
$keepCriteria = [
185-
self::$itemtype_2 => $container->getType(),
186185
self::$items_id_2 => $container->getID(),
187186
];
188187
if (count($exclude) > 0) {

inc/question.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,15 @@ public function pre_deleteItem() {
587587
public function post_addItem() {
588588
if (!isset($this->input['_skip_checks']) || !$this->input['_skip_checks']) {
589589
$this->updateConditions($this->input);
590+
$this->updateParameters($this->input);
590591
}
591-
$this->updateParameters($this->input);
592592
}
593593

594594
public function post_updateItem($history = 1) {
595595
if (!isset($this->input['_skip_checks']) || !$this->input['_skip_checks']) {
596596
$this->updateConditions($this->input);
597+
$this->updateParameters($this->input);
597598
}
598-
$this->updateParameters($this->input);
599599
}
600600

601601
/**

inc/questionparameter.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public function prepareInputforAdd($input) {
8484
public function deleteObsoleteItems(CommonDBTM $container, array $exclude)
8585
{
8686
$keepCriteria = [
87-
self::$items_id => $container->getID(),
87+
static::$items_id => $container->getID(),
8888
];
8989
if (count($exclude) > 0) {
9090
$keepCriteria[] = ['NOT' => ['id' => $exclude]];

inc/target_actor.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ public function export($remove_uuid = false) {
235235
public function deleteObsoleteItems(CommonDBTM $container, array $exclude)
236236
{
237237
$keepCriteria = [
238-
self::$items_id => $container->getID(),
238+
static::$items_id => $container->getID(),
239239
];
240240
if (count($exclude) > 0) {
241241
$keepCriteria[] = ['NOT' => ['id' => $exclude]];

inc/targetchange.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,6 @@ public function getTargetChangesForForm($formId) {
651651
'WHERE' => [
652652
'plugin_formcreator_forms_id' => $formId
653653
],
654-
'ORDER' => 'order ASC'
655654
]);
656655
foreach ($rows as $row) {
657656
$target = new self();

inc/targetticket.class.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,6 @@ public function getTargetTicketsForForm($formId) {
12251225
'WHERE' => [
12261226
'plugin_formcreator_forms_id' => $formId
12271227
],
1228-
'ORDER' => 'order ASC'
12291228
]);
12301229
foreach ($rows as $row) {
12311230
$target = new self();

0 commit comments

Comments
 (0)