distroquery: give download link for correct arch in search results
This commit is contained in:
parent
c7f47f3adf
commit
779f6a7fe9
@ -616,14 +616,26 @@ void printQueryResponse() {
|
||||
sqlite3_column_text(statement,1));*/
|
||||
|
||||
/* download */
|
||||
printf("<div style='display:inline;background-color:green'>"
|
||||
" <a href=\"%s%s/SRPMS.base/%s-%s-%s.src.rpm\" style=\"color:white\">%s</a> </div>",
|
||||
query_repositories[i]->download_prefix,
|
||||
query_repositories[i]->download_dir,
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")),
|
||||
_("Download"));
|
||||
if (!query_repositories[i]->arch[a]) {
|
||||
printf("<div style='display:inline;background-color:green'>"
|
||||
" <a href=\"%s%s/SRPMS.base/%s-%s-%s.src.rpm\" style=\"color:white\">%s</a> </div>",
|
||||
query_repositories[i]->download_prefix,
|
||||
query_repositories[i]->download_dir,
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")),
|
||||
_("Download"));
|
||||
} else {
|
||||
printf("<div style='display:inline;background-color:green'>"
|
||||
" <a href=\"%s%s/SRPMS.base/%s-%s-%s.%s.rpm\" style=\"color:white\">%s</a> </div>",
|
||||
query_repositories[i]->download_prefix,
|
||||
query_repositories[i]->download_dir,
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "name")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "version")),
|
||||
sqlite3_column_text(statement,sqlite3_find_column_id(statement, NULL, "release")),
|
||||
query_repositories[i]->arch[a],
|
||||
_("Download"));
|
||||
}
|
||||
|
||||
/* details */
|
||||
printf(" <div style='display:inline;background-color:lightblue;font-weight:strong'>"
|
||||
|
Loading…
Reference in New Issue
Block a user