Fossil SCM

Move two initializations which could have been skipped when rendering a forum post in raw mode.

stephan 2026-06-04 09:22 UTC attach-v2
Commit dfc58f12f9bf0b7a0414851106a5f03d38d2fd02e1d2f21f15be23026d68db50
1 file changed +3 -3
+3 -3
--- src/forum.c
+++ src/forum.c
@@ -1098,10 +1098,13 @@
10981098
10991099
/* Get the manifest for the post. Abort if not found (e.g. shunned). */
11001100
pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
11011101
if( !pManifest ) return;
11021102
iClosed = forumpost_is_closed(pThread, p, 1);
1103
+ bPrivate = content_is_private(p->fpid);
1104
+ bSameUser = login_is_individual()
1105
+ && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
11031106
/* When not in raw mode, create the border around the post. */
11041107
if( !bRaw ){
11051108
/* Open the <div> enclosing the post. Set the class string to mark the post
11061109
** as selected and/or obsolete. */
11071110
iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
@@ -1113,13 +1116,10 @@
11131116
@ style='margin-left:%d(iIndent*iIndentScale)ex;'>
11141117
}else{
11151118
@ >
11161119
}
11171120
1118
- bPrivate = content_is_private(p->fpid);
1119
- bSameUser = login_is_individual()
1120
- && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
11211121
/* If this is the first post (or an edit thereof), emit the thread title. */
11221122
if( pManifest->zThreadTitle ){
11231123
@ <h1>%h(pManifest->zThreadTitle)</h1>
11241124
}
11251125
11261126
--- src/forum.c
+++ src/forum.c
@@ -1098,10 +1098,13 @@
1098
1099 /* Get the manifest for the post. Abort if not found (e.g. shunned). */
1100 pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
1101 if( !pManifest ) return;
1102 iClosed = forumpost_is_closed(pThread, p, 1);
 
 
 
1103 /* When not in raw mode, create the border around the post. */
1104 if( !bRaw ){
1105 /* Open the <div> enclosing the post. Set the class string to mark the post
1106 ** as selected and/or obsolete. */
1107 iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
@@ -1113,13 +1116,10 @@
1113 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
1114 }else{
1115 @ >
1116 }
1117
1118 bPrivate = content_is_private(p->fpid);
1119 bSameUser = login_is_individual()
1120 && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
1121 /* If this is the first post (or an edit thereof), emit the thread title. */
1122 if( pManifest->zThreadTitle ){
1123 @ <h1>%h(pManifest->zThreadTitle)</h1>
1124 }
1125
1126
--- src/forum.c
+++ src/forum.c
@@ -1098,10 +1098,13 @@
1098
1099 /* Get the manifest for the post. Abort if not found (e.g. shunned). */
1100 pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
1101 if( !pManifest ) return;
1102 iClosed = forumpost_is_closed(pThread, p, 1);
1103 bPrivate = content_is_private(p->fpid);
1104 bSameUser = login_is_individual()
1105 && fossil_strcmp(pManifest->zUser, g.zLogin)==0;
1106 /* When not in raw mode, create the border around the post. */
1107 if( !bRaw ){
1108 /* Open the <div> enclosing the post. Set the class string to mark the post
1109 ** as selected and/or obsolete. */
1110 iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
@@ -1113,13 +1116,10 @@
1116 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
1117 }else{
1118 @ >
1119 }
1120
 
 
 
1121 /* If this is the first post (or an edit thereof), emit the thread title. */
1122 if( pManifest->zThreadTitle ){
1123 @ <h1>%h(pManifest->zThreadTitle)</h1>
1124 }
1125
1126

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button