Fossil

Check-in [970adec0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In the "last change" report, show the user as "anonymous" if the EVENT.USER field is NULL or an empty string. (Later:) Removed from trunk because a better solution is to not store empty strings in the EVENT.USER field in the first place.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | mistake
Files: files | file ages | folders
SHA3-256:970adec0fee7fcece1f414485f81cf8813753d93bf1b2c02d6b00b1274fa38d7
User & Date: drh 2017-07-08 11:01:31
Original Comment: In the "last change" report, show the user as "anonymous" if the EVENT.USER field is NULL or an empty string.
Context
2017-07-08
11:01
In the "last change" report, show the user as "anonymous" if the EVENT.USER field is NULL or an empty string. (Later:) Removed from trunk because a better solution is to not store empty strings in the EVENT.USER field in the first place. Closed-Leaf check-in: 970adec0 user: drh tags: mistake
2017-07-07
19:18
Avoid appending to g.zPath inside doc_page() loop. Instead, wait until the loop is done to modify g.zPath. When doing a directory lookup, the check-in and directory name were being repeatedly appended to g.zPath each step through the list of possible filename suffixes. This corrupted <base href> should index.html not exist, which in turn broke relative URLs. check-in: 956d4901 user: andygoth tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/statrep.c.

670
671
672
673
674
675
676

677
678
679
680
681
682
683
  );
  rNow = db_double(0.0, "SELECT julianday('now');");
  while( db_step(&s)==SQLITE_ROW ){
    const char *zUser = db_column_text(&s, 0);
    int cnt = db_column_int(&s, 1);
    double rMTime = db_column_double(&s,2);
    char *zAge = human_readable_age(rNow - rMTime);

    @ <tr>
    @ <td><a href='%s(zBaseUrl)%t(zUser)'>%h(zUser)</a>
    @ <td>%d(cnt)
    @ <td data-sortkey='%f(rMTime)' style='white-space:nowrap'>%s(zAge?zAge:"")
    @ </tr>
    fossil_free(zAge);
  }







>







670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
  );
  rNow = db_double(0.0, "SELECT julianday('now');");
  while( db_step(&s)==SQLITE_ROW ){
    const char *zUser = db_column_text(&s, 0);
    int cnt = db_column_int(&s, 1);
    double rMTime = db_column_double(&s,2);
    char *zAge = human_readable_age(rNow - rMTime);
    if( zUser==0 || zUser[0]==0 ) zUser = "anonymous";
    @ <tr>
    @ <td><a href='%s(zBaseUrl)%t(zUser)'>%h(zUser)</a>
    @ <td>%d(cnt)
    @ <td data-sortkey='%f(rMTime)' style='white-space:nowrap'>%s(zAge?zAge:"")
    @ </tr>
    fossil_free(zAge);
  }