From fdd3b8be57ea454e7f5afaa13d4867c7bbb61d13 Mon Sep 17 00:00:00 2001 From: jchu Date: Wed, 15 Dec 2004 04:38:24 +0000 Subject: apply all substitutions on all other variables --- web/html/pkgsubmit.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'web/html') diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php index 27535ad..fe8e96b 100644 --- a/web/html/pkgsubmit.php +++ b/web/html/pkgsubmit.php @@ -289,15 +289,15 @@ if ($_COOKIE["AURSID"]) { # substituions. # if (!$error) { - $pkgname_var = $pkgbuild["pkgname"]; - $pkgver_var = $pkgbuild["pkgver"]; - $new_pkgbuild = array(); - while (list($k, $v) = each($pkgbuild)) { - $v = str_replace("\$pkgname", $pkgname_var, $v); - $v = str_replace("\${pkgname}", $pkgname_var, $v); - $v = str_replace("\$pkgver", $pkgver_var, $v); - $v = str_replace("\${pkgver}", $pkgver_var, $v); - $new_pkgbuild[$k] = $v; + $new_pkgbuild = $pkgbuild; + print_r($new_pkgbuild); + while (list($j, $w) = each($pkgbuild)) { + while (list($k, $v) = each($new_pkgbuild)) { +# if (array_key_exists($k, $new_pkgbuild)) $v = $new_pkgbuild[$k]; + $v = str_replace("\$".$j."", $w, $v); + $v = str_replace("\${".$j."}", $w, $v); + $new_pkgbuild[$k] = $v; + } } } -- cgit v1.2.3-70-g09d2