Fossil SCM
Move two initializations which could have been skipped when rendering a forum post in raw mode.
Commit
dfc58f12f9bf0b7a0414851106a5f03d38d2fd02e1d2f21f15be23026d68db50
Parent
ae89edbc9340ec7…
1 file changed
+3
-3
+3
-3
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -1098,10 +1098,13 @@ | ||
| 1098 | 1098 | |
| 1099 | 1099 | /* Get the manifest for the post. Abort if not found (e.g. shunned). */ |
| 1100 | 1100 | pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0); |
| 1101 | 1101 | if( !pManifest ) return; |
| 1102 | 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; | |
| 1103 | 1106 | /* When not in raw mode, create the border around the post. */ |
| 1104 | 1107 | if( !bRaw ){ |
| 1105 | 1108 | /* Open the <div> enclosing the post. Set the class string to mark the post |
| 1106 | 1109 | ** as selected and/or obsolete. */ |
| 1107 | 1110 | iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1; |
| @@ -1113,13 +1116,10 @@ | ||
| 1113 | 1116 | @ style='margin-left:%d(iIndent*iIndentScale)ex;'> |
| 1114 | 1117 | }else{ |
| 1115 | 1118 | @ > |
| 1116 | 1119 | } |
| 1117 | 1120 | |
| 1118 | - bPrivate = content_is_private(p->fpid); | |
| 1119 | - bSameUser = login_is_individual() | |
| 1120 | - && fossil_strcmp(pManifest->zUser, g.zLogin)==0; | |
| 1121 | 1121 | /* If this is the first post (or an edit thereof), emit the thread title. */ |
| 1122 | 1122 | if( pManifest->zThreadTitle ){ |
| 1123 | 1123 | @ <h1>%h(pManifest->zThreadTitle)</h1> |
| 1124 | 1124 | } |
| 1125 | 1125 | |
| 1126 | 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 | /* 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 |