diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-01-31 12:39:09 +0100 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2011-02-01 12:41:15 +0100 |
commit | 7a58e99eab21449dd8815776bf0dd871d00fe7a4 (patch) | |
tree | fee69c8cc319ddf61957dd763cca2435738f7319 /web/html | |
parent | 7f5af61c884b53a75a2b7f8b5146465f14a71f6b (diff) | |
download | aur-7a58e99e.tar.gz aur-7a58e99e.tar.xz |
Improve PKGBUILD variable parser correctness (cf. commit 492c8c66).
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/pkgsubmit.php | 5 |
1 files changed, 1 insertions, 4 deletions
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; } |