Fossil SCM
/stats_report byuser now uses %h instead of %s to render the user name.
Commit
71d37569777b526a2c4567d279484fe5f0971061
Parent
f1a66a6c26a3be8…
1 file changed
+6
-3
+6
-3
| --- src/timeline.c | ||
| +++ src/timeline.c | ||
| @@ -1950,11 +1950,14 @@ | ||
| 1950 | 1950 | if( !includeMonth ){ |
| 1951 | 1951 | output_table_sorting_javascript("statsTable","tnx"); |
| 1952 | 1952 | } |
| 1953 | 1953 | } |
| 1954 | 1954 | |
| 1955 | -void stats_report_by_user(){ | |
| 1955 | +/* | |
| 1956 | +** Implements the "byuser" view for /stats_report. | |
| 1957 | +*/ | |
| 1958 | +static void stats_report_by_user(){ | |
| 1956 | 1959 | Stmt query = empty_Stmt; |
| 1957 | 1960 | int const nPixelsPerEvent = 1; /* for sizing the "graph" part */ |
| 1958 | 1961 | int nRowNumber = 0; /* current TR number */ |
| 1959 | 1962 | int nEventTotal = 0; /* Total event count */ |
| 1960 | 1963 | int rowClass = 0; /* counter for alternating |
| @@ -1978,16 +1981,16 @@ | ||
| 1978 | 1981 | @ </tr></thead><tbody> |
| 1979 | 1982 | while( SQLITE_ROW == db_step(&query) ){ |
| 1980 | 1983 | char const * zUser = db_column_text(&query, 0); |
| 1981 | 1984 | int const nCount = db_column_int(&query, 1); |
| 1982 | 1985 | int const nSize = 1+((nPixelsPerEvent * nCount) / 10); |
| 1983 | - if(!nCount) continue; | |
| 1986 | + if(!nCount) continue /* arguable! */; | |
| 1984 | 1987 | rowClass = ++nRowNumber % 2; |
| 1985 | 1988 | nEventTotal += nCount; |
| 1986 | 1989 | @<tr class='row%d(rowClass)'> |
| 1987 | 1990 | @ <td> |
| 1988 | - @ <a href="?view=byyear&user=%h(zUser)" target="_new">%s(zUser)</a> | |
| 1991 | + @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a> | |
| 1989 | 1992 | @ </td><td>%d(nCount)</td> |
| 1990 | 1993 | @ <td> |
| 1991 | 1994 | @ <div class='statistics-report-graph-line' |
| 1992 | 1995 | @ style='height:16px;width:%d(nSize)px;'> |
| 1993 | 1996 | @ </div></td> |
| 1994 | 1997 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1950,11 +1950,14 @@ | |
| 1950 | if( !includeMonth ){ |
| 1951 | output_table_sorting_javascript("statsTable","tnx"); |
| 1952 | } |
| 1953 | } |
| 1954 | |
| 1955 | void stats_report_by_user(){ |
| 1956 | Stmt query = empty_Stmt; |
| 1957 | int const nPixelsPerEvent = 1; /* for sizing the "graph" part */ |
| 1958 | int nRowNumber = 0; /* current TR number */ |
| 1959 | int nEventTotal = 0; /* Total event count */ |
| 1960 | int rowClass = 0; /* counter for alternating |
| @@ -1978,16 +1981,16 @@ | |
| 1978 | @ </tr></thead><tbody> |
| 1979 | while( SQLITE_ROW == db_step(&query) ){ |
| 1980 | char const * zUser = db_column_text(&query, 0); |
| 1981 | int const nCount = db_column_int(&query, 1); |
| 1982 | int const nSize = 1+((nPixelsPerEvent * nCount) / 10); |
| 1983 | if(!nCount) continue; |
| 1984 | rowClass = ++nRowNumber % 2; |
| 1985 | nEventTotal += nCount; |
| 1986 | @<tr class='row%d(rowClass)'> |
| 1987 | @ <td> |
| 1988 | @ <a href="?view=byyear&user=%h(zUser)" target="_new">%s(zUser)</a> |
| 1989 | @ </td><td>%d(nCount)</td> |
| 1990 | @ <td> |
| 1991 | @ <div class='statistics-report-graph-line' |
| 1992 | @ style='height:16px;width:%d(nSize)px;'> |
| 1993 | @ </div></td> |
| 1994 |
| --- src/timeline.c | |
| +++ src/timeline.c | |
| @@ -1950,11 +1950,14 @@ | |
| 1950 | if( !includeMonth ){ |
| 1951 | output_table_sorting_javascript("statsTable","tnx"); |
| 1952 | } |
| 1953 | } |
| 1954 | |
| 1955 | /* |
| 1956 | ** Implements the "byuser" view for /stats_report. |
| 1957 | */ |
| 1958 | static void stats_report_by_user(){ |
| 1959 | Stmt query = empty_Stmt; |
| 1960 | int const nPixelsPerEvent = 1; /* for sizing the "graph" part */ |
| 1961 | int nRowNumber = 0; /* current TR number */ |
| 1962 | int nEventTotal = 0; /* Total event count */ |
| 1963 | int rowClass = 0; /* counter for alternating |
| @@ -1978,16 +1981,16 @@ | |
| 1981 | @ </tr></thead><tbody> |
| 1982 | while( SQLITE_ROW == db_step(&query) ){ |
| 1983 | char const * zUser = db_column_text(&query, 0); |
| 1984 | int const nCount = db_column_int(&query, 1); |
| 1985 | int const nSize = 1+((nPixelsPerEvent * nCount) / 10); |
| 1986 | if(!nCount) continue /* arguable! */; |
| 1987 | rowClass = ++nRowNumber % 2; |
| 1988 | nEventTotal += nCount; |
| 1989 | @<tr class='row%d(rowClass)'> |
| 1990 | @ <td> |
| 1991 | @ <a href="?view=byyear&user=%h(zUser)" target="_new">%h(zUser)</a> |
| 1992 | @ </td><td>%d(nCount)</td> |
| 1993 | @ <td> |
| 1994 | @ <div class='statistics-report-graph-line' |
| 1995 | @ style='height:16px;width:%d(nSize)px;'> |
| 1996 | @ </div></td> |
| 1997 |