Skip to content

Commit e32ab28

Browse files
committed
refactor(filefield): less computation
1 parent 902efa7 commit e32ab28

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

inc/field/filefield.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function moveUploads() {
132132
foreach ($this->uploads["_$key"] as $index => $document) {
133133
$document = Toolbox::stripslashes_deep($document);
134134
if (is_file(GLPI_TMP_DIR . '/' . $document)) {
135-
$prefix = $this->uploads['_prefix_formcreator_field_' . $this->question->getID()][$index];
135+
$prefix = $this->uploads['_prefix_' . $key][$index];
136136
$answer_value[] = $this->saveDocument($document, $prefix);
137137
}
138138
$index++;
@@ -188,7 +188,7 @@ public function saveUploads($input) {
188188
foreach ($input["_$key"] as $document) {
189189
$document = Toolbox::stripslashes_deep($document);
190190
if (is_file(GLPI_TMP_DIR . '/' . $document)) {
191-
$prefix = $input['_prefix_formcreator_field_' . $this->question->getID()][$index];
191+
$prefix = $input['_prefix_' . $key][$index];
192192
$answer_value[] = $this->saveDocument($document, $prefix);
193193
}
194194
$index++;

0 commit comments

Comments
 (0)