From 7a58e99eab21449dd8815776bf0dd871d00fe7a4 Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Mon, 31 Jan 2011 12:39:09 +0100 Subject: Improve PKGBUILD variable parser correctness (cf. commit 492c8c66). Signed-off-by: Lukas Fleischer --- web/html/pkgsubmit.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'web') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index bd233548..df9f9314 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -187,15 +187,12 @@ if ($_COOKIE["AURSID"]): if (isset($new_pkgbuild[$var])) { $replacement = explode(" ", $new_pkgbuild[$var], 2); } - elseif (isset($pkgbuild[$var]) && $var != $k) { - $replacement = explode(" ", $pkgbuild[$var], 2); - } else { $replacement = ''; } $v = substr_replace($v, $replacement, $pos, $len); - $offset += strlen($replacement); + $offset = $pos + strlen($replacement); } $new_pkgbuild[$k] = $v; } -- cgit v1.2.3-24-g4f1b