mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
pkgfuncs.inc: Fix indentation.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
bbc05414cf
commit
c949296a08
1 changed files with 133 additions and 127 deletions
|
@ -392,7 +392,8 @@ function pkg_search_page($SID="") {
|
|||
$_GET['O'] = intval($_GET['O']);
|
||||
if ($_GET['O'] < 0)
|
||||
$_GET['O'] = 0;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$_GET['O'] = 0;
|
||||
}
|
||||
|
||||
|
@ -402,7 +403,8 @@ function pkg_search_page($SID="") {
|
|||
$_GET["PP"] = 25;
|
||||
else if ($_GET["PP"] > 100)
|
||||
$_GET["PP"] = 100;
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$_GET["PP"] = 25;
|
||||
}
|
||||
|
||||
|
@ -427,11 +429,12 @@ function pkg_search_page($SID="") {
|
|||
|
||||
FROM PackageCategories, PackageLocations, Packages
|
||||
LEFT JOIN Users ON (Packages.MaintainerUID = Users.ID) ";
|
||||
|
||||
if ($SID) {
|
||||
$q .= "LEFT JOIN PackageVotes
|
||||
ON (Packages.ID = PackageVotes.PackageID AND PackageVotes.UsersID = ".$myuid.")
|
||||
ON (Packages.ID = PackageVotes.PackageID AND PackageVotes.UsersID = $myuid)
|
||||
LEFT JOIN CommentNotify
|
||||
ON (Packages.ID = CommentNotify.PkgID AND CommentNotify.UserID = ".$myuid.") ";
|
||||
ON (Packages.ID = CommentNotify.PkgID AND CommentNotify.UserID = $myuid) ";
|
||||
}
|
||||
$q .= "WHERE
|
||||
Packages.CategoryID = PackageCategories.ID
|
||||
|
@ -449,15 +452,17 @@ function pkg_search_page($SID="") {
|
|||
|
||||
if ($_GET['K']) {
|
||||
$_GET['K'] = mysql_real_escape_string(trim($_GET['K']));
|
||||
//search by maintainer
|
||||
if ($_GET["SeB"] == "m"){
|
||||
# Search by maintainer
|
||||
if ($_GET["SeB"] == "m") {
|
||||
$q.= "AND Users.Username = '".$_GET['K']."' ";
|
||||
} elseif ($_GET["SeB"] == "s") {
|
||||
}
|
||||
elseif ($_GET["SeB"] == "s") {
|
||||
// FIXME: this shouldn't be making 2 queries
|
||||
// kill the call to uid_from_username
|
||||
$q.= "AND SubmitterUID = ".uid_from_username($_GET['K'])." ";
|
||||
// the default behavior, query the name/description
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$q.= "AND (Name LIKE '%".$_GET['K']."%' OR ";
|
||||
$q.= "Description LIKE '%".$_GET['K']."%') ";
|
||||
}
|
||||
|
@ -508,7 +513,8 @@ function pkg_search_page($SID="") {
|
|||
if ($_GET["SO"] == "d"){
|
||||
$SO_next="a";
|
||||
$_GET["SO"] = 'd';
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
$SO_next="d";
|
||||
$_GET["SO"] = 'a';
|
||||
}
|
||||
|
@ -517,7 +523,7 @@ function pkg_search_page($SID="") {
|
|||
// figure out the results to use
|
||||
$first = $_GET['O'] + 1;
|
||||
|
||||
if (($_GET['PP']+$_GET['O']) > $total) {
|
||||
if (($_GET['PP'] + $_GET['O']) > $total) {
|
||||
$last = $total;
|
||||
} else {
|
||||
$last = $_GET['PP'] + $_GET['O'];
|
||||
|
|
Loading…
Add table
Reference in a new issue