summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjchu <jchu>2004-12-15 05:38:24 +0100
committerjchu <jchu>2004-12-15 05:38:24 +0100
commitfdd3b8be57ea454e7f5afaa13d4867c7bbb61d13 (patch)
tree2282c49439ac66fedfa92a448dfd63b38f3b5d0e
parentef54765888ddfbc809225812269d9d564e2d7c5d (diff)
downloadaur-fdd3b8be57ea454e7f5afaa13d4867c7bbb61d13.tar.gz
aur-fdd3b8be57ea454e7f5afaa13d4867c7bbb61d13.tar.xz
apply all substitutions on all other variables
-rw-r--r--web/html/pkgsubmit.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 27535ad3..fe8e96bb 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;
+ }
}
}