Fossil SCM

Fix a bug in tech-note editing that was generating an invalid artifact. This check-in fixes the bug, but tech-notes still need work. There ought to be a safety mechanism that checks to ensure that the new artifact does parse correctly before it is committed, for example.

drh 2015-02-19 21:07 trunk
Commit c123e3aa075522cc658accbc5b285924a6c0ce30
1 file changed +6
--- src/event.c
+++ src/event.c
@@ -267,10 +267,16 @@
267267
rid = db_int(0,
268268
"SELECT rid FROM tagxref"
269269
" WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB '%q*')"
270270
" ORDER BY mtime DESC", zTag
271271
);
272
+ if( rid && strlen(zId)<40 ){
273
+ zId = db_text(0,
274
+ "SELECT substr(tagname,7) FROM tag WHERE tagname GLOB '%q*'",
275
+ zTag
276
+ );
277
+ }
272278
free(zTag);
273279
274280
/* Need both check-in and wiki-write or wiki-create privileges in order
275281
** to edit/create an event.
276282
*/
277283
--- src/event.c
+++ src/event.c
@@ -267,10 +267,16 @@
267 rid = db_int(0,
268 "SELECT rid FROM tagxref"
269 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB '%q*')"
270 " ORDER BY mtime DESC", zTag
271 );
 
 
 
 
 
 
272 free(zTag);
273
274 /* Need both check-in and wiki-write or wiki-create privileges in order
275 ** to edit/create an event.
276 */
277
--- src/event.c
+++ src/event.c
@@ -267,10 +267,16 @@
267 rid = db_int(0,
268 "SELECT rid FROM tagxref"
269 " WHERE tagid=(SELECT tagid FROM tag WHERE tagname GLOB '%q*')"
270 " ORDER BY mtime DESC", zTag
271 );
272 if( rid && strlen(zId)<40 ){
273 zId = db_text(0,
274 "SELECT substr(tagname,7) FROM tag WHERE tagname GLOB '%q*'",
275 zTag
276 );
277 }
278 free(zTag);
279
280 /* Need both check-in and wiki-write or wiki-create privileges in order
281 ** to edit/create an event.
282 */
283

Keyboard Shortcuts

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