distroquery: small fixes on query_arch and arch get option
This commit is contained in:
parent
ba8b6ecf7d
commit
5b3b2caa2e
@ -82,7 +82,7 @@ static struct configTag *firstconfigtag = NULL;
|
||||
char *query = "";
|
||||
char *query_package;
|
||||
char *query_repository = "milestone2";
|
||||
char *query_arch = "i586";
|
||||
char *query_arch = NULL;
|
||||
int query_compact = 0;
|
||||
int query_limit = 10;
|
||||
int query_offset = 0;
|
||||
@ -325,13 +325,13 @@ int findFileIdFromPath(sqlite3 *db, char* path) {
|
||||
char sql[PATH_MAX];
|
||||
sqlite3_stmt* stmt1;
|
||||
|
||||
printf("[<a href='javascript:distroquery_request(\"repository=%s&query_arch=%s&file_browser=/\")'>ROOT</a>]",
|
||||
printf("[<a href='javascript:distroquery_request(\"repository=%s&arch=%s&file_browser=/\")'>ROOT</a>]",
|
||||
query_repository, query_arch);
|
||||
while (frompos < strlen(path)) {
|
||||
pt = strchr(path + frompos, '/');
|
||||
if (pt) topos = pt - path; else topos = strlen(path);
|
||||
strncpy(buffer, path + frompos, topos - frompos);
|
||||
printf("/<a href='javascript:distroquery_request(\"repository=%s&query_arch=%s&file_browser=/%s\")'>%s</a>",
|
||||
printf("/<a href='javascript:distroquery_request(\"repository=%s&arch=%s&file_browser=/%s\")'>%s</a>",
|
||||
query_repository, query_arch, buffer, buffer);
|
||||
snprintf(sql, PATH_MAX, "SELECT id FROM files WHERE parent=%d"
|
||||
" AND name='%s'", parent, buffer);
|
||||
@ -379,7 +379,7 @@ void printFileBrowser() {
|
||||
printf("<tr><td style=\"font-family:courier\">%s</td><td style=\"font-family:courier\">%s</td>"
|
||||
"<td style=\"font-family:courier\">%s</td>"
|
||||
"<td width=50%% style=\"font-family:courier\">"
|
||||
"<a href='javascript:distroquery_request(\"repository=%s&query_arch=%s&file_browser=%s/%s\")'>%s</a></td>",
|
||||
"<a href='javascript:distroquery_request(\"repository=%s&arch=%s&file_browser=%s/%s\")'>%s</a></td>",
|
||||
sqlite3_column_text(stmt2,sqlite3_find_column_id(stmt2, "fileusers", "name")),
|
||||
sqlite3_column_text(stmt2,sqlite3_find_column_id(stmt2, "filegroups", "name")),
|
||||
expandFileFlags(flags, sql),
|
||||
@ -406,7 +406,7 @@ void printFileBrowser() {
|
||||
}
|
||||
if (cnt == 0) {
|
||||
printf("<tr><td></td><td></td><td></td>"
|
||||
"<td width=50%% style=\"font-family:courier\"><a href='javascript:distroquery_request(\"repository=%s&query_arch=%s&file_browser=%s/%s\")'>%s</a></td>"
|
||||
"<td width=50%% style=\"font-family:courier\"><a href='javascript:distroquery_request(\"repository=%s&arch=%s&file_browser=%s/%s\")'>%s</a></td>"
|
||||
"<td></td></tr>",
|
||||
query_repository,
|
||||
query_arch,
|
||||
|
Loading…
Reference in New Issue
Block a user