Diffstat (limited to 'noncore/apps/qashmoney/preferences.cpp') (more/less context) (ignore whitespace changes)
-rwxr-xr-x | noncore/apps/qashmoney/preferences.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/apps/qashmoney/preferences.cpp b/noncore/apps/qashmoney/preferences.cpp index 8783a47..819d5cf 100755 --- a/noncore/apps/qashmoney/preferences.cpp +++ b/noncore/apps/qashmoney/preferences.cpp | |||
@@ -21,9 +21,9 @@ void Preferences::addPreferences () | |||
21 | int columns = 0; | 21 | int columns = 0; |
22 | char **results; | 22 | char **results; |
23 | 23 | ||
24 | sqlite_get_table ( db, "select count() from preferences;", &results, 0, 0, 0 ); | 24 | sqlite_get_table ( db, "select count() from preferences;", &results, 0, 0, 0 ); |
25 | if ( atoi ( results [ 1 ] ) != 6 ) | 25 | if ( atoi ( results [ 1 ] ) != 7 ) |
26 | { | 26 | { |
27 | // dateformat preference 1 = yyyymmdd 2 = yymmdd 3 = mmddyyyy 4 = mmddyy | 27 | // dateformat preference 1 = yyyymmdd 2 = yymmdd 3 = mmddyyyy 4 = mmddyy |
28 | // 5 = yyyyddmm 6 = yyddmm 7 = ddmmyyyy 8 = ddmmyy | 28 | // 5 = yyyyddmm 6 = yyddmm 7 = ddmmyyyy 8 = ddmmyy |
29 | sqlite_get_table ( db, "select preference from preferences where id = 1;", &results, &rows, &columns, 0 ); | 29 | sqlite_get_table ( db, "select preference from preferences where id = 1;", &results, &rows, &columns, 0 ); |
@@ -58,8 +58,14 @@ void Preferences::addPreferences () | |||
58 | rows = 0; | 58 | rows = 0; |
59 | sqlite_get_table ( db, "select preference from preferences where id = 6;", &results, &rows, &columns, 0 ); | 59 | sqlite_get_table ( db, "select preference from preferences where id = 6;", &results, &rows, &columns, 0 ); |
60 | if ( rows == 0 ) | 60 | if ( rows == 0 ) |
61 | sqlite_exec ( db, "insert into preferences values ( 0, 'excludetransfersfromlimit', 0, 0, 0, NULL );", 0, 0, 0 ); | 61 | sqlite_exec ( db, "insert into preferences values ( 0, 'excludetransfersfromlimit', 0, 0, 0, NULL );", 0, 0, 0 ); |
62 | |||
63 | // limit number of transactions to 0 = 14 days 1 = 30 days, 2 = 60 days, 3 = 90 days, 4 = 180 days, 5 = 365 days, 6 = all | ||
64 | rows = 0; | ||
65 | sqlite_get_table ( db, "select preference from preferences where id = 7;", &results, &rows, &columns, 0 ); | ||
66 | if ( rows == 0 ) | ||
67 | sqlite_exec ( db, "insert into preferences values ( 0, 'limittransactions', 0, 0, 0, NULL );", 0, 0, 0 ); | ||
62 | } | 68 | } |
63 | } | 69 | } |
64 | 70 | ||
65 | void Preferences::initializeColumnPreferences () | 71 | void Preferences::initializeColumnPreferences () |