From 5c5309a9a5c6432bc0299adb44345c9c148dec2c Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Fri, 31 May 2019 13:04:49 -0600 Subject: [PATCH] Replace leftover isComplete with theme --- src/constants.js | 2 +- src/php/api/Dictionary.php | 8 ++++---- src/structure.sql | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/constants.js b/src/constants.js index ff303f7..da1d815 100644 --- a/src/constants.js +++ b/src/constants.js @@ -46,7 +46,7 @@ export const DEFAULT_DICTIONARY = { allowDuplicates: false, caseSensitive: false, sortByDefinition: false, - isComplete: false, + theme: 'default', isPublic: false, }, lastUpdated: getTimestampInSeconds(), diff --git a/src/php/api/Dictionary.php b/src/php/api/Dictionary.php index 485d32d..9e8e6c4 100644 --- a/src/php/api/Dictionary.php +++ b/src/php/api/Dictionary.php @@ -127,7 +127,7 @@ VALUES ($new_id, ?, ?, ?, ?)"; 'allowDuplicates' => $result['allow_duplicates'] === '1' ? true : false, 'caseSensitive' => $result['case_sensitive'] === '1' ? true : false, 'sortByDefinition' => $result['sort_by_definition'] === '1' ? true : false, - 'isComplete' => false, + 'theme' => $result['theme'], 'isPublic' => $result['is_public'] === '1' ? true : false, ), 'lastUpdated' => is_null($result['last_updated']) ? $result['created_on'] : $result['last_updated'], @@ -278,7 +278,7 @@ VALUES ($new_id, ?, ?, ?, ?)"; 'allowDuplicates' => $result['allow_duplicates'] === '1' ? true : false, 'caseSensitive' => $result['case_sensitive'] === '1' ? true : false, 'sortByDefinition' => $result['sort_by_definition'] === '1' ? true : false, - 'isComplete' => false, + 'theme' => $result['theme'], 'isPublic' => $result['is_public'] === '1' ? true : false, ), 'lastUpdated' => is_null($result['last_updated']) ? $result['created_on'] : $result['last_updated'], @@ -296,7 +296,7 @@ SET name=:name, allow_duplicates=:allow_duplicates, case_sensitive=:case_sensitive, sort_by_definition=:sort_by_definition, - is_complete=:is_complete, + theme=:theme, is_public=:is_public, last_updated=:last_updated, created_on=:created_on @@ -310,7 +310,7 @@ WHERE user=$user AND id=$dictionary"; ':allow_duplicates' => $dictionary_object['settings']['allowDuplicates'] ? 1 : 0, ':case_sensitive' => $dictionary_object['settings']['caseSensitive'] ? 1 : 0, ':sort_by_definition' => $dictionary_object['settings']['sortByDefinition'] ? 1 : 0, - ':is_complete' => 0, + ':theme' => $dictionary_object['settings']['theme'], ':is_public' => $dictionary_object['settings']['isPublic'] ? 1 : 0, ':last_updated' => $dictionary_object['lastUpdated'], ':created_on' => $dictionary_object['createdOn'], diff --git a/src/structure.sql b/src/structure.sql index 74b2608..bf722a3 100644 --- a/src/structure.sql +++ b/src/structure.sql @@ -16,7 +16,7 @@ CREATE TABLE IF NOT EXISTS `dictionaries` ( `allow_duplicates` tinyint(1) NOT NULL DEFAULT 0, `case_sensitive` tinyint(1) NOT NULL DEFAULT 0, `sort_by_definition` tinyint(1) NOT NULL DEFAULT 0, - `is_complete` tinyint(1) NOT NULL DEFAULT 0, + `theme` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'default', `is_public` tinyint(1) NOT NULL DEFAULT 0, `last_updated` int(11) DEFAULT NULL, `created_on` int(11) NOT NULL,