From 65c60e2bca7de95a7f81560b5c44be1284ca0247 Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Mon, 12 Dec 2016 10:21:50 +0100 Subject: [PATCH] Updated with libzakformcgi. --- configure.ac | 3 ++- src/cgi_ini.c | 11 ++++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/configure.ac b/configure.ac index a92f037..e8cbd14 100644 --- a/configure.ac +++ b/configure.ac @@ -37,7 +37,8 @@ PKG_CHECK_MODULES(ZAKFORMTESTS, [libzakform libzakformgtk libzakformgdaex libzakformini - libzakcgi]) + libzakcgi + libzakformcgi]) AC_SUBST(ZAKFORMTESTS_CFLAGS) AC_SUBST(ZAKFORMTESTS_LIBS) diff --git a/src/cgi_ini.c b/src/cgi_ini.c index 0ab6bbe..6668ec4 100644 --- a/src/cgi_ini.c +++ b/src/cgi_ini.c @@ -25,6 +25,7 @@ #include #include +#include #include int @@ -37,7 +38,7 @@ main (int argc, char *argv[]) GValue *val; gchar *filename; - ZakCgiForm *form; + ZakFormCgiForm *form; ZakFormIniProvider *provider; @@ -62,7 +63,7 @@ main (int argc, char *argv[]) val = zak_cgi_main_get_parameter (zakcgimain, "filename"); filename = (gchar *)g_value_get_string (val); - form = zak_cgi_form_new (zakcgimain, + form = zak_form_cgi_form_new (zakcgimain, "method", "post", "action", g_strdup_printf ("cgi_ini?filename=%s", filename), NULL); @@ -72,7 +73,7 @@ main (int argc, char *argv[]) if (zak_cgi_main_is_post (zakcgimain)) { /* validating the form */ - zak_cgi_form_bind (form); + zak_form_cgi_form_bind (form); if (zak_form_form_is_valid (ZAK_FORM_FORM (form))) { g_string_append (str, "
Form is valid!!!
"); @@ -104,13 +105,13 @@ main (int argc, char *argv[]) g_string_append (str, ""); - g_string_append (str, zak_cgi_form_render (form)); + g_string_append (str, zak_form_cgi_form_render (form)); } } else { zak_form_form_clear (ZAK_FORM_FORM (form)); - g_string_append (str, zak_cgi_form_render (form)); + g_string_append (str, zak_form_cgi_form_render (form)); } } -- 2.49.0