Fossil SCM
Make the 'awaiting approval' label on forum posts more prominent for those who can see their content despite them being pending.
Commit
41823b0aeccb85f6c5ce06e34a7a6a91a92ada9398155e70db9e5af7400030fb
Parent
bcdd98b8914c195…
1 file changed
+9
-6
+9
-6
| --- src/forum.c | ||
| +++ src/forum.c | ||
| @@ -1113,10 +1113,13 @@ | ||
| 1113 | 1113 | @ style='margin-left:%d(iIndent*iIndentScale)ex;'> |
| 1114 | 1114 | }else{ |
| 1115 | 1115 | @ > |
| 1116 | 1116 | } |
| 1117 | 1117 | |
| 1118 | + bPrivate = content_is_private(p->fpid); | |
| 1119 | + bSameUser = login_is_individual() | |
| 1120 | + && fossil_strcmp(pManifest->zUser, g.zLogin)==0; | |
| 1118 | 1121 | /* If this is the first post (or an edit thereof), emit the thread title. */ |
| 1119 | 1122 | if( pManifest->zThreadTitle ){ |
| 1120 | 1123 | @ <h1>%h(pManifest->zThreadTitle)</h1> |
| 1121 | 1124 | } |
| 1122 | 1125 | |
| @@ -1196,18 +1199,18 @@ | ||
| 1196 | 1199 | /* Provide a link to the raw source code. */ |
| 1197 | 1200 | if( !bUnf ){ |
| 1198 | 1201 | @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a> |
| 1199 | 1202 | } |
| 1200 | 1203 | @ </h3> |
| 1204 | + | |
| 1205 | + if( bPrivate && (bSameUser || g.perm.Admin || g.perm.ModForum) ){ | |
| 1206 | + moderation_pending_www(p->fpid); | |
| 1207 | + } | |
| 1201 | 1208 | }/*!bRaw*/ |
| 1202 | 1209 | |
| 1203 | - /* Check if this post is approved, also if it's by the current user. */ | |
| 1204 | - bPrivate = content_is_private(p->fpid); | |
| 1205 | - bSameUser = login_is_individual() | |
| 1206 | - && fossil_strcmp(pManifest->zUser, g.zLogin)==0; | |
| 1207 | - | |
| 1208 | - /* Render the post if the user is able to see it. */ | |
| 1210 | + /* Check if this post is approved, also if it's by the current user. | |
| 1211 | + Render the post if the user is able to see it. */ | |
| 1209 | 1212 | if( bPrivate && !g.perm.ModForum && !bSameUser ){ |
| 1210 | 1213 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 1211 | 1214 | }else{ |
| 1212 | 1215 | if( bRaw || bUnf || p->pEditTail ){ |
| 1213 | 1216 | zMimetype = "text/plain"; |
| 1214 | 1217 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -1113,10 +1113,13 @@ | |
| 1113 | @ style='margin-left:%d(iIndent*iIndentScale)ex;'> |
| 1114 | }else{ |
| 1115 | @ > |
| 1116 | } |
| 1117 | |
| 1118 | /* If this is the first post (or an edit thereof), emit the thread title. */ |
| 1119 | if( pManifest->zThreadTitle ){ |
| 1120 | @ <h1>%h(pManifest->zThreadTitle)</h1> |
| 1121 | } |
| 1122 | |
| @@ -1196,18 +1199,18 @@ | |
| 1196 | /* Provide a link to the raw source code. */ |
| 1197 | if( !bUnf ){ |
| 1198 | @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a> |
| 1199 | } |
| 1200 | @ </h3> |
| 1201 | }/*!bRaw*/ |
| 1202 | |
| 1203 | /* Check if this post is approved, also if it's by the current user. */ |
| 1204 | bPrivate = content_is_private(p->fpid); |
| 1205 | bSameUser = login_is_individual() |
| 1206 | && fossil_strcmp(pManifest->zUser, g.zLogin)==0; |
| 1207 | |
| 1208 | /* Render the post if the user is able to see it. */ |
| 1209 | if( bPrivate && !g.perm.ModForum && !bSameUser ){ |
| 1210 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 1211 | }else{ |
| 1212 | if( bRaw || bUnf || p->pEditTail ){ |
| 1213 | zMimetype = "text/plain"; |
| 1214 |
| --- src/forum.c | |
| +++ src/forum.c | |
| @@ -1113,10 +1113,13 @@ | |
| 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 | |
| @@ -1196,18 +1199,18 @@ | |
| 1199 | /* Provide a link to the raw source code. */ |
| 1200 | if( !bUnf ){ |
| 1201 | @ %z(href("%R/forumpost/%!S?raw",p->zUuid))[source]</a> |
| 1202 | } |
| 1203 | @ </h3> |
| 1204 | |
| 1205 | if( bPrivate && (bSameUser || g.perm.Admin || g.perm.ModForum) ){ |
| 1206 | moderation_pending_www(p->fpid); |
| 1207 | } |
| 1208 | }/*!bRaw*/ |
| 1209 | |
| 1210 | /* Check if this post is approved, also if it's by the current user. |
| 1211 | Render the post if the user is able to see it. */ |
| 1212 | if( bPrivate && !g.perm.ModForum && !bSameUser ){ |
| 1213 | @ <p><span class="modpending">Awaiting Moderator Approval</span></p> |
| 1214 | }else{ |
| 1215 | if( bRaw || bUnf || p->pEditTail ){ |
| 1216 | zMimetype = "text/plain"; |
| 1217 |