summaryrefslogtreecommitdiffstats
path: root/web/html/pkgsubmit.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-04-19 10:32:43 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-04-19 10:59:48 +0200
commit34453d32958cc71cf08e932368952f98b46b7020 (patch)
tree34a7775559a0262e48cd20a02145797d9e0762fc /web/html/pkgsubmit.php
parente582cfe1823617398657f1b46482f7c608b5aabe (diff)
downloadaur-34453d32958cc71cf08e932368952f98b46b7020.tar.gz
aur-34453d32958cc71cf08e932368952f98b46b7020.tar.xz
Handle pkgbase array overrides gracefully
Instead of overwriting arrays, such as depends, from the pkgbase section, new entries should be appended. Replace array_merge() with a mixture of array_merge_recursive() and array_replace_recursive() that merges array fields and replaces non-array fields. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/html/pkgsubmit.php')
-rw-r--r--web/html/pkgsubmit.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/web/html/pkgsubmit.php b/web/html/pkgsubmit.php
index 045b8f93..11206e1f 100644
--- a/web/html/pkgsubmit.php
+++ b/web/html/pkgsubmit.php
@@ -147,7 +147,7 @@ if ($uid):
if (isset($section_info['pkgbase'])) {
$pkgbase_info = $section_info;
} elseif (isset($section_info['pkgname'])) {
- $pkginfo[] = array_merge($pkgbase_info, $section_info);
+ $pkginfo[] = array_pkgbuild_merge($pkgbase_info, $section_info);
}
}
$section_info = array(
@@ -180,7 +180,7 @@ if ($uid):
if (isset($section_info['pkgbase'])) {
$pkgbase_info = $section_info;
} elseif (isset($section_info['pkgname'])) {
- $pkginfo[] = array_merge($pkgbase_info, $section_info);
+ $pkginfo[] = array_pkgbuild_merge($pkgbase_info, $section_info);
}
} else {
/* Use data from the PKGBUILD parser (deprecated!) */