aboutsummaryrefslogtreecommitdiff
path: root/cforum.c
diff options
context:
space:
mode:
authorJohn Ankarström <john@ankarstrom.se>2021-09-17 17:02:29 +0200
committerJohn Ankarström <john@ankarstrom.se>2021-09-17 17:03:57 +0200
commit2810ad72aeb973a898034d6875922284062c5ce0 (patch)
tree2c7555b79054d57350cc4136e3215094c9b4b685 /cforum.c
parent38f8e2242353711d5c87c58f3831306934d2e6b7 (diff)
downloadcforum-2810ad72aeb973a898034d6875922284062c5ce0.tar.gz
Rework query functions
Now, the value/parameter retrieval function handles both GET and POST parameters.
Diffstat (limited to 'cforum.c')
-rw-r--r--cforum.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/cforum.c b/cforum.c
index 7fc738e..319e9e1 100644
--- a/cforum.c
+++ b/cforum.c
@@ -6,7 +6,7 @@
#include "ctl.h" /* Controllers. */
#include "err.h" /* HTTP errors. */
#include "site.h" /* Site settings. Defines global struct site. */
-#include "query.h" /* Query functions. Defines global string qs. */
+#include "query.h" /* Query functions. Defines global struct query. */
#define MAXERR 300
@@ -57,13 +57,13 @@ main(int argc, char *argv[])
sqlite3_finalize(res);
/*
- * The global variable qs is set to the query string, or the
- * program dies. From now on, qs is assumed to be set.
+ * The global struct query is set, or the program dies.
+ * From now on, query is assumed to be set.
*/
- setqs();
+ setquery();
/* Handle request. */
- if(!qs || !*qs)
+ if(!*query.string)
front();
/* INSERT CONDITIONS HERE */
else