Add debug to User; Remove phonology from new dictionary
This commit is contained in:
parent
f8ae41bca6
commit
b6e6390dde
|
@ -12,17 +12,6 @@ class Dictionary {
|
||||||
|
|
||||||
$this->defaults = array(
|
$this->defaults = array(
|
||||||
'partsOfSpeech' => array("Noun","Adjective","Verb"),
|
'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()));
|
$insert_dictionary = $this->db->execute($insert_dictionary_query, array($new_id, $user, time()));
|
||||||
|
|
||||||
if ($insert_dictionary === true) {
|
if ($insert_dictionary === true) {
|
||||||
$insert_linguistics_query = "INSERT INTO dictionary_linguistics (dictionary, parts_of_speech, phonology)
|
$insert_linguistics_query = "INSERT INTO dictionary_linguistics (dictionary, parts_of_speech)
|
||||||
VALUES ($new_id, ?, ?)";
|
VALUES ($new_id, ?)";
|
||||||
$insert_linguistics = $this->db->execute($insert_linguistics_query, array(
|
$insert_linguistics = $this->db->execute($insert_linguistics_query, array(
|
||||||
json_encode($this->defaults['partsOfSpeech']),
|
json_encode($this->defaults['partsOfSpeech']),
|
||||||
json_encode($this->defaults['phonology']),
|
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($insert_linguistics === true) {
|
if ($insert_linguistics === true) {
|
||||||
|
|
|
@ -64,6 +64,10 @@ VALUES (?, ?, ?, ?, ?)';
|
||||||
return array(
|
return array(
|
||||||
'user' => $this->getUserData($new_user_id),
|
'user' => $this->getUserData($new_user_id),
|
||||||
'dictionary' => $this->token->hash($new_dictionary),
|
'dictionary' => $this->token->hash($new_dictionary),
|
||||||
|
'debug' => [
|
||||||
|
'newUserId' => $new_user_id,
|
||||||
|
'newDictionary' => $new_dictionary,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue