File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ function plugin_formcreator_update_dev () {
4
+ global $ DB ;
5
+
6
+ // decode html entities in name of questions
7
+ $ request = [
8
+ 'SELECT ' => ['glpi_plugin_formcreator_answers.* ' ],
9
+ 'FROM ' => 'glpi_plugin_formcreator_answers ' ,
10
+ 'INNER JOIN ' => ['glpi_plugin_formcreator_questions ' => [
11
+ 'FKEY ' => [
12
+ 'glpi_plugin_formcreator_answers ' => 'plugin_formcreator_questions_id ' ,
13
+ 'glpi_plugin_formcreator_questions ' => 'id '
14
+ ]
15
+ ]],
16
+ 'WHERE ' => ['fieldtype ' => 'textarea ' ]
17
+ ];
18
+ foreach ($ DB ->request ($ request ) as $ row ) {
19
+ $ answer = Toolbox::addslashes_deep (html_entity_decode ($ row ['answer ' ]));
20
+ $ id = $ row ['id ' ];
21
+ $ DB ->query ("UPDATE `glpi_plugin_formcreator_answers` SET `answer`=' $ answer' WHERE `id` = ' $ id' " );
22
+ }
23
+ }
Original file line number Diff line number Diff line change 1
1
<?php
2
2
global $ CFG_GLPI ;
3
3
// Version of the plugin
4
- define ('PLUGIN_FORMCREATOR_VERSION ' , '2.6.0 ' );
4
+ define ('PLUGIN_FORMCREATOR_VERSION ' , '2.6.0-dev ' );
5
5
// Schema version of this version
6
6
define ('PLUGIN_FORMCREATOR_SCHEMA_VERSION ' , '2.6 ' );
7
7
You can’t perform that action at this time.
0 commit comments