Diff
Not logged in

Differences From:

File src/timeline.c part of check-in [a388e9da2e] - timeline descendants view now properly behaves when there are no descendents, and it also sigularizes the word 'descendents' when there is only one. by stephan on 2009-12-26 13:43:34. [view]

To:

File src/timeline.c part of check-in [1e2ec3ff87] - Added a 's' parameter to the web timeline view. This will search the comment and brief fields for the given text via LIKE '%value%'. by jeremy_c on 2009-12-30 01:57:14. Also file src/timeline.c part of check-in [76bc05d739] - merge with trunk by btheado on 2009-12-30 20:33:59. [view]

@@ -418,8 +418,9 @@
 **    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.
 **
@@ -440,8 +441,9 @@
   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 */
 
@@ -544,8 +546,13 @@
     }
     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] ){