mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
fixed up a bunch of dummy package things and added a message saying teh upload was successful
This commit is contained in:
parent
15ade606f6
commit
341e4e5fa7
3 changed files with 18 additions and 8 deletions
|
@ -488,7 +488,9 @@ if ($_COOKIE["AURSID"]) {
|
||||||
print __("Sorry, uploads are not permitted by this server.");
|
print __("Sorry, uploads are not permitted by this server.");
|
||||||
print "<br />\n";
|
print "<br />\n";
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
print __("Package upload successful");
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
# visitor is not logged in
|
# visitor is not logged in
|
||||||
|
|
|
@ -196,4 +196,9 @@ $_t["en"]["You must supply a comment for this upload/change."] = "You must suppl
|
||||||
# $_t["fr"]["You must supply a comment for this upload/change."] = "--> Traduction française ici. <--";
|
# $_t["fr"]["You must supply a comment for this upload/change."] = "--> Traduction française ici. <--";
|
||||||
# $_t["de"]["You must supply a comment for this upload/change."] = "--> Deutsche Übersetzung hier. <--";
|
# $_t["de"]["You must supply a comment for this upload/change."] = "--> Deutsche Übersetzung hier. <--";
|
||||||
|
|
||||||
|
$_t["en"]["Package upload successful"] = "Package upload successful";
|
||||||
|
# $_t["es"]["Package upload successful"] = "--> Traducción española aquí. <--";
|
||||||
|
# $_t["fr"]["Package upload successful"] = "--> Traduction française ici. <--";
|
||||||
|
# $_t["de"]["Package upload successful"] = "--> Deutsche Übersetzung hier. <--";
|
||||||
|
|
||||||
?>
|
?>
|
|
@ -103,7 +103,7 @@ function package_dependencies($pkgid=0) {
|
||||||
$deps = array();
|
$deps = array();
|
||||||
if ($pkgid) {
|
if ($pkgid) {
|
||||||
$dbh = db_connect();
|
$dbh = db_connect();
|
||||||
$q = "SELECT DepPkgID, Name FROM PackageDepends, Packages ";
|
$q = "SELECT DepPkgID, Name, DummyPkg FROM PackageDepends, Packages ";
|
||||||
$q.= "WHERE PackageDepends.DepPkgID = Packages.ID ";
|
$q.= "WHERE PackageDepends.DepPkgID = Packages.ID ";
|
||||||
$q.= "AND PackageDepends.PackageID = ".mysql_escape_string($pkgid);
|
$q.= "AND PackageDepends.PackageID = ".mysql_escape_string($pkgid);
|
||||||
$q.= " ORDER BY Name";
|
$q.= " ORDER BY Name";
|
||||||
|
@ -131,9 +131,9 @@ function create_dummy($pname="", $sid="") {
|
||||||
# Insert the dummy
|
# Insert the dummy
|
||||||
#
|
#
|
||||||
$q = "INSERT INTO Packages (Name, Description, URL, SubmittedTS, ";
|
$q = "INSERT INTO Packages (Name, Description, URL, SubmittedTS, ";
|
||||||
$q.= "SubmitterUID) VALUES ('";
|
$q.= "SubmitterUID, DummyPkg) VALUES ('";
|
||||||
$q.= mysql_escape_string($pname)."', 'A dummy package', '/#', ";
|
$q.= mysql_escape_string($pname)."', 'A dummy package', '/#', ";
|
||||||
$q.= "UNIX_TIMESTAMP(), ".$uid.")";
|
$q.= "UNIX_TIMESTAMP(), ".$uid.", 1)";
|
||||||
$result = db_query($q, $dbh);
|
$result = db_query($q, $dbh);
|
||||||
if (!$result) {
|
if (!$result) {
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -197,7 +197,7 @@ function package_details($id=0) {
|
||||||
$q.= "FROM Packages,PackageLocations,PackageCategories ";
|
$q.= "FROM Packages,PackageLocations,PackageCategories ";
|
||||||
$q.= "WHERE Packages.LocationID = PackageLocations.ID ";
|
$q.= "WHERE Packages.LocationID = PackageLocations.ID ";
|
||||||
$q.= "AND Packages.CategoryID = PackageCategories.ID ";
|
$q.= "AND Packages.CategoryID = PackageCategories.ID ";
|
||||||
$q.= "ANd Packages.ID = ".intval($_REQUEST["ID"]);
|
$q.= "AND Packages.ID = ".intval($_REQUEST["ID"]);
|
||||||
$dbh = db_connect();
|
$dbh = db_connect();
|
||||||
$results = db_query($q, $dbh);
|
$results = db_query($q, $dbh);
|
||||||
if (!$results) {
|
if (!$results) {
|
||||||
|
@ -262,7 +262,7 @@ function package_details($id=0) {
|
||||||
print "<tr><td class='boxSoftTitle'><span class='f3'>";
|
print "<tr><td class='boxSoftTitle'><span class='f3'>";
|
||||||
print "Dependencies</span></td></tr>\n";
|
print "Dependencies</span></td></tr>\n";
|
||||||
print "<tr><td class='boxSoft'>";
|
print "<tr><td class='boxSoft'>";
|
||||||
$deps = package_dependencies($row["ID"]); # $deps[0] = array('id','name');
|
$deps = package_dependencies($row["ID"]); # $deps[0] = array('id','name', 'dummy');
|
||||||
while (list($k, $darr) = each($deps)) {
|
while (list($k, $darr) = each($deps)) {
|
||||||
$url = "<a href='/packages.php?do_Details=1&ID=".$darr[0];
|
$url = "<a href='/packages.php?do_Details=1&ID=".$darr[0];
|
||||||
while(list($k, $var) = each($pkgsearch_vars)) {
|
while(list($k, $var) = each($pkgsearch_vars)) {
|
||||||
|
@ -273,7 +273,8 @@ function package_details($id=0) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
reset($pkgsearch_vars);
|
reset($pkgsearch_vars);
|
||||||
print $url."'>".$darr[1]."</a><br />\n";
|
if ($darr[2] == 0) print $url."'>".$darr[1]."</a><br />\n";
|
||||||
|
else print "<a href='#'>".$darr[1]."</a><br />\n";
|
||||||
}
|
}
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
print "</table></td>";
|
print "</table></td>";
|
||||||
|
@ -466,7 +467,9 @@ function pkg_search_page($SID="") {
|
||||||
# $q.= "FROM Packages LEFT JOIN PackageVotes ";
|
# $q.= "FROM Packages LEFT JOIN PackageVotes ";
|
||||||
# $q.= "ON Packages.ID = PackageVotes.PackageID ";
|
# $q.= "ON Packages.ID = PackageVotes.PackageID ";
|
||||||
$q = "SELECT * FROM Packages ";
|
$q = "SELECT * FROM Packages ";
|
||||||
$has_where = 0;
|
$q.= "WHERE DummyPkg != 1 ";
|
||||||
|
$has_where = 1;
|
||||||
|
|
||||||
if (intval($_REQUEST["L"])) {
|
if (intval($_REQUEST["L"])) {
|
||||||
$q.= "WHERE LocationID = ".intval($_REQUEST["L"])." ";
|
$q.= "WHERE LocationID = ".intval($_REQUEST["L"])." ";
|
||||||
$has_where = 1;
|
$has_where = 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue