summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjchu <jchu>2004-12-15 05:18:13 +0100
committerjchu <jchu>2004-12-15 05:18:13 +0100
commitef54765888ddfbc809225812269d9d564e2d7c5d (patch)
tree9535b02c55eee7714b5e0d997aa5614e7dd54af2
parentc318db3afc53d9e65c7caf937737b1d0c39fdca3 (diff)
downloadaur-ef54765888ddfbc809225812269d9d564e2d7c5d.tar.gz
aur-ef54765888ddfbc809225812269d9d564e2d7c5d.tar.xz
added contents
-rw-r--r--web/html/pkgsubmit.php24
1 files changed, 20 insertions, 4 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 68af25e3..27535ad3 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -332,9 +332,16 @@ if ($_COOKIE["AURSID"]) {
$q .= "WHERE ID = " . $pdata["ID"];
$result = db_query($q, $dbh);
- # TODO Need to contents
-
-# while (list($k, $line) = each($lines)) {
+ # update package contents
+ #
+ while (list($k, $v) = each($pkg_contents)) {
+ $q = "INSERT INTO PackageContents (PackageID, FSPath, URLPath, FileSize) VALUES (";
+ $q.= $pdata['ID'].", ";
+ $q.= "'".$INCOMING_DIR.$pkg_name."/".$pkg_name."/".$k."', ";
+ $q.= "'".$URL_DIR.$pkg_name."/".$pkg_name."/".$k."', ";
+ $q.= $v.")";
+ db_query($q);
+ }
# update package depends
#
@@ -370,7 +377,16 @@ if ($_COOKIE["AURSID"]) {
$packageID = mysql_insert_id($dbh);
- # TODO Need to contents
+ # update package contents
+ #
+ while (list($k, $v) = each($pkg_contents)) {
+ $q = "INSERT INTO PackageContents (PackageID, FSPath, URLPath, FileSize) VALUES (";
+ $q.= $packageID.", ";
+ $q.= "'".$INCOMING_DIR.$pkg_name."/".$pkg_name."/".$k."', ";
+ $q.= "'".$URL_DIR.$pkg_name."/".$pkg_name."/".$k."', ";
+ $q.= $v.")";
+ db_query($q);
+ }
# update package depends
#