Skip to content

Commit 7f64792

Browse files
committed
fix(targetchange): copy pasted import code
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 769fe95 commit 7f64792

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

inc/targetchange.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ public function export($remove_uuid = false) {
152152
* @see PluginFormcreatorTarget::import
153153
*
154154
* @param integer $targetitems_id current id
155-
* @param array $target_data the targetticket data (match the targetticket table)
156-
* @return integer the targetticket's id
155+
* @param array $target_data the targetchange data (match the targetticket table)
156+
* @return integer the targetchange's id
157157
*/
158158
public static function import($targetitems_id = 0, $target_data = []) {
159159
global $DB;
@@ -164,10 +164,10 @@ public static function import($targetitems_id = 0, $target_data = []) {
164164
$target_data['id'] = $targetitems_id;
165165

166166
// convert question uuid into id
167-
$targetTicket = new PluginFormcreatorTargetTicket();
168-
$targetTicket->getFromDB($targetitems_id);
167+
$targetChange = new PluginFormcreatorTargetChange();
168+
$targetChange->getFromDB($targetitems_id);
169169
$section = new PluginFormcreatorSection();
170-
$foundSections = $section->getSectionsFromForm($targetTicket->getForm()->getID());
170+
$foundSections = $section->getSectionsFromForm($targetChange->getForm()->getID());
171171
$tab_section = [];
172172
foreach ($foundSections as $section) {
173173
$tab_section[] = $section->getID();
@@ -210,7 +210,7 @@ public static function import($targetitems_id = 0, $target_data = []) {
210210
if ($targetitems_id
211211
&& isset($target_data['_actors'])) {
212212
foreach ($target_data['_actors'] as $actor) {
213-
PluginFormcreatorTargetTicket_Actor::import($targetitems_id, $actor);
213+
PluginFormcreatorTargetChange_Actor::import($targetitems_id, $actor);
214214
}
215215
}
216216

0 commit comments

Comments
 (0)