mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
This commit is contained in:
parent
d0da4199ae
commit
18dc7c783e
3 changed files with 105 additions and 33 deletions
|
@ -141,4 +141,10 @@ $_t["en"]["Search by"] = "Search by";
|
|||
|
||||
$_t["en"]["Submitter"] = "Submitter";
|
||||
|
||||
$_t["en"]["All"] = "All";
|
||||
|
||||
$_t["en"]["Unsafe"] = "Unsafe";
|
||||
|
||||
$_t["en"]["Status"] = "Status";
|
||||
|
||||
?>
|
|
@ -81,7 +81,7 @@ $_t["pt"]["Manage"] = "Gerenciar";
|
|||
|
||||
$_t["pt"]["Sort by"] = "Ordenar por";
|
||||
|
||||
$_t["pt"]["Sort order"] = "Ordem de Ordenação";
|
||||
$_t["pt"]["Sort order"] = "Ordem";
|
||||
|
||||
$_t["pt"]["Ascending"] = "Ascendente";
|
||||
|
||||
|
@ -139,4 +139,12 @@ $_t["pt"]["Last Updated"] = "Últimos Pacotes Atualizados";
|
|||
|
||||
$_t["pt"]["Search by"] = "Pesquisar por";
|
||||
|
||||
$_t["pt"]["Submitter"] = "Colaborador";
|
||||
|
||||
$_t["pt"]["All"] = "Todos";
|
||||
|
||||
$_t["pt"]["Unsafe"] = "Não Seguro";
|
||||
|
||||
$_t["pt"]["Status"] = "Status";
|
||||
|
||||
?>
|
|
@ -726,7 +726,41 @@ function pkg_search_page($SID="") {
|
|||
print " </select>\n";
|
||||
print "</td>\n";
|
||||
|
||||
/* print "<td align='right'>\n";
|
||||
/* Status Safe-Unsafe */
|
||||
|
||||
# Added the code below to handle the safe package flag.
|
||||
# So we can search for then for 'all' packages, 'safe'
|
||||
# packages and 'unsafe' packages.
|
||||
# Added by: dsa <dsandrade@gmail.com> "Happily breaking the lang files ;oD" (Joking)
|
||||
|
||||
print "<td align='right'>\n";
|
||||
print " <span class='f5'><span class='blue'>".__("Status");
|
||||
print "</span></span><br />\n";
|
||||
|
||||
print " <select name='PaS'>\n";
|
||||
|
||||
# Flagged Safe
|
||||
print " <option value=all";
|
||||
$_REQUEST["PaS"] == "all" ? print " selected> " : print "> ";
|
||||
print __("All")."</option>\n";
|
||||
|
||||
# Flagged Safe
|
||||
print " <option value=fs";
|
||||
$_REQUEST["PaS"] == "fs" ? print " selected> " : print "> ";
|
||||
print __("Safe")."</option>\n";
|
||||
# Unflagged Safe
|
||||
print " <option value=us";
|
||||
$_REQUEST["PaS"] == "us" ? print " selected> " : print "> ";
|
||||
print __("Unsafe")."</option>\n";
|
||||
|
||||
print " </select>\n";
|
||||
print "</td>\n";
|
||||
|
||||
/* End of Package Status */
|
||||
|
||||
/* Sort by */
|
||||
|
||||
print "<td align='right'>\n";
|
||||
print " <span class='f5'><span class='blue'>".__("Sort by");
|
||||
print "</span></span><br />\n";
|
||||
print " <select name='SB'>\n";
|
||||
|
@ -773,7 +807,9 @@ function pkg_search_page($SID="") {
|
|||
|
||||
print " </select>\n";
|
||||
print "</td>\n";
|
||||
*/
|
||||
|
||||
/* End of Sort by */
|
||||
|
||||
print "<td align='right'>\n";
|
||||
print " <span class='f5'><span class='blue'>".__("Per page");
|
||||
print "</span></span><br />\n";
|
||||
|
@ -869,6 +905,7 @@ function pkg_search_page($SID="") {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($_REQUEST["do_MyPackages"] && $SID) {
|
||||
# list packages that the user is a AUR Maintainer of, or if it the
|
||||
# vistior is a registered user, if they are the Maintainer.
|
||||
|
@ -896,7 +933,33 @@ function pkg_search_page($SID="") {
|
|||
$q.= "MaintainerUID = 0) ";
|
||||
}
|
||||
}
|
||||
|
||||
# Added the code below to handle the safe package flag.
|
||||
# So we can search for then for 'all' packages, 'safe'
|
||||
# packages and 'unsafe' packages.
|
||||
# Added by: dsa <dsandrade@gmail.com>
|
||||
if ($_REQUEST["PaS"] <> "all") {
|
||||
# Flagged Safe
|
||||
if ($_REQUEST["PaS"] == "fs")
|
||||
if (!$has_where) {
|
||||
$q.= "WHERE Safe = 1 ";
|
||||
$has_where = 1;
|
||||
} else {
|
||||
$q.= "AND Safe = 1 ";
|
||||
}
|
||||
|
||||
# Unflagged Safe
|
||||
if ($_REQUEST["PaS"] == "us")
|
||||
if (!$has_where) {
|
||||
$q.= "WHERE Safe = 0 ";
|
||||
$has_where = 1;
|
||||
} else {
|
||||
$q.= "AND Safe = 0 ";
|
||||
}
|
||||
}
|
||||
|
||||
$order = $_REQUEST["SO"] == 'd' ? 'DESC' : 'ASC';
|
||||
|
||||
switch ($_REQUEST["SB"]) {
|
||||
case 'c':
|
||||
$q.= "ORDER BY CategoryID ".$order.", Name ASC, LocationID ASC ";
|
||||
|
@ -1033,12 +1096,6 @@ function pkg_search_page($SID="") {
|
|||
# }
|
||||
print "</tr>\n";
|
||||
|
||||
# Solve the sorting problem, so we can force the
|
||||
# passage of the sorting params to the next pages.
|
||||
# Added by: dsa <dsandrade@gmail.com>
|
||||
print "<input type='hidden' name='SB' value='".$_REQUEST['SB']."' >";
|
||||
print "<input type='hidden' name='SO' value='".$_REQUEST['SO']."' >";
|
||||
|
||||
for ($i=0; $row = mysql_fetch_assoc($result); $i++) {
|
||||
(($i % 2) == 0) ? $c = "data1" : $c = "data2";
|
||||
print "<tr>\n";
|
||||
|
@ -1079,6 +1136,7 @@ function pkg_search_page($SID="") {
|
|||
}
|
||||
reset($pkgsearch_vars);
|
||||
$url.= "'>";
|
||||
|
||||
if ($row["Safe"] == 1 || $locs[$row["LocationID"]] == "community") {
|
||||
$url.="<span class='green'>";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue