summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2011-01-31 12:39:09 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2011-02-01 12:41:15 +0100
commit7a58e99eab21449dd8815776bf0dd871d00fe7a4 (patch)
treefee69c8cc319ddf61957dd763cca2435738f7319 /web/html
parent7f5af61c884b53a75a2b7f8b5146465f14a71f6b (diff)
downloadaurweb-7a58e99eab21449dd8815776bf0dd871d00fe7a4.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.php5
1 files changed, 1 insertions, 4 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index bd23354..df9f931 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;
}