33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
+
-
+
|
*/
void page_timeline_rss(void){
Stmt q;
int nLine=0;
char *zPubDate, *zProjectName, *zProjectDescr, *zFreeProjectName=0;
Blob bSQL;
const char *zType = PD("y","all"); /* Type of events. All if NULL */
int nLimit = atoi(PD("n","20"));
const char zSQL1[] =
@ SELECT
@ blob.rid,
@ uuid,
@ event.mtime,
@ coalesce(ecomment,comment),
@ coalesce(euser,user),
@ (SELECT count(*) FROM plink WHERE pid=blob.rid AND isprim),
@ (SELECT count(*) FROM plink WHERE cid=blob.rid)
@ FROM event, blob
@ WHERE blob.rid=event.objid
;
login_check_credentials();
if( !g.okRead && !g.okRdTkt && !g.okRdWiki ){
return;
}
blob_zero(&bSQL);
blob_append( &bSQL, zSQL1, -1 );
if( zType[0]!='a' ){
if( zType[0]=='c' && !g.okRead ) zType = "x";
if( zType[0]=='w' && !g.okRdWiki ) zType = "x";
if( zType[0]=='t' && !g.okRdTkt ) zType = "x";
blob_appendf(&bSQL, " AND event.type=%Q", zType);
}else{
if( !g.okRead ){
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
-
+
|
@ <title>%h(zProjectName)</title>
@ <link>%s(g.zBaseURL)</link>
@ <description>%h(zProjectDescr)</description>
@ <pubDate>%s(zPubDate)</pubDate>
@ <generator>Fossil version %s(MANIFEST_VERSION) %s(MANIFEST_DATE)</generator>
db_prepare(&q, blob_str(&bSQL));
blob_reset( &bSQL );
while( db_step(&q)==SQLITE_ROW && nLine<=20 ){
while( db_step(&q)==SQLITE_ROW && nLine<=nLimit ){
const char *zId = db_column_text(&q, 1);
const char *zCom = db_column_text(&q, 3);
const char *zAuthor = db_column_text(&q, 4);
char *zPrefix = "";
char *zDate;
int nChild = db_column_int(&q, 5);
int nParent = db_column_int(&q, 6);
|