mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Tweaks of various page layouts and handling of data
This is a patch that fixes a lot of little things: * We no longer have pkgsearch or pkgdetails link functions and all references to them are gone, that's what a back button is for and if we really need it we can come up with something better * No longer have do_Details variable, this means links on the package search are simply ?ID=foo * On the pkgdetails pages when there are either no deps, deps by, sources or comments for a package the list for each will display "None" instead of nothing at all (ruining the layout) * Fixed a bug where if a package had no sources or no deps pkgsubmit.php would submit an empty one * Translation of the word "Search'" has been changed to "Search" Most of these relate to each other. Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
This commit is contained in:
parent
dbbf50ac90
commit
d4b07f2b33
15 changed files with 189 additions and 245 deletions
|
@ -92,9 +92,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print __("You did not select any packages to flag.");
|
||||
print "</p>\n";
|
||||
}
|
||||
|
||||
pkgsearch_results_link();
|
||||
|
||||
}
|
||||
|
||||
} elseif (isset($_REQUEST["do_UnFlag"])) {
|
||||
|
@ -131,7 +128,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print "</p>\n";
|
||||
}
|
||||
|
||||
pkgsearch_results_link();
|
||||
|
||||
}
|
||||
|
||||
|
@ -187,7 +183,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print "</p>\n";
|
||||
}
|
||||
|
||||
pkgsearch_results_link();
|
||||
|
||||
}
|
||||
|
||||
|
@ -295,7 +290,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print __("You did not select any packages to delete.");
|
||||
print "</p>\n";
|
||||
} # end if (!empty($ids))
|
||||
pkgsearch_results_link();
|
||||
} # end if (!atype)
|
||||
|
||||
} elseif (isset($_REQUEST["do_Adopt"])) {
|
||||
|
@ -353,9 +347,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print __("You did not select any packages to adopt.");
|
||||
print "</p>\n";
|
||||
}
|
||||
|
||||
pkgsearch_results_link();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -414,13 +405,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print __("You did not select any packages to vote for.");
|
||||
print "</p>\n";
|
||||
}
|
||||
|
||||
if (isset($_REQUEST["ID"])) {
|
||||
pkgdetails_link($_REQUEST["ID"]);
|
||||
} else {
|
||||
pkgsearch_results_link();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -471,28 +455,19 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print __("You did not select any packages to un-vote for.");
|
||||
print "</p>\n";
|
||||
}
|
||||
|
||||
if (isset($_REQUEST["ID"])) {
|
||||
pkgdetails_link($_REQUEST["ID"]);
|
||||
} else {
|
||||
pkgsearch_results_link();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
} elseif (isset($_REQUEST["do_Details"])) {
|
||||
} elseif (isset($_REQUEST["ID"])) {
|
||||
|
||||
if (!isset($_REQUEST["ID"]) || !intval($_REQUEST["ID"])) {
|
||||
if (!intval($_REQUEST["ID"])) {
|
||||
print __("Error trying to retrieve package details.")."<br />\n";
|
||||
|
||||
} else {
|
||||
package_details($_REQUEST["ID"], $_COOKIE["AURSID"]);
|
||||
}
|
||||
|
||||
print "<br />\n";
|
||||
# FIXME: If someone hits the detail page's vote button, this link dies
|
||||
pkgsearch_results_link();
|
||||
|
||||
} elseif (isset($_REQUEST["do_Notify"])) {
|
||||
# I realize that the implementation here seems a bit convoluted, but we want to
|
||||
|
@ -532,7 +507,6 @@ if (isset($_REQUEST["do_Flag"])) {
|
|||
print '<br /></p>';
|
||||
}
|
||||
}
|
||||
pkgdetails_link($pid);
|
||||
} else {
|
||||
print '<p>';
|
||||
print __("Couldn't add to notification list.");
|
||||
|
|
|
@ -58,7 +58,6 @@ if ($_REQUEST["del_Comment"]) {
|
|||
} else {
|
||||
print __("Missing comment ID.")."<br />\n";
|
||||
}
|
||||
pkgdetails_link($_REQUEST["ID"]);
|
||||
html_footer(AUR_VERSION);
|
||||
exit();
|
||||
}
|
||||
|
@ -76,8 +75,7 @@ if ($_REQUEST["add_Comment"]) {
|
|||
$q.= "'".mysql_real_escape_string($_REQUEST["comment"])."', ";
|
||||
$q.= "UNIX_TIMESTAMP())";
|
||||
db_query($q, $dbh);
|
||||
print __("Comment has been added.")."<br /> <br />\n";
|
||||
pkgdetails_link($_REQUEST["ID"]);
|
||||
print __("Comment has been added.");
|
||||
|
||||
# Send email notifications
|
||||
#
|
||||
|
@ -144,8 +142,6 @@ if ($_REQUEST["change_Category"]) {
|
|||
} else {
|
||||
print __("Invalid category ID.")."<br />\n";
|
||||
}
|
||||
pkgdetails_link($_REQUEST["ID"]);
|
||||
|
||||
} else {
|
||||
# Prompt visitor for new category_id
|
||||
#
|
||||
|
@ -179,10 +175,7 @@ if ($_REQUEST["change_Category"]) {
|
|||
|
||||
print __("You've found a bug if you see this....")."<br />\n";
|
||||
|
||||
html_footer(AUR_VERSION); # Use the $Id$ keyword
|
||||
# NOTE: when checking in a new file, use
|
||||
# 'svn propset svn:keywords "Id" filename.php'
|
||||
# to tell svn to expand the "Id" keyword.
|
||||
html_footer(AUR_VERSION);
|
||||
|
||||
# vim: ts=2 sw=2 noet ft=php
|
||||
?>
|
||||
|
|
|
@ -421,11 +421,15 @@ if ($_COOKIE["AURSID"]) {
|
|||
db_query($q, $dbh);
|
||||
}
|
||||
|
||||
$sources = explode(" ", $new_pkgbuild['source']);
|
||||
while (list($k, $v) = each($sources)) {
|
||||
$q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
|
||||
$q .= $pdata["ID"].", '".mysql_real_escape_string($v)."')";
|
||||
db_query($q, $dbh);
|
||||
# Insert sources, if they don't exist don't inser them
|
||||
#
|
||||
if ($new_pkgbuild['source'] != "") {
|
||||
$sources = explode(" ", $new_pkgbuild['source']);
|
||||
while (list($k, $v) = each($sources)) {
|
||||
$q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
|
||||
$q .= $pdata["ID"].", '".mysql_real_escape_string($v)."')";
|
||||
db_query($q, $dbh);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
# this is a brand new package
|
||||
|
@ -483,11 +487,15 @@ if ($_COOKIE["AURSID"]) {
|
|||
db_query($q, $dbh);
|
||||
}
|
||||
|
||||
$sources = explode(" ", $new_pkgbuild['source']);
|
||||
while (list($k, $v) = each($sources)) {
|
||||
$q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
|
||||
$q .= $packageID.", '".mysql_real_escape_string($v)."')";
|
||||
db_query($q, $dbh);
|
||||
# insert sources
|
||||
#
|
||||
if ($new_pkgbuild['source'] != "") {
|
||||
$sources = explode(" ", $new_pkgbuild['source']);
|
||||
while (list($k, $v) = each($sources)) {
|
||||
$q = "INSERT INTO PackageSources (PackageID, Source) VALUES (";
|
||||
$q .= $packageID.", '".mysql_real_escape_string($v)."')";
|
||||
db_query($q, $dbh);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue