pkgfuncs.inc: Fix indentation.

Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
Loui Chang 2009-03-03 12:11:49 -05:00
parent bbc05414cf
commit c949296a08

View file

@ -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
# 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';
}