Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Change the timeline comment when a wiki page is deleted. Remove some "#if 0" sections from the code. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | experimental |
| Files: | files | file ages | folders |
| SHA1: |
49e6670386005fa34186f357d0739f16 |
| User & Date: | drh 2010-03-18 12:55:39.000 |
| Original Comment: | Change the timeline comment when a wiki page is deleted. Remove some "#if 0" sections from the code. |
Context
|
2010-03-18
| ||
| 13:26 | Merge recent experimental changes (the attachment enhancement and the ability to delete wiki) into the trunk. ... (check-in: f4a25366a7 user: drh tags: trunk) | |
| 12:55 | Change the timeline comment when a wiki page is deleted. Remove some "#if 0" sections from the code. ... (Closed-Leaf check-in: 49e6670386 user: drh tags: experimental) | |
| 10:39 | Show only non-empty wiki pages in the list of all wiki pages. A rebuild is required after updating in order for this feature to work. ... (check-in: 012d5e4f23 user: drh tags: experimental) | |
Changes
Changes to src/manifest.c.
| ︙ | ︙ | |||
1078 1079 1080 1081 1082 1083 1084 1085 1086 |
}
}
if( m.type==CFTYPE_WIKI ){
char *zTag = mprintf("wiki-%s", m.zWikiTitle);
int tagid = tag_findid(zTag, 1);
int prior;
char *zComment;
char zLength[40];
while( isspace(m.zWiki[0]) ) m.zWiki++;
| > > | > | > > > | 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 |
}
}
if( m.type==CFTYPE_WIKI ){
char *zTag = mprintf("wiki-%s", m.zWikiTitle);
int tagid = tag_findid(zTag, 1);
int prior;
char *zComment;
int nWiki;
char zLength[40];
while( isspace(m.zWiki[0]) ) m.zWiki++;
nWiki = strlen(m.zWiki);
sqlite3_snprintf(sizeof(zLength), zLength, "%d", nWiki);
tag_insert(zTag, 1, zLength, rid, m.rDate, rid);
free(zTag);
prior = db_int(0,
"SELECT rid FROM tagxref"
" WHERE tagid=%d AND mtime<%.17g"
" ORDER BY mtime DESC",
tagid, m.rDate
);
if( prior ){
content_deltify(prior, rid, 0);
}
if( nWiki>0 ){
zComment = mprintf("Changes to wiki page [%h]", m.zWikiTitle);
}else{
zComment = mprintf("Deleted wiki page [%h]", m.zWikiTitle);
}
db_multi_exec(
"REPLACE INTO event(type,mtime,objid,user,comment,"
" bgcolor,euser,ecomment)"
"VALUES('w',%.17g,%d,%Q,%Q,"
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d AND tagtype>1),"
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d),"
" (SELECT value FROM tagxref WHERE tagid=%d AND rid=%d));",
|
| ︙ | ︙ | |||
1138 1139 1140 1141 1142 1143 1144 |
m.zAttachTarget, m.zAttachName,
m.zAttachTarget, m.zAttachName
);
if( strlen(m.zAttachTarget)!=UUID_SIZE
|| !validate16(m.zAttachTarget, UUID_SIZE)
){
char *zComment;
| < < < < < | 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 |
m.zAttachTarget, m.zAttachName,
m.zAttachTarget, m.zAttachName
);
if( strlen(m.zAttachTarget)!=UUID_SIZE
|| !validate16(m.zAttachTarget, UUID_SIZE)
){
char *zComment;
if( m.zAttachSrc && m.zAttachSrc[0] ){
zComment = mprintf("Add attachment \"%h\" to wiki page [%h]",
m.zAttachName, m.zAttachTarget);
}else{
zComment = mprintf("Delete attachment \"%h\" from wiki page [%h]",
m.zAttachName, m.zAttachTarget);
}
|
| ︙ | ︙ |
Changes to src/tkt.c.
| ︙ | ︙ | |||
239 240 241 242 243 244 245 |
manifest_parse(&manifest, &content);
ticket_insert(&manifest, createFlag, rid);
manifest_ticket_event(rid, &manifest, createFlag, tagid);
manifest_clear(&manifest);
createFlag = 0;
}
db_finalize(&q);
| < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < | 239 240 241 242 243 244 245 246 247 248 249 250 251 252 |
manifest_parse(&manifest, &content);
ticket_insert(&manifest, createFlag, rid);
manifest_ticket_event(rid, &manifest, createFlag, tagid);
manifest_clear(&manifest);
createFlag = 0;
}
db_finalize(&q);
}
/*
** Create the subscript interpreter and load the "common" code.
*/
void ticket_init(void){
const char *zConfig;
|
| ︙ | ︙ |