Skip to content

Commit 62a2480

Browse files
committed
Merge branch 'support/2.13.0' into support/2.14.0
2 parents 921ad36 + 9af4714 commit 62a2480

12 files changed

Lines changed: 292 additions & 221 deletions

File tree

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: "ubuntu-latest"
4141
strategy:
4242
matrix:
43-
php-versions: [8.1]
43+
php-versions: [8.1, 8.2]
4444
glpi-branch: [10.0/bugfixes]
4545
glpi-package: [10.0.tar.gz]
4646

front/formdisplay.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
unset($_SESSION['glpiname']);
8888
}
8989
} else if (isset($_GET['answer_saved'])) {
90-
$message = __("The form has been successfully saved!");
90+
$message = __("The form has been successfully saved!", "formcreator");
9191
Html::displayTitle($CFG_GLPI['root_doc']."/pics/ok.png", $message, $message);
9292
}
9393

inc/command/cleanticketscommand.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class CleanTicketsCommand extends Command
4343
{
4444
protected function configure() {
4545
$this
46-
->setName('glpi:plugins:formcreator:clean_tickets')
46+
->setName('plugins:formcreator:clean_tickets')
4747
->setDescription("Clean Tickets having visible HTML tags in their content");
4848
}
4949

inc/command/compilescsscommand.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ class CompileScssCommand extends Command
5353
protected function configure() {
5454

5555
$this
56-
->setName('glpi:plugins:formcreator:scss')
56+
->setName('plugins:formcreator:scss')
5757
->setDescription("Compile SCSS");
5858
}
5959

inc/command/syncissuescommand.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ protected function configure() {
4242
$table = PluginFormcreatorIssue::getTable();
4343

4444
$this
45-
->setName('glpi:plugins:formcreator:syncissues')
45+
->setName('plugins:formcreator:syncissues')
4646
->setDescription("Rebuild `$table` table.");
4747
}
4848

inc/field/textareafield.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,6 @@ public function serializeValue(PluginFormcreatorFormAnswer $formanswer): string
211211
);
212212
$input[$key] = $this->value; // Restore the text because we don't want image converted into A + IMG tags
213213
// $this->value = $input[$key];
214-
$this->value = Sanitizer::unsanitize($this->value);
215214
foreach ($input['_tag'] as $docKey => $tag) {
216215
$newTag = $this->uploads['dedup'][$tag];
217216
$regex = '/<img[^>]+' . preg_quote($tag, '/') . '[^<]+>/im';
@@ -225,7 +224,7 @@ public function serializeValue(PluginFormcreatorFormAnswer $formanswer): string
225224

226225
public function deserializeValue($value) {
227226
$this->value = ($value !== null && $value !== '')
228-
? $value
227+
? Sanitizer::unsanitize($value)
229228
: '';
230229
}
231230

inc/form.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public function getTabNameForItem(CommonGLPI $item, $withtemplate = 0) {
509509
$item->countTargets()
510510
),
511511
2 => __('Preview'),
512-
3 => PluginFormcreatorFormAnswer::getTypeName(1) . ' ' .__('properties', 'formcreator'),
512+
3 => __('Form answer properties', 'formcreator'),
513513
];
514514
}
515515
if ($item->getType() == Central::class) {

install/install.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public function upgrade(Migration $migration, $args = []): bool {
187187
}
188188
if (!$checkResult) {
189189
$message = sprintf(
190-
__('The database schema is not consistent with the installed Formcreator %s. To see the logs run the command %s', 'formcreator'),
190+
__('The database schema is not consistent with the previous version of Formcreator %s. To see the logs run the command %s', 'formcreator'),
191191
$oldVersion,
192192
'bin/console glpi:plugin:install formcreator -f'
193193
);
@@ -283,7 +283,7 @@ public function upgrade(Migration $migration, $args = []): bool {
283283
);
284284
if (!$checkResult) {
285285
$message = sprintf(
286-
__('The database schema is not consistent with the installed Formcreator %s. To see the logs enable the plugin and run the command %s', 'formcreator'),
286+
__('The database schema is not consistent with the current version of Formcreator %s. To see the logs enable the plugin and run the command %s', 'formcreator'),
287287
PLUGIN_FORMCREATOR_VERSION,
288288
'bin/console glpi:database:check_schema_integrity -p formcreator'
289289
);

0 commit comments

Comments
 (0)