Index: src/forum.c ================================================================== --- src/forum.c +++ src/forum.c @@ -944,11 +944,12 @@ " sum(fprev IS NULL) AS c," /* 2 */ " (SELECT substr(uuid,1,10) FROM blob WHERE rid=froot)," /* 3 */ " (SELECT substr(comment,instr(comment,':')+2)" /* 4 */ " FROM event WHERE objid=(SELECT fpid FROM forumpost AS y" " WHERE y.froot=x.froot" - " ORDER BY fmtime DESC LIMIT 1))" + " ORDER BY fmtime DESC LIMIT 1))," + " fpid" /* 5 */ " FROM forumpost AS x" " GROUP BY froot ORDER BY 1 LIMIT %d OFFSET %d;", iLimit+1, iOfst ); while( db_step(&q)==SQLITE_ROW ){ @@ -955,10 +956,16 @@ char *zAge = human_readable_age(db_column_double(&q,0)); char *zDuration = 0; int nMsg = db_column_int(&q, 2); const char *zUuid = db_column_text(&q, 3); const char *zTitle = db_column_text(&q, 4); + int fpid = db_column_int(&q, 5); + int needMod = content_is_private(fpid); + Manifest *pPost = manifest_get(fpid, CFTYPE_FORUM, 0); + int sameUser = login_is_individual() && pPost + && fossil_strcmp(pPost->zUser, g.zLogin)==0; + if( needMod && !g.perm.ModForum && !sameUser ) continue; if( iCnt==0 ){ if( iOfst>0 ){ @

Threads at least %s(zAge) old

}else{ @

Most recent threads