Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1d8a8d2

Browse filesBrowse files
committed
Merge branch 'release/2.13.6' into support/2.13.0
2 parents 2479132 + 70090ca commit 1d8a8d2
Copy full SHA for 1d8a8d2

72 files changed

+17,511-13,995Lines changed: 17511 additions & 13995 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Dismiss banner
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎CHANGELOG.md‎

Copy file name to clipboardExpand all lines: CHANGELOG.md
+55Lines changed: 55 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,58 @@
1+
<a name="2.13.6"></a>
2+
## [2.13.6](https://github.com/pluginsGLPI/formcreator/compare/2.13.5..2.13.6) (2023-05-26)
3+
4+
5+
### Bug Fixes
6+
7+
* SQL error when inconsistency in DB ([1af78720](https://github.com/pluginsGLPI/formcreator/commit/1af78720)), closes [#3242](https://github.com/pluginsGLPI/formcreator/issues/3242)
8+
* confirrmation strings ([8ced5744](https://github.com/pluginsGLPI/formcreator/commit/8ced5744))
9+
* translate field label in error messages ([a4bf10a6](https://github.com/pluginsGLPI/formcreator/commit/a4bf10a6))
10+
* **DropdownField:** fix array key value format ([7729fe20](https://github.com/pluginsGLPI/formcreator/commit/7729fe20))
11+
* **FormAnswer:** redirect to FormAnswer or to list if needed ([44e4ab6d](https://github.com/pluginsGLPI/formcreator/commit/44e4ab6d))
12+
* **category:** SQL statement cause MariaDB crash ([fb94035a](https://github.com/pluginsGLPI/formcreator/commit/fb94035a))
13+
* **checkboxesfield,multiselectfield:** php warning ([342c39e9](https://github.com/pluginsGLPI/formcreator/commit/342c39e9))
14+
* **condition:** conditions don't work when not sanitized ([f2b0fad5](https://github.com/pluginsGLPI/formcreator/commit/f2b0fad5))
15+
* **faq:** visibility (#3118) ([252ef204](https://github.com/pluginsGLPI/formcreator/commit/252ef204))
16+
* **filefield:** rebuild uploads for answer edition ([4f1cdf6e](https://github.com/pluginsGLPI/formcreator/commit/4f1cdf6e))
17+
* **form:** double post broken ([07b8a1a1](https://github.com/pluginsGLPI/formcreator/commit/07b8a1a1))
18+
* **form_language:** inverted arguments ([261e5361](https://github.com/pluginsGLPI/formcreator/commit/261e5361))
19+
* **form_language:** restrict languages to those known by GLPI ([f8dc0803](https://github.com/pluginsGLPI/formcreator/commit/f8dc0803))
20+
* **formanswer:** catch and report exception to end user ([9dd9777f](https://github.com/pluginsGLPI/formcreator/commit/9dd9777f))
21+
* **formanswer:** too many escaping ([e518b7de](https://github.com/pluginsGLPI/formcreator/commit/e518b7de)), closes [#3271](https://github.com/pluginsGLPI/formcreator/issues/3271)
22+
* **formanswer:** translate question label ([61722daf](https://github.com/pluginsGLPI/formcreator/commit/61722daf))
23+
* **glpiselectfield:** max_tree_depth_not_saved ([462ea695](https://github.com/pluginsGLPI/formcreator/commit/462ea695))
24+
* **install:** prevent fatal error in migration ([306c2c3f](https://github.com/pluginsGLPI/formcreator/commit/306c2c3f))
25+
* **item_targetticket:** export of question based composition ([dc8c931a](https://github.com/pluginsGLPI/formcreator/commit/dc8c931a))
26+
* **radiosfield, selectfield:** allow unset default value ([020bd45b](https://github.com/pluginsGLPI/formcreator/commit/020bd45b))
27+
* **radiosfield, selectfield:** check default value before save ([d4a2ecb4](https://github.com/pluginsGLPI/formcreator/commit/d4a2ecb4))
28+
* **section:** condition rule loss after duplicate / import ([7bfe6ca0](https://github.com/pluginsGLPI/formcreator/commit/7bfe6ca0))
29+
* **selectfield:** show contact field ([11c86b7c](https://github.com/pluginsGLPI/formcreator/commit/11c86b7c))
30+
* **selectfield,radiosfield:** abusive escaping ([db01a561](https://github.com/pluginsGLPI/formcreator/commit/db01a561))
31+
* **targetchange,targetproblem:** several fields must use rich text ([cf24aa19](https://github.com/pluginsGLPI/formcreator/commit/cf24aa19))
32+
* **targetticket:** request source ([c72901c7](https://github.com/pluginsGLPI/formcreator/commit/c72901c7))
33+
* **targetticket:** request source may be unexpected value ([2fd6cf54](https://github.com/pluginsGLPI/formcreator/commit/2fd6cf54))
34+
* **targetticket,targetchange,targetproblem:** missing translation of target content ([902efa78](https://github.com/pluginsGLPI/formcreator/commit/902efa78))
35+
* **textfield:** Unescaped HTML when displaying a form answer ([d4763859](https://github.com/pluginsGLPI/formcreator/commit/d4763859))
36+
* **translation:** delete rich editor's ghost toolbar ([ba97c842](https://github.com/pluginsGLPI/formcreator/commit/ba97c842))
37+
* **translation:** dialog width ([0b46dec3](https://github.com/pluginsGLPI/formcreator/commit/0b46dec3))
38+
* **translation:** typo in localizable tring ([3bb2f3d4](https://github.com/pluginsGLPI/formcreator/commit/3bb2f3d4))
39+
40+
41+
### Features
42+
43+
* reminders ([6ed85cd3](https://github.com/pluginsGLPI/formcreator/commit/6ed85cd3))
44+
* **abstractitiltarget:** duplicate ([3c093012](https://github.com/pluginsGLPI/formcreator/commit/3c093012))
45+
* **category:** show category comment in service catalog ([09727147](https://github.com/pluginsGLPI/formcreator/commit/09727147)), closes [#394](https://github.com/pluginsGLPI/formcreator/issues/394)
46+
* **clean_tickets_command:** Take merged tickets into account ([768cd467](https://github.com/pluginsGLPI/formcreator/commit/768cd467))
47+
* **form:** edit recursion with massive actions ([7c918d3b](https://github.com/pluginsGLPI/formcreator/commit/7c918d3b))
48+
* **formaccesstype:** massive action ([53a4285a](https://github.com/pluginsGLPI/formcreator/commit/53a4285a))
49+
* **glpiselectfield:** PDU in assets section ([bc6a790d](https://github.com/pluginsGLPI/formcreator/commit/bc6a790d))
50+
* **glpiselectfield:** refactor entity_restriction ([b3fb0804](https://github.com/pluginsGLPI/formcreator/commit/b3fb0804))
51+
* **install:** stronger upgrade for unsigned columns ([030f93e3](https://github.com/pluginsGLPI/formcreator/commit/030f93e3))
52+
* **notificationtargetformanswer:** label tags ([f1dc000c](https://github.com/pluginsGLPI/formcreator/commit/f1dc000c)), closes [#1023](https://github.com/pluginsGLPI/formcreator/issues/1023)
53+
* **section:** update condition count after section edition ([8c04048f](https://github.com/pluginsGLPI/formcreator/commit/8c04048f))
54+
55+
156
<a name="2.13.5"></a>
257
## [2.13.5](https://github.com/pluginsGLPI/formcreator/compare/2.13.4..2.13.5) (2023-03-24)
358

Collapse file

‎inc/field/textfield.class.php‎

Copy file name to clipboardExpand all lines: inc/field/textfield.class.php
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public function showForm(array $options): void {
6363

6464
public function getRenderedHtml($domain, $canEdit = true): string {
6565
if (!$canEdit) {
66-
return $this->value;
66+
return Sanitizer::sanitize($this->value, false);
6767
}
6868

6969
$html = '';
@@ -108,7 +108,11 @@ public function getValueForDesign(): string {
108108
}
109109

110110
public function getValueForTargetText($domain, $richText): ?string {
111-
return Sanitizer::unsanitize($this->value);
111+
if ($richText) {
112+
return Sanitizer::sanitize($this->value, false);
113+
}
114+
115+
return $this->value;
112116
}
113117

114118
public function moveUploads() {
Collapse file

‎inc/formanswer.class.php‎

Copy file name to clipboardExpand all lines: inc/formanswer.class.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1353,7 +1353,6 @@ public function parseTags(string $content, PluginFormcreatorTargetInterface $tar
13531353
}
13541354
}
13551355
}
1356-
// $content = str_replace('##answer_' . $questionId . '##', Sanitizer::sanitize($value ?? ''), $content);
13571356
$content = str_replace('##answer_' . $questionId . '##', $value ?? '', $content);
13581357

13591358
if ($this->questionFields[$questionId] instanceof DropdownField) {
Collapse file

‎inc/question.class.php‎

Copy file name to clipboardExpand all lines: inc/question.class.php
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1220,6 +1220,7 @@ public static function dropdownObjectSubType(string $name, array $options = []):
12201220
Phone::class => Phone::getTypeName($plural),
12211221
Line::class => Line::getTypeName($plural),
12221222
PassiveDCEquipment::class => PassiveDCEquipment::getTypeName($plural),
1223+
PDU::class => PDU::getTypeName($plural),
12231224
],
12241225
__("Assistance") => [
12251226
Ticket::class => Ticket::getTypeName($plural),
Collapse file

‎inc/section.class.php‎

Copy file name to clipboardExpand all lines: inc/section.class.php
+5-3Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,10 @@ public function prepareInputForAdd($input) {
142142
}
143143
}
144144

145-
if (!$this->checkConditionSettings($input)) {
146-
$input['show_rule'] = PluginFormcreatorCondition::SHOW_RULE_ALWAYS;
145+
if (!$this->skipChecks) {
146+
if (!$this->checkConditionSettings($input)) {
147+
$input['show_rule'] = PluginFormcreatorCondition::SHOW_RULE_ALWAYS;
148+
}
147149
}
148150

149151
return $input;
@@ -411,7 +413,7 @@ public function export(bool $remove_uuid = false) : array {
411413
unset($export[$formFk]);
412414

413415
$subItems = [
414-
'_questions' => PluginFormcreatorQuestion::class,
416+
'_questions' => PluginFormcreatorQuestion::class,
415417
'_conditions' => PluginFormcreatorCondition::class,
416418
];
417419
$export = $this->exportChildrenObjects($subItems, $export, $remove_uuid);
Collapse file

‎install/install.php‎

Copy file name to clipboardExpand all lines: install/install.php
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ public function upgrade(Migration $migration, $args = []): bool {
143143
}
144144
}
145145

146+
$this->migration = $migration;
146147
$oldVersion = Config::getConfigurationValue('formcreator', 'previous_version');
147148
// Force fix of signed columns to reduce upgrade errors frequency
148149
// This assumes that all modified columns exist in the database
@@ -185,7 +186,6 @@ public function upgrade(Migration $migration, $args = []): bool {
185186
}
186187
}
187188

188-
$this->migration = $migration;
189189
if (isset($args['force-upgrade']) && $args['force-upgrade'] === true) {
190190
// Might return false
191191
$fromSchemaVersion = array_search(PLUGIN_FORMCREATOR_SCHEMA_VERSION, $this->upgradeSteps);
@@ -1024,5 +1024,7 @@ protected function migrateFkToUnsignedInt() {
10241024
}
10251025
$this->migration->changeField($table, 'id', 'id', 'int ' . DBConnection::getDefaultPrimaryKeySignOption() . ' not null auto_increment');
10261026
}
1027+
1028+
$this->migration->executeMigration();
10271029
}
10281030
}
Collapse file

‎js/scripts.js‎

Copy file name to clipboardExpand all lines: js/scripts.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,7 @@ function plugin_formcreator_addTarget(items_id) {
14461446
}
14471447

14481448
$(document).on('click', '.plugin_formcreator_duplicate_target', function() {
1449-
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to duplicate this target:', 'formcreator'))) {
1449+
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to duplicate this target?', 'formcreator'))) {
14501450
$.post({
14511451
url: formcreatorRootDoc + '/ajax/form_duplicate_target.php',
14521452
data: {
@@ -1463,7 +1463,7 @@ $(document).on('click', '.plugin_formcreator_duplicate_target', function() {
14631463
});
14641464

14651465
$(document).on('click', '.plugin_formcreator_delete_target', function() {
1466-
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this target:', 'formcreator'))) {
1466+
if(confirm(i18n.textdomain('formcreator').__('Are you sure you want to delete this target?', 'formcreator'))) {
14671467
$.post({
14681468
url: formcreatorRootDoc + '/ajax/form_delete_target.php',
14691469
data: {
Collapse file

‎locales/ca_ES.mo‎

Copy file name to clipboard
-523 Bytes
Binary file not shown.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.