mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix FS#8622
Previous fix for this was only half implemented, links now work with both a new package and an updated one Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
This commit is contained in:
parent
b2435996dd
commit
63d70dc84a
1 changed files with 24 additions and 18 deletions
|
@ -396,22 +396,22 @@ if ($_COOKIE["AURSID"]) {
|
||||||
#
|
#
|
||||||
$depends = explode(" ", $new_pkgbuild['depends']);
|
$depends = explode(" ", $new_pkgbuild['depends']);
|
||||||
|
|
||||||
while (list($k, $v) = each($depends)) {
|
while (list($k, $v) = each($depends)) {
|
||||||
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
|
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
|
||||||
$deppkgname = preg_replace("/[<>]?=.*/", "", $v);
|
$deppkgname = preg_replace("/[<>]?=.*/", "", $v);
|
||||||
$depcondition = str_replace($deppkgname, "", $v);
|
$depcondition = str_replace($deppkgname, "", $v);
|
||||||
|
|
||||||
# Solve the problem with comments and deps
|
# Solve the problem with comments and deps
|
||||||
# added by: dsa <dsandrade@gmail.com>
|
# added by: dsa <dsandrade@gmail.com>
|
||||||
if ($deppkgname == "#")
|
if ($deppkgname == "#") { break; }
|
||||||
break;
|
|
||||||
|
|
||||||
$deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']);
|
$deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']);
|
||||||
|
|
||||||
if(!empty($depcondition))
|
if(!empty($depcondition)) {
|
||||||
$q .= $pdata["ID"].", ".$deppkgid.", '".$depcondition."')";
|
$q .= $pdata["ID"].", ".$deppkgid.", '".$depcondition."')";
|
||||||
else
|
} else {
|
||||||
$q .= $pdata["ID"].", ".$deppkgid.", '')";
|
$q .= $pdata["ID"].", ".$deppkgid.", '')";
|
||||||
|
}
|
||||||
|
|
||||||
db_query($q, $dbh);
|
db_query($q, $dbh);
|
||||||
}
|
}
|
||||||
|
@ -469,16 +469,22 @@ if ($_COOKIE["AURSID"]) {
|
||||||
#
|
#
|
||||||
$depends = explode(" ", $new_pkgbuild['depends']);
|
$depends = explode(" ", $new_pkgbuild['depends']);
|
||||||
while (list($k, $v) = each($depends)) {
|
while (list($k, $v) = each($depends)) {
|
||||||
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID) VALUES (";
|
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
|
||||||
$deppkgname = preg_replace("/[<>]?=.*/", "", $v);
|
$deppkgname = preg_replace("/[<>]?=.*/", "", $v);
|
||||||
|
$depcondition = str_replace($deppkgname, "", $v);
|
||||||
|
|
||||||
# Solve the problem with comments and deps
|
# Solve the problem with comments and deps
|
||||||
# added by: dsa <dsandrade@gmail.com>
|
# added by: dsa <dsandrade@gmail.com>
|
||||||
if ($deppkgname == "#")
|
if ($deppkgname == "#") { break; }
|
||||||
break;
|
|
||||||
|
$deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']);
|
||||||
$deppkgid = create_dummy($deppkgname, $_COOKIE['AURSID']);
|
|
||||||
$q .= $packageID.", ".$deppkgid.")";
|
if(!empty($depcondition)) {
|
||||||
|
$q .= $packageID.", ".$deppkgid.", '".$depcondition."')";
|
||||||
|
} else {
|
||||||
|
$q .= $packageID.", ".$deppkgid.", '')";
|
||||||
|
}
|
||||||
|
|
||||||
db_query($q, $dbh);
|
db_query($q, $dbh);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue