Fossil SCM
If a ticket query begins with an underscore then: # Do not include a link to execute the query directly # Do not show to those users that do not have ticket report access This allows you to create ticket report queries that are for form submissions only, not direct access.
Commit
6069602aba14bf74b8f48bd94f7b7e033ca752da
Parent
19f552795b5c4ba…
1 file changed
+11
-2
+11
-2
| --- src/report.c | ||
| +++ src/report.c | ||
| @@ -61,14 +61,23 @@ | ||
| 61 | 61 | @ <p>Choose a report format from the following list:</p> |
| 62 | 62 | @ <ol> |
| 63 | 63 | while( db_step(&q)==SQLITE_ROW ){ |
| 64 | 64 | const char *zTitle = db_column_text(&q, 1); |
| 65 | 65 | const char *zOwner = db_column_text(&q, 2); |
| 66 | + if( zTitle[0] =='_' && !g.okTktFmt ){ | |
| 67 | + continue; | |
| 68 | + } | |
| 66 | 69 | rn = db_column_int(&q, 0); |
| 67 | 70 | cnt++; |
| 68 | - @ <li value="%d(cnt)"><a href="rptview?rn=%d(rn)" | |
| 69 | - @ rel="nofollow">%h(zTitle)</a> | |
| 71 | + @ <li value="%d(cnt)"> | |
| 72 | + if( zTitle[0] == '_' ){ | |
| 73 | + @%h(zTitle) | |
| 74 | + } else { | |
| 75 | + @<a href="rptview?rn=%d(rn)" | |
| 76 | + @ rel="nofollow">%h(zTitle)</a> | |
| 77 | + } | |
| 78 | + @ | |
| 70 | 79 | if( g.okWrite && zOwner && zOwner[0] ){ |
| 71 | 80 | @ (by <i>%h(zOwner)</i>) |
| 72 | 81 | } |
| 73 | 82 | if( g.okTktFmt ){ |
| 74 | 83 | @ [<a href="rptedit?rn=%d(rn)&copy=1" rel="nofollow">copy</a>] |
| 75 | 84 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -61,14 +61,23 @@ | |
| 61 | @ <p>Choose a report format from the following list:</p> |
| 62 | @ <ol> |
| 63 | while( db_step(&q)==SQLITE_ROW ){ |
| 64 | const char *zTitle = db_column_text(&q, 1); |
| 65 | const char *zOwner = db_column_text(&q, 2); |
| 66 | rn = db_column_int(&q, 0); |
| 67 | cnt++; |
| 68 | @ <li value="%d(cnt)"><a href="rptview?rn=%d(rn)" |
| 69 | @ rel="nofollow">%h(zTitle)</a> |
| 70 | if( g.okWrite && zOwner && zOwner[0] ){ |
| 71 | @ (by <i>%h(zOwner)</i>) |
| 72 | } |
| 73 | if( g.okTktFmt ){ |
| 74 | @ [<a href="rptedit?rn=%d(rn)&copy=1" rel="nofollow">copy</a>] |
| 75 |
| --- src/report.c | |
| +++ src/report.c | |
| @@ -61,14 +61,23 @@ | |
| 61 | @ <p>Choose a report format from the following list:</p> |
| 62 | @ <ol> |
| 63 | while( db_step(&q)==SQLITE_ROW ){ |
| 64 | const char *zTitle = db_column_text(&q, 1); |
| 65 | const char *zOwner = db_column_text(&q, 2); |
| 66 | if( zTitle[0] =='_' && !g.okTktFmt ){ |
| 67 | continue; |
| 68 | } |
| 69 | rn = db_column_int(&q, 0); |
| 70 | cnt++; |
| 71 | @ <li value="%d(cnt)"> |
| 72 | if( zTitle[0] == '_' ){ |
| 73 | @%h(zTitle) |
| 74 | } else { |
| 75 | @<a href="rptview?rn=%d(rn)" |
| 76 | @ rel="nofollow">%h(zTitle)</a> |
| 77 | } |
| 78 | @ |
| 79 | if( g.okWrite && zOwner && zOwner[0] ){ |
| 80 | @ (by <i>%h(zOwner)</i>) |
| 81 | } |
| 82 | if( g.okTktFmt ){ |
| 83 | @ [<a href="rptedit?rn=%d(rn)&copy=1" rel="nofollow">copy</a>] |
| 84 |