commit 91e92f975e2dc6d5f999389a7bd382b953863476
parent 542b470ba728aa2f62928fb45370f4b1130d7cb5
Author: uriel@vm41.cat-v.org <unknown>
Date: Fri, 12 Jun 2009 23:44:21 +0200
New configuration variable for blagh: conf_max_posts_per_page sets the maximum numbers to display in a blog feed, default is 32. Note that this also affects rss feeds.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc
@@ -6,6 +6,7 @@ fn conf_enable_blog {
conf_enable_app blagh
}
conf_blog_editors=blog-editors
+conf_max_posts_per_page=32
fn blagh_init {
if(~ $#blagh_dirs 0 && ~ $req_path */[bB]log/*) {
@@ -76,7 +77,7 @@ fn blagh_body {
fn get_post_list {
# /./->/|/ done to sort -t| and order by date
# Note: $paths in blagh_dirs should not contain '/./' or '|'
- ls -F $*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ >[2]/dev/null | sed -n '/'^$forbidden_uri_chars^'/d; s,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed 's,/+\|/+,/,'
+ ls -F $*^/./[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/ >[2]/dev/null | sed -n '/'^$forbidden_uri_chars^'/d; s,/\./,/|/,; /\/$/p' | sort -r '-t|' +1 | sed -e 's,/+\|/+,/,' -e $conf_max_posts_per_page^'q'
}
fn mkbpost {