Fossil SCM

Enable deltification of edits of forum posts, limited to those which do not require moderation. Seems to work but requires more testing.

stephan 2019-12-05 06:48 trunk
Commit a612aa73889b96dedd04a3c14b25560d52efb775a15c1b8229eb25e767083d65
2 files changed +1 -1 +3 -1
+1 -1
--- src/content.c
+++ src/content.c
@@ -786,11 +786,11 @@
786786
** artifact. Otherwise, when we go to send the public artifact on a
787787
** sync operation, the other end of the sync will never be able to receive
788788
** the source of the delta. It is OK to delta private->private and
789789
** public->private and public->public. Just no private->public delta.
790790
**
791
-** If aSrc[bestSrc] is already a dleta that depends on rid, then it is
791
+** If aSrc[bestSrc] is already a delta that depends on rid, then it is
792792
** converted to undeltaed text before the aSrc[bestSrc]->rid delta is
793793
** created, in order to prevent a delta loop.
794794
**
795795
** If either rid or aSrc[i] contain less than 50 bytes, or if the
796796
** resulting delta does not achieve a compression of at least 25%
797797
--- src/content.c
+++ src/content.c
@@ -786,11 +786,11 @@
786 ** artifact. Otherwise, when we go to send the public artifact on a
787 ** sync operation, the other end of the sync will never be able to receive
788 ** the source of the delta. It is OK to delta private->private and
789 ** public->private and public->public. Just no private->public delta.
790 **
791 ** If aSrc[bestSrc] is already a dleta that depends on rid, then it is
792 ** converted to undeltaed text before the aSrc[bestSrc]->rid delta is
793 ** created, in order to prevent a delta loop.
794 **
795 ** If either rid or aSrc[i] contain less than 50 bytes, or if the
796 ** resulting delta does not achieve a compression of at least 25%
797
--- src/content.c
+++ src/content.c
@@ -786,11 +786,11 @@
786 ** artifact. Otherwise, when we go to send the public artifact on a
787 ** sync operation, the other end of the sync will never be able to receive
788 ** the source of the delta. It is OK to delta private->private and
789 ** public->private and public->public. Just no private->public delta.
790 **
791 ** If aSrc[bestSrc] is already a delta that depends on rid, then it is
792 ** converted to undeltaed text before the aSrc[bestSrc]->rid delta is
793 ** created, in order to prevent a delta loop.
794 **
795 ** If either rid or aSrc[i] contain less than 50 bytes, or if the
796 ** resulting delta does not achieve a compression of at least 25%
797
+3 -1
--- src/forum.c
+++ src/forum.c
@@ -684,11 +684,13 @@
684684
@ <pre>%h(blob_str(&x))</pre>
685685
@ </div>
686686
blob_reset(&x);
687687
return 0;
688688
}else{
689
- int nrid = wiki_put(&x, 0, forum_need_moderation());
689
+ int nrid = wiki_put(&x, iEdit>0 ? iEdit : 0,
690
+ forum_need_moderation());
691
+ blob_reset(&x);
690692
cgi_redirectf("%R/forumpost/%S", rid_to_uuid(nrid));
691693
return 1;
692694
}
693695
}
694696
695697
--- src/forum.c
+++ src/forum.c
@@ -684,11 +684,13 @@
684 @ <pre>%h(blob_str(&x))</pre>
685 @ </div>
686 blob_reset(&x);
687 return 0;
688 }else{
689 int nrid = wiki_put(&x, 0, forum_need_moderation());
 
 
690 cgi_redirectf("%R/forumpost/%S", rid_to_uuid(nrid));
691 return 1;
692 }
693 }
694
695
--- src/forum.c
+++ src/forum.c
@@ -684,11 +684,13 @@
684 @ <pre>%h(blob_str(&x))</pre>
685 @ </div>
686 blob_reset(&x);
687 return 0;
688 }else{
689 int nrid = wiki_put(&x, iEdit>0 ? iEdit : 0,
690 forum_need_moderation());
691 blob_reset(&x);
692 cgi_redirectf("%R/forumpost/%S", rid_to_uuid(nrid));
693 return 1;
694 }
695 }
696
697

Keyboard Shortcuts

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