Fossil SCM
On the /ambiguous page, list matching tickets only for users with RdTkt and matching technotes only for users with RdWiki, as the pages that show them require.
Commit
01b165a2d892d7cd8a5a3ed227d90b77ba26d0753b66b4165b3db4e6b0ef8135
Parent
db14caf5712c7e0…
1 file changed
+42
-38
+42
-38
| --- src/name.c | ||
| +++ src/name.c | ||
| @@ -1021,50 +1021,54 @@ | ||
| 1021 | 1021 | @ %s(zUuid)</a> - |
| 1022 | 1022 | object_description(rid, 0, 0, 0); |
| 1023 | 1023 | @ </p></li> |
| 1024 | 1024 | } |
| 1025 | 1025 | db_finalize(&q); |
| 1026 | - db_prepare(&q, | |
| 1027 | - " SELECT tkt_rid, tkt_uuid, title" | |
| 1028 | - " FROM ticket, ticketchng" | |
| 1029 | - " WHERE ticket.tkt_id = ticketchng.tkt_id" | |
| 1030 | - " AND tkt_uuid GLOB '%q*'" | |
| 1031 | - " GROUP BY tkt_uuid" | |
| 1032 | - " ORDER BY tkt_ctime DESC", z); | |
| 1033 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 1034 | - int rid = db_column_int(&q, 0); | |
| 1035 | - const char *zUuid = db_column_text(&q, 1); | |
| 1036 | - const char *zTitle = db_column_text(&q, 2); | |
| 1037 | - @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> | |
| 1038 | - @ %s(zUuid)</a> - | |
| 1039 | - @ <ul></ul> | |
| 1040 | - @ Ticket | |
| 1041 | - hyperlink_to_version(zUuid); | |
| 1042 | - @ - %h(zTitle). | |
| 1043 | - @ <ul><li> | |
| 1044 | - object_description(rid, 0, 0, 0); | |
| 1045 | - @ </li></ul> | |
| 1046 | - @ </p></li> | |
| 1047 | - } | |
| 1048 | - db_finalize(&q); | |
| 1049 | - db_prepare(&q, | |
| 1050 | - "SELECT rid, uuid FROM" | |
| 1051 | - " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" | |
| 1052 | - " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" | |
| 1053 | - " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); | |
| 1054 | - while( db_step(&q)==SQLITE_ROW ){ | |
| 1055 | - int rid = db_column_int(&q, 0); | |
| 1056 | - const char* zUuid = db_column_text(&q, 1); | |
| 1057 | - @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> | |
| 1058 | - @ %s(zUuid)</a> - | |
| 1059 | - @ <ul><li> | |
| 1060 | - object_description(rid, 0, 0, 0); | |
| 1061 | - @ </li></ul> | |
| 1062 | - @ </p></li> | |
| 1026 | + if( g.perm.RdTkt ){ | |
| 1027 | + db_prepare(&q, | |
| 1028 | + " SELECT tkt_rid, tkt_uuid, title" | |
| 1029 | + " FROM ticket, ticketchng" | |
| 1030 | + " WHERE ticket.tkt_id = ticketchng.tkt_id" | |
| 1031 | + " AND tkt_uuid GLOB '%q*'" | |
| 1032 | + " GROUP BY tkt_uuid" | |
| 1033 | + " ORDER BY tkt_ctime DESC", z); | |
| 1034 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 1035 | + int rid = db_column_int(&q, 0); | |
| 1036 | + const char *zUuid = db_column_text(&q, 1); | |
| 1037 | + const char *zTitle = db_column_text(&q, 2); | |
| 1038 | + @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> | |
| 1039 | + @ %s(zUuid)</a> - | |
| 1040 | + @ <ul></ul> | |
| 1041 | + @ Ticket | |
| 1042 | + hyperlink_to_version(zUuid); | |
| 1043 | + @ - %h(zTitle). | |
| 1044 | + @ <ul><li> | |
| 1045 | + object_description(rid, 0, 0, 0); | |
| 1046 | + @ </li></ul> | |
| 1047 | + @ </p></li> | |
| 1048 | + } | |
| 1049 | + db_finalize(&q); | |
| 1050 | + } | |
| 1051 | + if( g.perm.RdWiki ){ | |
| 1052 | + db_prepare(&q, | |
| 1053 | + "SELECT rid, uuid FROM" | |
| 1054 | + " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" | |
| 1055 | + " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" | |
| 1056 | + " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); | |
| 1057 | + while( db_step(&q)==SQLITE_ROW ){ | |
| 1058 | + int rid = db_column_int(&q, 0); | |
| 1059 | + const char* zUuid = db_column_text(&q, 1); | |
| 1060 | + @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> | |
| 1061 | + @ %s(zUuid)</a> - | |
| 1062 | + @ <ul><li> | |
| 1063 | + object_description(rid, 0, 0, 0); | |
| 1064 | + @ </li></ul> | |
| 1065 | + @ </p></li> | |
| 1066 | + } | |
| 1067 | + db_finalize(&q); | |
| 1063 | 1068 | } |
| 1064 | 1069 | @ </ol> |
| 1065 | - db_finalize(&q); | |
| 1066 | 1070 | style_finish_page(); |
| 1067 | 1071 | } |
| 1068 | 1072 | |
| 1069 | 1073 | /* |
| 1070 | 1074 | ** Convert the name in CGI parameter zParamName into a rid and return that |
| 1071 | 1075 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1021,50 +1021,54 @@ | |
| 1021 | @ %s(zUuid)</a> - |
| 1022 | object_description(rid, 0, 0, 0); |
| 1023 | @ </p></li> |
| 1024 | } |
| 1025 | db_finalize(&q); |
| 1026 | db_prepare(&q, |
| 1027 | " SELECT tkt_rid, tkt_uuid, title" |
| 1028 | " FROM ticket, ticketchng" |
| 1029 | " WHERE ticket.tkt_id = ticketchng.tkt_id" |
| 1030 | " AND tkt_uuid GLOB '%q*'" |
| 1031 | " GROUP BY tkt_uuid" |
| 1032 | " ORDER BY tkt_ctime DESC", z); |
| 1033 | while( db_step(&q)==SQLITE_ROW ){ |
| 1034 | int rid = db_column_int(&q, 0); |
| 1035 | const char *zUuid = db_column_text(&q, 1); |
| 1036 | const char *zTitle = db_column_text(&q, 2); |
| 1037 | @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> |
| 1038 | @ %s(zUuid)</a> - |
| 1039 | @ <ul></ul> |
| 1040 | @ Ticket |
| 1041 | hyperlink_to_version(zUuid); |
| 1042 | @ - %h(zTitle). |
| 1043 | @ <ul><li> |
| 1044 | object_description(rid, 0, 0, 0); |
| 1045 | @ </li></ul> |
| 1046 | @ </p></li> |
| 1047 | } |
| 1048 | db_finalize(&q); |
| 1049 | db_prepare(&q, |
| 1050 | "SELECT rid, uuid FROM" |
| 1051 | " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" |
| 1052 | " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" |
| 1053 | " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); |
| 1054 | while( db_step(&q)==SQLITE_ROW ){ |
| 1055 | int rid = db_column_int(&q, 0); |
| 1056 | const char* zUuid = db_column_text(&q, 1); |
| 1057 | @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> |
| 1058 | @ %s(zUuid)</a> - |
| 1059 | @ <ul><li> |
| 1060 | object_description(rid, 0, 0, 0); |
| 1061 | @ </li></ul> |
| 1062 | @ </p></li> |
| 1063 | } |
| 1064 | @ </ol> |
| 1065 | db_finalize(&q); |
| 1066 | style_finish_page(); |
| 1067 | } |
| 1068 | |
| 1069 | /* |
| 1070 | ** Convert the name in CGI parameter zParamName into a rid and return that |
| 1071 |
| --- src/name.c | |
| +++ src/name.c | |
| @@ -1021,50 +1021,54 @@ | |
| 1021 | @ %s(zUuid)</a> - |
| 1022 | object_description(rid, 0, 0, 0); |
| 1023 | @ </p></li> |
| 1024 | } |
| 1025 | db_finalize(&q); |
| 1026 | if( g.perm.RdTkt ){ |
| 1027 | db_prepare(&q, |
| 1028 | " SELECT tkt_rid, tkt_uuid, title" |
| 1029 | " FROM ticket, ticketchng" |
| 1030 | " WHERE ticket.tkt_id = ticketchng.tkt_id" |
| 1031 | " AND tkt_uuid GLOB '%q*'" |
| 1032 | " GROUP BY tkt_uuid" |
| 1033 | " ORDER BY tkt_ctime DESC", z); |
| 1034 | while( db_step(&q)==SQLITE_ROW ){ |
| 1035 | int rid = db_column_int(&q, 0); |
| 1036 | const char *zUuid = db_column_text(&q, 1); |
| 1037 | const char *zTitle = db_column_text(&q, 2); |
| 1038 | @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> |
| 1039 | @ %s(zUuid)</a> - |
| 1040 | @ <ul></ul> |
| 1041 | @ Ticket |
| 1042 | hyperlink_to_version(zUuid); |
| 1043 | @ - %h(zTitle). |
| 1044 | @ <ul><li> |
| 1045 | object_description(rid, 0, 0, 0); |
| 1046 | @ </li></ul> |
| 1047 | @ </p></li> |
| 1048 | } |
| 1049 | db_finalize(&q); |
| 1050 | } |
| 1051 | if( g.perm.RdWiki ){ |
| 1052 | db_prepare(&q, |
| 1053 | "SELECT rid, uuid FROM" |
| 1054 | " (SELECT tagxref.rid AS rid, substr(tagname, 7) AS uuid" |
| 1055 | " FROM tagxref, tag WHERE tagxref.tagid = tag.tagid" |
| 1056 | " AND tagname GLOB 'event-%q*') GROUP BY uuid", z); |
| 1057 | while( db_step(&q)==SQLITE_ROW ){ |
| 1058 | int rid = db_column_int(&q, 0); |
| 1059 | const char* zUuid = db_column_text(&q, 1); |
| 1060 | @ <li><p><a href="%R/%T(zSrc)/%!S(zUuid)"> |
| 1061 | @ %s(zUuid)</a> - |
| 1062 | @ <ul><li> |
| 1063 | object_description(rid, 0, 0, 0); |
| 1064 | @ </li></ul> |
| 1065 | @ </p></li> |
| 1066 | } |
| 1067 | db_finalize(&q); |
| 1068 | } |
| 1069 | @ </ol> |
| 1070 | style_finish_page(); |
| 1071 | } |
| 1072 | |
| 1073 | /* |
| 1074 | ** Convert the name in CGI parameter zParamName into a rid and return that |
| 1075 |