mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
added contents
This commit is contained in:
parent
c318db3afc
commit
ef54765888
1 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Add table
Reference in a new issue