summaryrefslogtreecommitdiffstats
path: root/web/html/pkgsubmit.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-02-02 17:05:58 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-02 17:05:58 +0100
commit8e32767c70e5fc86b9d8c7b0d74971f9c201d897 (patch)
tree09f1713c9b3d60450e8111dfcaa56e28c1d3f8c0 /web/html/pkgsubmit.php
parent34ac351e82a4e774b5c0bc3380b0ff90cb5a486d (diff)
downloadaurweb-8e32767c70e5fc86b9d8c7b0d74971f9c201d897.tar.xz
Parse versioned deps correctly when using "<" or ">" (fixes FS#22679).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r--web/html/pkgsubmit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 508120c..a13a674 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -297,7 +297,7 @@ if ($_COOKIE["AURSID"]):
$depends = explode(" ", $new_pkgbuild['depends']);
foreach ($depends as $dep) {
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
- $deppkgname = preg_replace("/[<>]?=.*/", "", $dep);
+ $deppkgname = preg_replace("/(<|<=|=|>=|>).*/", "", $dep);
$depcondition = str_replace($deppkgname, "", $dep);
if ($deppkgname == "#") {
@@ -344,7 +344,7 @@ if ($_COOKIE["AURSID"]):
$depends = explode(" ", $new_pkgbuild['depends']);
foreach ($depends as $dep) {
$q = "INSERT INTO PackageDepends (PackageID, DepPkgID, DepCondition) VALUES (";
- $deppkgname = preg_replace("/[<>]?=.*/", "", $dep);
+ $deppkgname = preg_replace("/(<|<=|=|>=|>).*/", "", $dep);
$depcondition = str_replace($deppkgname, "", $dep);
if ($deppkgname == "#") {