Skip to content

Commit

Permalink
refactor: fix deprecated methods call
Browse files Browse the repository at this point in the history
Signed-off-by: btry <tbugier@teclib.com>
  • Loading branch information
btry committed Aug 7, 2018
1 parent 1d00bc0 commit d94fcbc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions inc/question.class.php
Expand Up @@ -661,7 +661,8 @@ public function showForm($ID, $options = []) {
echo '</td>';

echo '<td>';
$table = getTableForItemtype('PluginFormcreatorSection');
$dbUtil = new DbUtils();
$table = $dbUtil->getTableForItemtype('PluginFormcreatorSection');
$sections = [];
$sql = "SELECT `id`, `name`
FROM $table
Expand Down Expand Up @@ -1358,8 +1359,9 @@ public function getQuestionsFromForm($formId) {
global $DB;

$questions = [];
$table_question = getTableForItemtype('PluginFormcreatorQuestion');
$table_section = getTableForItemtype('PluginFormcreatorSection');
$dbUtil = new DbUtils();
$table_question = $dbUtil->getTableForItemtype('PluginFormcreatorQuestion');
$table_section = $dbUtil->getTableForItemtype('PluginFormcreatorSection');
$result = $DB->query("SELECT `q`.*
FROM $table_question `q`
LEFT JOIN $table_section `s` ON `q`.`plugin_formcreator_sections_id` = `s`.`id`
Expand Down

0 comments on commit d94fcbc

Please sign in to comment.