diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2013-05-01 01:36:12 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2013-05-01 01:36:12 +0200 |
commit | c6f60740cc4ca2db17b415e77008cbc5c347f9d7 (patch) | |
tree | ad48ba08e5da192c3ebe989211c2ffe0dd67a330 /fetchforumsaction.cpp | |
parent | eaf95f0c22b50c599c5713166fba03c1c13ff644 (diff) | |
download | tapasboard-c6f60740cc4ca2db17b415e77008cbc5c347f9d7.tar.gz tapasboard-c6f60740cc4ca2db17b415e77008cbc5c347f9d7.zip |
standarize root forum id to 0 (violating spec)
Diffstat (limited to 'fetchforumsaction.cpp')
-rw-r--r-- | fetchforumsaction.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fetchforumsaction.cpp b/fetchforumsaction.cpp index 814ae02..1111957 100644 --- a/fetchforumsaction.cpp +++ b/fetchforumsaction.cpp @@ -56,6 +56,15 @@ void FetchForumsAction::handleFinishedCall() continue; } + if (forum_id < 0) { + qWarning() << "Negative forum_id in" << map; + continue; + } + if (parent_id < 0) { + // Assume this is a root forum + parent_id = 0; + } + query.bindValue(":forum_id", forum_id); query.bindValue(":parent_id", parent_id); query.bindValue(":forum_name", decodeForumText(map["forum_name"])); |