Overview
SHA1 Hash: | 1e2ec3ff8746f9fdfb98557d6d1ee1ff15565335 |
---|---|
Date: | 2009-12-30 01:57:14 |
User: | jeremy_c |
Comment: | Added a 's' parameter to the web timeline view. This will search the comment and brief fields for the given text via LIKE '%value%'. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/timeline.c from [b36ed4e648] to [ece922611b].
@@ -417,10 +417,11 @@ ** p=RID artifact RID and up to COUNT parents and ancestors ** d=RID artifact RID and up to COUNT descendants ** t=TAGID show only check-ins with the given tagid ** u=USER only if belonging to this user ** y=TYPE 'ci', 'w', 't' +** s=TEXT string search (comment and brief) ** ** p= and d= can appear individually or together. If either p= or d= ** appear, then u=, y=, a=, and b= are ignored. ** ** If a= and b= appear, only a= is used. If neither appear, the most @@ -439,10 +440,11 @@ const char *zType = PD("y","all"); /* Type of events. All if NULL */ const char *zAfter = P("a"); /* Events after this time */ const char *zBefore = P("b"); /* Events before this time */ const char *zCirca = P("c"); /* Events near this time */ const char *zTagName = P("t"); /* Show events with this tag */ + const char *zString = P("s"); /* String text search of comment and brief */ HQuery url; /* URL for various branch links */ int tagid; /* Tag ID */ int tmFlags; /* Timeline flags */ /* To view the timeline, must have permission to read project data. @@ -543,10 +545,15 @@ } } if( zUser ){ blob_appendf(&sql, " AND event.user=%Q", zUser); url_add_parameter(&url, "u", zUser); + } + if ( zString ){ + blob_appendf(&sql, " AND (event.comment LIKE '%%%q%%' OR event.brief LIKE '%%%q%%')", + zString, zString); + url_add_parameter(&url, "s", zString); } if( zAfter ){ while( isspace(zAfter[0]) ){ zAfter++; } if( zAfter[0] ){ blob_appendf(&sql,