From b6e6390dde8995b2a0811501b0c63bb2b838ea8f Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Tue, 14 May 2019 17:22:52 -0600 Subject: [PATCH] Add debug to User; Remove phonology from new dictionary --- src/php/api/Dictionary.php | 16 ++-------------- src/php/api/User.php | 4 ++++ 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/php/api/Dictionary.php b/src/php/api/Dictionary.php index c3ea484..4c6253b 100644 --- a/src/php/api/Dictionary.php +++ b/src/php/api/Dictionary.php @@ -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) { diff --git a/src/php/api/User.php b/src/php/api/User.php index 21e4f64..acf5973 100644 --- a/src/php/api/User.php +++ b/src/php/api/User.php @@ -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, + ], ); } }