Add debug to User; Remove phonology from new dictionary

This commit is contained in:
Robbie Antenesse 2019-05-14 17:22:52 -06:00
parent f8ae41bca6
commit b6e6390dde
2 changed files with 6 additions and 14 deletions

View File

@ -12,17 +12,6 @@ class Dictionary {
$this->defaults = array(
'partsOfSpeech' => array("Noun","Adjective","Verb"),
'phonology'=> array(
'consonants' => array(),
'vowels' => array(),
'blends' => array(),
'phonotactics' => array(
'onset' => array(),
'nucleus' => array(),
'coda' => array(),
'exceptions' => '',
),
),
);
}
@ -44,11 +33,10 @@ class Dictionary {
$insert_dictionary = $this->db->execute($insert_dictionary_query, array($new_id, $user, time()));
if ($insert_dictionary === true) {
$insert_linguistics_query = "INSERT INTO dictionary_linguistics (dictionary, parts_of_speech, phonology)
VALUES ($new_id, ?, ?)";
$insert_linguistics_query = "INSERT INTO dictionary_linguistics (dictionary, parts_of_speech)
VALUES ($new_id, ?)";
$insert_linguistics = $this->db->execute($insert_linguistics_query, array(
json_encode($this->defaults['partsOfSpeech']),
json_encode($this->defaults['phonology']),
));
if ($insert_linguistics === true) {

View File

@ -64,6 +64,10 @@ VALUES (?, ?, ?, ?, ?)';
return array(
'user' => $this->getUserData($new_user_id),
'dictionary' => $this->token->hash($new_dictionary),
'debug' => [
'newUserId' => $new_user_id,
'newDictionary' => $new_dictionary,
],
);
}
}