Fossil SCM

Coding style tweaks.

stephan 2023-02-21 08:47 forumpost-locking
Commit 9fc70f6f63ff5eaddbc0b5e515d07782aaedba180ac1087e56e30ddc8e5f49ef
--- src/default.css
+++ src/default.css
@@ -900,11 +900,10 @@
900900
margin-top: 1ex;
901901
display: flex;
902902
flex-direction: column;
903903
}
904904
div.forumClosed {
905
- border-style: dotted;
906905
opacity: 0.7;
907906
}
908907
div.forumClosed > *:first-child::before {
909908
content: "[CLOSED] ";
910909
color: red;
911910
--- src/default.css
+++ src/default.css
@@ -900,11 +900,10 @@
900 margin-top: 1ex;
901 display: flex;
902 flex-direction: column;
903 }
904 div.forumClosed {
905 border-style: dotted;
906 opacity: 0.7;
907 }
908 div.forumClosed > *:first-child::before {
909 content: "[CLOSED] ";
910 color: red;
911
--- src/default.css
+++ src/default.css
@@ -900,11 +900,10 @@
900 margin-top: 1ex;
901 display: flex;
902 flex-direction: column;
903 }
904 div.forumClosed {
 
905 opacity: 0.7;
906 }
907 div.forumClosed > *:first-child::before {
908 content: "[CLOSED] ";
909 color: red;
910
+22 -22
--- src/forum.c
+++ src/forum.c
@@ -47,11 +47,11 @@
4747
ForumPost *pNext; /* Next in chronological order */
4848
ForumPost *pPrev; /* Previous in chronological order */
4949
ForumPost *pDisplay; /* Next in display order */
5050
int nEdit; /* Number of edits to this post */
5151
int nIndent; /* Number of levels of indentation for this post */
52
- int fClosed; /* See forum_rid_is_closed() */
52
+ int iClosed; /* See forum_rid_is_closed() */
5353
};
5454
5555
/*
5656
** A single instance of the following tracks all entries for a thread.
5757
*/
@@ -93,11 +93,11 @@
9393
** (recursively) for closure, else only p is checked.
9494
*/
9595
int forum_post_is_closed(ForumPost *p, int bCheckParents){
9696
if( !p ) return 0;
9797
if( p->pEditTail ) p = p->pEditTail;
98
- if( p->fClosed || !bCheckParents ) return p->fClosed;
98
+ if( p->iClosed || !bCheckParents ) return p->iClosed;
9999
else if( p->pIrt ){
100100
return forum_post_is_closed(p->pIrt->pEditTail
101101
? p->pIrt->pEditTail : p->pIrt,
102102
bCheckParents);
103103
}
@@ -144,19 +144,19 @@
144144
}
145145
return rc>0 ? -rc : rc;
146146
}
147147
148148
/*
149
-** If fClosed is true and the current user has admin privileges, this
150
-** renders either a checkbox to unlock forum post fpid (if fClosed>0)
149
+** If iClosed is true and the current user has admin privileges, this
150
+** renders either a checkbox to unlock forum post fpid (if iClosed>0)
151151
** or a SPAN.warning element that the given post inherits the CLOSED
152
-** status from a parent post (if fClosed<0). If neither of the initial
152
+** status from a parent post (if iClosed<0). If neither of the initial
153153
** conditions is true, this is a no-op.
154154
*/
155
-static void forumpost_emit_unlock_checkbox(int fClosed, int fpid){
156
- if( fClosed && g.perm.Admin ){
157
- if( fClosed>0 ){
155
+static void forumpost_emit_unlock_checkbox(int iClosed, int fpid){
156
+ if( iClosed && g.perm.Admin ){
157
+ if( iClosed>0 ){
158158
/* Only show the "unlock" checkbox on a post which is actually
159159
** closed, not on a post which inherits that state. */
160160
@ <label class='warning'><input type="checkbox" name="reopen" value="1">
161161
@ Re-open this CLOSED post? (NOT YET IMPLEMENTED)</label>
162162
}else{
@@ -308,11 +308,11 @@
308308
for(; p; p=p->pEditPrev ){
309309
p->nEdit = pPost->nEdit;
310310
p->pEditTail = pPost;
311311
}
312312
}
313
- pPost->fClosed = forum_rid_is_closed(pPost->fpid, 1);
313
+ pPost->iClosed = forum_rid_is_closed(pPost->fpid, 1);
314314
}
315315
db_finalize(&q);
316316
317317
if( computeHierarchy ){
318318
/* Compute the hierarchical display order */
@@ -398,11 +398,11 @@
398398
/* 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123 */
399399
" sid rev closed fpid pIrt pEditPrev pEditTail hash\n");
400400
for(p=pThread->pFirst; p; p=p->pNext){
401401
fossil_print("%4d %4d %7d %9d %9d %9d %9d %8.8s\n",
402402
p->sid, p->rev,
403
- p->fClosed,
403
+ p->iClosed,
404404
p->fpid, p->pIrt ? p->pIrt->fpid : 0,
405405
p->pEditPrev ? p->pEditPrev->fpid : 0,
406406
p->pEditTail ? p->pEditTail->fpid : 0, p->zUuid);
407407
}
408408
fossil_print("\nDisplay\n");
@@ -554,25 +554,25 @@
554554
char *zHist; /* History query string */
555555
Manifest *pManifest; /* Manifest comprising the current post */
556556
int bPrivate; /* True for posts awaiting moderation */
557557
int bSameUser; /* True if author is also the reader */
558558
int iIndent; /* Indent level */
559
- int fClosed; /* True if (sub)thread is closed */
559
+ int iClosed; /* True if (sub)thread is closed */
560560
const char *zMimetype;/* Formatting MIME type */
561561
562562
/* Get the manifest for the post. Abort if not found (e.g. shunned). */
563563
pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
564564
if( !pManifest ) return;
565
- fClosed = forum_post_is_closed(p, 1);
565
+ iClosed = forum_post_is_closed(p, 1);
566566
/* When not in raw mode, create the border around the post. */
567567
if( !bRaw ){
568568
/* Open the <div> enclosing the post. Set the class string to mark the post
569569
** as selected and/or obsolete. */
570570
iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
571571
@ <div id='forum%d(p->fpid)' class='forumTime\
572572
@ %s(bSelect ? " forumSel" : "")\
573
- @ %s(fClosed ? " forumClosed" : "")\
573
+ @ %s(iClosed ? " forumClosed" : "")\
574574
@ %s(p->pEditTail ? " forumObs" : "")' \
575575
if( iIndent && iIndentScale ){
576576
@ style='margin-left:%d(iIndent*iIndentScale)ex;'>
577577
}else{
578578
@ >
@@ -683,13 +683,13 @@
683683
if( !bPrivate ){
684684
/* Reply and Edit are only available if the post has been
685685
** approved. Closed threads can only be edited or replied to
686686
** by an admin but a user may delete their own posts even if
687687
** they are closed. */
688
- if( g.perm.Admin || !fClosed ){
688
+ if( g.perm.Admin || !iClosed ){
689689
@ <input type="submit" name="reply" value="Reply">
690
- if( g.perm.Admin || (bSameUser && !fClosed) ){
690
+ if( g.perm.Admin || (bSameUser && !iClosed) ){
691691
@ <input type="submit" name="edit" value="Edit">
692692
}
693693
if( g.perm.Admin || bSameUser ){
694694
@ <input type="submit" name="nullout" value="Delete">
695695
}
@@ -1317,11 +1317,11 @@
13171317
const char *zTitle = 0;
13181318
char *zDate = 0;
13191319
const char *zFpid = PD("fpid","");
13201320
int isCsrfSafe;
13211321
int isDelete = 0;
1322
- int fClosed = 0;
1322
+ int iClosed = 0;
13231323
int bSameUser; /* True if author is also the reader */
13241324
int bPreview; /* True in preview mode. */
13251325
int bPrivate; /* True if post is private (not yet moderated) */
13261326
13271327
login_check_credentials();
@@ -1340,11 +1340,11 @@
13401340
if( P("cancel") ){
13411341
cgi_redirectf("%R/forumpost/%S",P("fpid"));
13421342
return;
13431343
}
13441344
bPreview = P("preview")!=0;
1345
- fClosed = forum_rid_is_closed(fpid, froot!=fpid);
1345
+ iClosed = forum_rid_is_closed(fpid, froot!=fpid);
13461346
isCsrfSafe = cgi_csrf_safe(1);
13471347
bPrivate = content_is_private(fpid);
13481348
bSameUser = login_is_individual()
13491349
&& fossil_strcmp(pPost->zUser, g.zLogin)==0;
13501350
if( isCsrfSafe && (g.perm.ModForum || (bPrivate && bSameUser)) ){
@@ -1436,11 +1436,11 @@
14361436
}
14371437
@ <h2>Revised Message:</h2>
14381438
@ <form action="%R/forume2" method="POST">
14391439
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
14401440
@ <input type="hidden" name="edit" value="1">
1441
- if( fClosed ) forumpost_error_closed();
1441
+ if( iClosed ) forumpost_error_closed();
14421442
forum_from_line();
14431443
forum_post_widget(zTitle, zMimetype, zContent);
14441444
}else{
14451445
/* Reply */
14461446
char *zDisplayName;
@@ -1466,24 +1466,24 @@
14661466
}
14671467
@ <h2>Enter Reply:</h2>
14681468
@ <form action="%R/forume2" method="POST">
14691469
@ <input type="hidden" name="fpid" value="%h(P("fpid"))">
14701470
@ <input type="hidden" name="reply" value="1">
1471
- if( fClosed ) forumpost_error_closed();
1471
+ if( iClosed ) forumpost_error_closed();
14721472
forum_from_line();
14731473
forum_post_widget(0, zMimetype, zContent);
14741474
}
14751475
if( !isDelete ){
14761476
@ <input type="submit" name="preview" value="Preview">
14771477
}
14781478
@ <input type="submit" name="cancel" value="Cancel">
14791479
if( (bPreview && !whitespace_only(zContent)) || isDelete ){
1480
- if( !fClosed || g.perm.Admin ) {
1480
+ if( !iClosed || g.perm.Admin ) {
14811481
@ <input type="submit" name="submit" value="Submit">
14821482
}
1483
- forumpost_emit_unlock_checkbox(fClosed, fpid);
1484
- }else if( !bPreview && fClosed ){
1483
+ forumpost_emit_unlock_checkbox(iClosed, fpid);
1484
+ }else if( !bPreview && iClosed ){
14851485
@ <span class='warning'>This post is CLOSED</span>
14861486
}
14871487
if( g.perm.Debug ){
14881488
/* For the test-forumnew page add these extra debugging controls */
14891489
@ <div class="debug">
14901490
--- src/forum.c
+++ src/forum.c
@@ -47,11 +47,11 @@
47 ForumPost *pNext; /* Next in chronological order */
48 ForumPost *pPrev; /* Previous in chronological order */
49 ForumPost *pDisplay; /* Next in display order */
50 int nEdit; /* Number of edits to this post */
51 int nIndent; /* Number of levels of indentation for this post */
52 int fClosed; /* See forum_rid_is_closed() */
53 };
54
55 /*
56 ** A single instance of the following tracks all entries for a thread.
57 */
@@ -93,11 +93,11 @@
93 ** (recursively) for closure, else only p is checked.
94 */
95 int forum_post_is_closed(ForumPost *p, int bCheckParents){
96 if( !p ) return 0;
97 if( p->pEditTail ) p = p->pEditTail;
98 if( p->fClosed || !bCheckParents ) return p->fClosed;
99 else if( p->pIrt ){
100 return forum_post_is_closed(p->pIrt->pEditTail
101 ? p->pIrt->pEditTail : p->pIrt,
102 bCheckParents);
103 }
@@ -144,19 +144,19 @@
144 }
145 return rc>0 ? -rc : rc;
146 }
147
148 /*
149 ** If fClosed is true and the current user has admin privileges, this
150 ** renders either a checkbox to unlock forum post fpid (if fClosed>0)
151 ** or a SPAN.warning element that the given post inherits the CLOSED
152 ** status from a parent post (if fClosed<0). If neither of the initial
153 ** conditions is true, this is a no-op.
154 */
155 static void forumpost_emit_unlock_checkbox(int fClosed, int fpid){
156 if( fClosed && g.perm.Admin ){
157 if( fClosed>0 ){
158 /* Only show the "unlock" checkbox on a post which is actually
159 ** closed, not on a post which inherits that state. */
160 @ <label class='warning'><input type="checkbox" name="reopen" value="1">
161 @ Re-open this CLOSED post? (NOT YET IMPLEMENTED)</label>
162 }else{
@@ -308,11 +308,11 @@
308 for(; p; p=p->pEditPrev ){
309 p->nEdit = pPost->nEdit;
310 p->pEditTail = pPost;
311 }
312 }
313 pPost->fClosed = forum_rid_is_closed(pPost->fpid, 1);
314 }
315 db_finalize(&q);
316
317 if( computeHierarchy ){
318 /* Compute the hierarchical display order */
@@ -398,11 +398,11 @@
398 /* 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123 */
399 " sid rev closed fpid pIrt pEditPrev pEditTail hash\n");
400 for(p=pThread->pFirst; p; p=p->pNext){
401 fossil_print("%4d %4d %7d %9d %9d %9d %9d %8.8s\n",
402 p->sid, p->rev,
403 p->fClosed,
404 p->fpid, p->pIrt ? p->pIrt->fpid : 0,
405 p->pEditPrev ? p->pEditPrev->fpid : 0,
406 p->pEditTail ? p->pEditTail->fpid : 0, p->zUuid);
407 }
408 fossil_print("\nDisplay\n");
@@ -554,25 +554,25 @@
554 char *zHist; /* History query string */
555 Manifest *pManifest; /* Manifest comprising the current post */
556 int bPrivate; /* True for posts awaiting moderation */
557 int bSameUser; /* True if author is also the reader */
558 int iIndent; /* Indent level */
559 int fClosed; /* True if (sub)thread is closed */
560 const char *zMimetype;/* Formatting MIME type */
561
562 /* Get the manifest for the post. Abort if not found (e.g. shunned). */
563 pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
564 if( !pManifest ) return;
565 fClosed = forum_post_is_closed(p, 1);
566 /* When not in raw mode, create the border around the post. */
567 if( !bRaw ){
568 /* Open the <div> enclosing the post. Set the class string to mark the post
569 ** as selected and/or obsolete. */
570 iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
571 @ <div id='forum%d(p->fpid)' class='forumTime\
572 @ %s(bSelect ? " forumSel" : "")\
573 @ %s(fClosed ? " forumClosed" : "")\
574 @ %s(p->pEditTail ? " forumObs" : "")' \
575 if( iIndent && iIndentScale ){
576 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
577 }else{
578 @ >
@@ -683,13 +683,13 @@
683 if( !bPrivate ){
684 /* Reply and Edit are only available if the post has been
685 ** approved. Closed threads can only be edited or replied to
686 ** by an admin but a user may delete their own posts even if
687 ** they are closed. */
688 if( g.perm.Admin || !fClosed ){
689 @ <input type="submit" name="reply" value="Reply">
690 if( g.perm.Admin || (bSameUser && !fClosed) ){
691 @ <input type="submit" name="edit" value="Edit">
692 }
693 if( g.perm.Admin || bSameUser ){
694 @ <input type="submit" name="nullout" value="Delete">
695 }
@@ -1317,11 +1317,11 @@
1317 const char *zTitle = 0;
1318 char *zDate = 0;
1319 const char *zFpid = PD("fpid","");
1320 int isCsrfSafe;
1321 int isDelete = 0;
1322 int fClosed = 0;
1323 int bSameUser; /* True if author is also the reader */
1324 int bPreview; /* True in preview mode. */
1325 int bPrivate; /* True if post is private (not yet moderated) */
1326
1327 login_check_credentials();
@@ -1340,11 +1340,11 @@
1340 if( P("cancel") ){
1341 cgi_redirectf("%R/forumpost/%S",P("fpid"));
1342 return;
1343 }
1344 bPreview = P("preview")!=0;
1345 fClosed = forum_rid_is_closed(fpid, froot!=fpid);
1346 isCsrfSafe = cgi_csrf_safe(1);
1347 bPrivate = content_is_private(fpid);
1348 bSameUser = login_is_individual()
1349 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
1350 if( isCsrfSafe && (g.perm.ModForum || (bPrivate && bSameUser)) ){
@@ -1436,11 +1436,11 @@
1436 }
1437 @ <h2>Revised Message:</h2>
1438 @ <form action="%R/forume2" method="POST">
1439 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1440 @ <input type="hidden" name="edit" value="1">
1441 if( fClosed ) forumpost_error_closed();
1442 forum_from_line();
1443 forum_post_widget(zTitle, zMimetype, zContent);
1444 }else{
1445 /* Reply */
1446 char *zDisplayName;
@@ -1466,24 +1466,24 @@
1466 }
1467 @ <h2>Enter Reply:</h2>
1468 @ <form action="%R/forume2" method="POST">
1469 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1470 @ <input type="hidden" name="reply" value="1">
1471 if( fClosed ) forumpost_error_closed();
1472 forum_from_line();
1473 forum_post_widget(0, zMimetype, zContent);
1474 }
1475 if( !isDelete ){
1476 @ <input type="submit" name="preview" value="Preview">
1477 }
1478 @ <input type="submit" name="cancel" value="Cancel">
1479 if( (bPreview && !whitespace_only(zContent)) || isDelete ){
1480 if( !fClosed || g.perm.Admin ) {
1481 @ <input type="submit" name="submit" value="Submit">
1482 }
1483 forumpost_emit_unlock_checkbox(fClosed, fpid);
1484 }else if( !bPreview && fClosed ){
1485 @ <span class='warning'>This post is CLOSED</span>
1486 }
1487 if( g.perm.Debug ){
1488 /* For the test-forumnew page add these extra debugging controls */
1489 @ <div class="debug">
1490
--- src/forum.c
+++ src/forum.c
@@ -47,11 +47,11 @@
47 ForumPost *pNext; /* Next in chronological order */
48 ForumPost *pPrev; /* Previous in chronological order */
49 ForumPost *pDisplay; /* Next in display order */
50 int nEdit; /* Number of edits to this post */
51 int nIndent; /* Number of levels of indentation for this post */
52 int iClosed; /* See forum_rid_is_closed() */
53 };
54
55 /*
56 ** A single instance of the following tracks all entries for a thread.
57 */
@@ -93,11 +93,11 @@
93 ** (recursively) for closure, else only p is checked.
94 */
95 int forum_post_is_closed(ForumPost *p, int bCheckParents){
96 if( !p ) return 0;
97 if( p->pEditTail ) p = p->pEditTail;
98 if( p->iClosed || !bCheckParents ) return p->iClosed;
99 else if( p->pIrt ){
100 return forum_post_is_closed(p->pIrt->pEditTail
101 ? p->pIrt->pEditTail : p->pIrt,
102 bCheckParents);
103 }
@@ -144,19 +144,19 @@
144 }
145 return rc>0 ? -rc : rc;
146 }
147
148 /*
149 ** If iClosed is true and the current user has admin privileges, this
150 ** renders either a checkbox to unlock forum post fpid (if iClosed>0)
151 ** or a SPAN.warning element that the given post inherits the CLOSED
152 ** status from a parent post (if iClosed<0). If neither of the initial
153 ** conditions is true, this is a no-op.
154 */
155 static void forumpost_emit_unlock_checkbox(int iClosed, int fpid){
156 if( iClosed && g.perm.Admin ){
157 if( iClosed>0 ){
158 /* Only show the "unlock" checkbox on a post which is actually
159 ** closed, not on a post which inherits that state. */
160 @ <label class='warning'><input type="checkbox" name="reopen" value="1">
161 @ Re-open this CLOSED post? (NOT YET IMPLEMENTED)</label>
162 }else{
@@ -308,11 +308,11 @@
308 for(; p; p=p->pEditPrev ){
309 p->nEdit = pPost->nEdit;
310 p->pEditTail = pPost;
311 }
312 }
313 pPost->iClosed = forum_rid_is_closed(pPost->fpid, 1);
314 }
315 db_finalize(&q);
316
317 if( computeHierarchy ){
318 /* Compute the hierarchical display order */
@@ -398,11 +398,11 @@
398 /* 123456789 123456789 123456789 123456789 123456789 123456789 123456789 123 */
399 " sid rev closed fpid pIrt pEditPrev pEditTail hash\n");
400 for(p=pThread->pFirst; p; p=p->pNext){
401 fossil_print("%4d %4d %7d %9d %9d %9d %9d %8.8s\n",
402 p->sid, p->rev,
403 p->iClosed,
404 p->fpid, p->pIrt ? p->pIrt->fpid : 0,
405 p->pEditPrev ? p->pEditPrev->fpid : 0,
406 p->pEditTail ? p->pEditTail->fpid : 0, p->zUuid);
407 }
408 fossil_print("\nDisplay\n");
@@ -554,25 +554,25 @@
554 char *zHist; /* History query string */
555 Manifest *pManifest; /* Manifest comprising the current post */
556 int bPrivate; /* True for posts awaiting moderation */
557 int bSameUser; /* True if author is also the reader */
558 int iIndent; /* Indent level */
559 int iClosed; /* True if (sub)thread is closed */
560 const char *zMimetype;/* Formatting MIME type */
561
562 /* Get the manifest for the post. Abort if not found (e.g. shunned). */
563 pManifest = manifest_get(p->fpid, CFTYPE_FORUM, 0);
564 if( !pManifest ) return;
565 iClosed = forum_post_is_closed(p, 1);
566 /* When not in raw mode, create the border around the post. */
567 if( !bRaw ){
568 /* Open the <div> enclosing the post. Set the class string to mark the post
569 ** as selected and/or obsolete. */
570 iIndent = (p->pEditHead ? p->pEditHead->nIndent : p->nIndent)-1;
571 @ <div id='forum%d(p->fpid)' class='forumTime\
572 @ %s(bSelect ? " forumSel" : "")\
573 @ %s(iClosed ? " forumClosed" : "")\
574 @ %s(p->pEditTail ? " forumObs" : "")' \
575 if( iIndent && iIndentScale ){
576 @ style='margin-left:%d(iIndent*iIndentScale)ex;'>
577 }else{
578 @ >
@@ -683,13 +683,13 @@
683 if( !bPrivate ){
684 /* Reply and Edit are only available if the post has been
685 ** approved. Closed threads can only be edited or replied to
686 ** by an admin but a user may delete their own posts even if
687 ** they are closed. */
688 if( g.perm.Admin || !iClosed ){
689 @ <input type="submit" name="reply" value="Reply">
690 if( g.perm.Admin || (bSameUser && !iClosed) ){
691 @ <input type="submit" name="edit" value="Edit">
692 }
693 if( g.perm.Admin || bSameUser ){
694 @ <input type="submit" name="nullout" value="Delete">
695 }
@@ -1317,11 +1317,11 @@
1317 const char *zTitle = 0;
1318 char *zDate = 0;
1319 const char *zFpid = PD("fpid","");
1320 int isCsrfSafe;
1321 int isDelete = 0;
1322 int iClosed = 0;
1323 int bSameUser; /* True if author is also the reader */
1324 int bPreview; /* True in preview mode. */
1325 int bPrivate; /* True if post is private (not yet moderated) */
1326
1327 login_check_credentials();
@@ -1340,11 +1340,11 @@
1340 if( P("cancel") ){
1341 cgi_redirectf("%R/forumpost/%S",P("fpid"));
1342 return;
1343 }
1344 bPreview = P("preview")!=0;
1345 iClosed = forum_rid_is_closed(fpid, froot!=fpid);
1346 isCsrfSafe = cgi_csrf_safe(1);
1347 bPrivate = content_is_private(fpid);
1348 bSameUser = login_is_individual()
1349 && fossil_strcmp(pPost->zUser, g.zLogin)==0;
1350 if( isCsrfSafe && (g.perm.ModForum || (bPrivate && bSameUser)) ){
@@ -1436,11 +1436,11 @@
1436 }
1437 @ <h2>Revised Message:</h2>
1438 @ <form action="%R/forume2" method="POST">
1439 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1440 @ <input type="hidden" name="edit" value="1">
1441 if( iClosed ) forumpost_error_closed();
1442 forum_from_line();
1443 forum_post_widget(zTitle, zMimetype, zContent);
1444 }else{
1445 /* Reply */
1446 char *zDisplayName;
@@ -1466,24 +1466,24 @@
1466 }
1467 @ <h2>Enter Reply:</h2>
1468 @ <form action="%R/forume2" method="POST">
1469 @ <input type="hidden" name="fpid" value="%h(P("fpid"))">
1470 @ <input type="hidden" name="reply" value="1">
1471 if( iClosed ) forumpost_error_closed();
1472 forum_from_line();
1473 forum_post_widget(0, zMimetype, zContent);
1474 }
1475 if( !isDelete ){
1476 @ <input type="submit" name="preview" value="Preview">
1477 }
1478 @ <input type="submit" name="cancel" value="Cancel">
1479 if( (bPreview && !whitespace_only(zContent)) || isDelete ){
1480 if( !iClosed || g.perm.Admin ) {
1481 @ <input type="submit" name="submit" value="Submit">
1482 }
1483 forumpost_emit_unlock_checkbox(iClosed, fpid);
1484 }else if( !bPreview && iClosed ){
1485 @ <span class='warning'>This post is CLOSED</span>
1486 }
1487 if( g.perm.Debug ){
1488 /* For the test-forumnew page add these extra debugging controls */
1489 @ <div class="debug">
1490
+2 -2
--- src/tag.c
+++ src/tag.c
@@ -907,12 +907,12 @@
907907
}
908908
909909
910910
/*
911911
** Returns tagxref.rowid if the given blob.rid has a tagxref.rid entry
912
-** an active (non-cancelled) tag matching the given rid and tag name
913
-** string, else returns 0. Note that this function does not
912
+** of an active (non-cancelled) tag matching the given rid and tag
913
+** name string, else returns 0. Note that this function does not
914914
** distinguish between a non-existent tag and a cancelled tag.
915915
*/
916916
int rid_has_active_tag_name(int rid, const char *zTagName){
917917
static Stmt q = empty_Stmt_m;
918918
int rc;
919919
--- src/tag.c
+++ src/tag.c
@@ -907,12 +907,12 @@
907 }
908
909
910 /*
911 ** Returns tagxref.rowid if the given blob.rid has a tagxref.rid entry
912 ** an active (non-cancelled) tag matching the given rid and tag name
913 ** string, else returns 0. Note that this function does not
914 ** distinguish between a non-existent tag and a cancelled tag.
915 */
916 int rid_has_active_tag_name(int rid, const char *zTagName){
917 static Stmt q = empty_Stmt_m;
918 int rc;
919
--- src/tag.c
+++ src/tag.c
@@ -907,12 +907,12 @@
907 }
908
909
910 /*
911 ** Returns tagxref.rowid if the given blob.rid has a tagxref.rid entry
912 ** of an active (non-cancelled) tag matching the given rid and tag
913 ** name string, else returns 0. Note that this function does not
914 ** distinguish between a non-existent tag and a cancelled tag.
915 */
916 int rid_has_active_tag_name(int rid, const char *zTagName){
917 static Stmt q = empty_Stmt_m;
918 int rc;
919

Keyboard Shortcuts

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