diff options
author | jchu <jchu> | 2004-12-15 04:24:28 +0100 |
---|---|---|
committer | jchu <jchu> | 2004-12-15 04:24:28 +0100 |
commit | 341e4e5fa750420c06c319dab36581ecc5dc9381 (patch) | |
tree | dc43bf3224cbd86288695e4032baf95e448555e7 | |
parent | 15ade606f60d9a565204ef0fe232f07894fea0b8 (diff) | |
download | aur-341e4e5fa750420c06c319dab36581ecc5dc9381.tar.gz aur-341e4e5fa750420c06c319dab36581ecc5dc9381.tar.xz |
fixed up a bunch of dummy package things and added a message saying teh upload was successful
-rw-r--r-- | web/html/pkgsubmit.php | 4 | ||||
-rw-r--r-- | web/lang/submit_po.inc | 5 | ||||
-rw-r--r-- | web/lib/pkgfuncs.inc | 17 |
3 files changed, 18 insertions, 8 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 7de7f207..a12ead8b 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -488,7 +488,9 @@ if ($_COOKIE["AURSID"]) { print __("Sorry, uploads are not permitted by this server."); print "<br />\n"; } - } + } else { + print __("Package upload successful"); + } } else { # visitor is not logged in diff --git a/web/lang/submit_po.inc b/web/lang/submit_po.inc index fd1c02ce..88acd508 100644 --- a/web/lang/submit_po.inc +++ b/web/lang/submit_po.inc @@ -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["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. <--"; + ?>
\ No newline at end of file diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index b7232095..df1da05e 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -103,7 +103,7 @@ function package_dependencies($pkgid=0) { $deps = array(); if ($pkgid) { $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.= "AND PackageDepends.PackageID = ".mysql_escape_string($pkgid); $q.= " ORDER BY Name"; @@ -131,9 +131,9 @@ function create_dummy($pname="", $sid="") { # Insert the dummy # $q = "INSERT INTO Packages (Name, Description, URL, SubmittedTS, "; - $q.= "SubmitterUID) VALUES ('"; + $q.= "SubmitterUID, DummyPkg) VALUES ('"; $q.= mysql_escape_string($pname)."', 'A dummy package', '/#', "; - $q.= "UNIX_TIMESTAMP(), ".$uid.")"; + $q.= "UNIX_TIMESTAMP(), ".$uid.", 1)"; $result = db_query($q, $dbh); if (!$result) { return NULL; @@ -197,7 +197,7 @@ function package_details($id=0) { $q.= "FROM Packages,PackageLocations,PackageCategories "; $q.= "WHERE Packages.LocationID = PackageLocations.ID "; $q.= "AND Packages.CategoryID = PackageCategories.ID "; - $q.= "ANd Packages.ID = ".intval($_REQUEST["ID"]); + $q.= "AND Packages.ID = ".intval($_REQUEST["ID"]); $dbh = db_connect(); $results = db_query($q, $dbh); if (!$results) { @@ -262,7 +262,7 @@ function package_details($id=0) { print "<tr><td class='boxSoftTitle'><span class='f3'>"; print "Dependencies</span></td></tr>\n"; 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)) { $url = "<a href='/packages.php?do_Details=1&ID=".$darr[0]; while(list($k, $var) = each($pkgsearch_vars)) { @@ -273,7 +273,8 @@ function package_details($id=0) { } } 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 "</table></td>"; @@ -466,7 +467,9 @@ function pkg_search_page($SID="") { # $q.= "FROM Packages LEFT JOIN PackageVotes "; # $q.= "ON Packages.ID = PackageVotes.PackageID "; $q = "SELECT * FROM Packages "; - $has_where = 0; + $q.= "WHERE DummyPkg != 1 "; + $has_where = 1; + if (intval($_REQUEST["L"])) { $q.= "WHERE LocationID = ".intval($_REQUEST["L"])." "; $has_where = 1; |