aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc-make/rules.c
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-20 23:07:26 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-03-20 23:07:26 +0100
commit954d0f9dc63ada44926972a40f2a190ab4561b98 (patch)
tree2a28be8556289d6934f9b4e0a29edad01de27cce /src/blogc-make/rules.c
parent14b3aea798c0999f56a5555d90db3c332966d085 (diff)
downloadblogc-954d0f9dc63ada44926972a40f2a190ab4561b98.tar.gz
blogc-954d0f9dc63ada44926972a40f2a190ab4561b98.tar.bz2
blogc-954d0f9dc63ada44926972a40f2a190ab4561b98.zip
make: fixed pagination, added tests
Diffstat (limited to 'src/blogc-make/rules.c')
-rw-r--r--src/blogc-make/rules.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blogc-make/rules.c b/src/blogc-make/rules.c
index e22fbea..8464bd2 100644
--- a/src/blogc-make/rules.c
+++ b/src/blogc-make/rules.c
@@ -42,12 +42,12 @@ posts_pagination(bm_ctx_t *ctx, bc_trie_t *variables, const char *variable)
return; // something is wrong, let's not add any variable
long posts_per_page = strtol(
- bc_trie_lookup(ctx->settings->settings, "posts_per_page"),
+ bc_trie_lookup(ctx->settings->settings, variable),
NULL, 10); // FIXME: improve
if (posts_per_page >= 0) {
bc_trie_insert(variables, "FILTER_PAGE", bc_strdup("1"));
bc_trie_insert(variables, "FILTER_PER_PAGE",
- bc_strdup(bc_trie_lookup(ctx->settings->settings, "posts_per_page")));
+ bc_strdup(bc_trie_lookup(ctx->settings->settings, variable)));
}
}