diff options
author | jchu <jchu> | 2004-12-15 05:18:13 +0100 |
---|---|---|
committer | jchu <jchu> | 2004-12-15 05:18:13 +0100 |
commit | ef54765888ddfbc809225812269d9d564e2d7c5d (patch) | |
tree | 9535b02c55eee7714b5e0d997aa5614e7dd54af2 /web/html/pkgsubmit.php | |
parent | c318db3afc53d9e65c7caf937737b1d0c39fdca3 (diff) | |
download | aur-ef54765888ddfbc809225812269d9d564e2d7c5d.tar.gz aur-ef54765888ddfbc809225812269d9d564e2d7c5d.tar.xz |
added contents
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r-- | web/html/pkgsubmit.php | 24 |
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 # |