]> jfr.im git - erebus.git/commitdiff
fix import.trivia.php - it was missing the question list conversion to a list-of...
authorJohn Runyon <redacted>
Sun, 15 Oct 2023 08:17:40 +0000 (02:17 -0600)
committerJohn Runyon <redacted>
Sun, 15 Oct 2023 08:17:40 +0000 (02:17 -0600)
modules/contrib/trivia/import.trivia.php

index fd6ccf31f9495eeb9e3e0aaafdfae340fd02fdf2..7f4fc891cba910d28406c7345ec9438946079009 100644 (file)
@@ -3,6 +3,6 @@ $db = json_decode(file_get_contents("modules/trivia.json"), TRUE);
 $fh = fopen('qs.txt', 'r');
 foreach (file('qs.txt') as $line) {
        list($q, $a) = explode('*', trim($line), 2);
-       $db['questions'][] = array('question' => $q, 'answer' => trim($a));
+       $db['questions']['general'][] = array($q, trim($a));
 }
 file_put_contents('modules/trivia.json', json_encode($db));