summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2013-09-20 19:46:51 +0200
committerThomas Bruederli <thomas@roundcube.net>2013-09-20 19:46:51 +0200
commit012a65af50b93e0529720a48db6a34974a92c37c (patch)
tree573ec47875f6c6ff87386b89c4b0efe1f51a5277
parent8e785956c1f69526aa34eb1c8d507c02d10f6400 (diff)
Use XML nodes as iterator
-rwxr-xr-xbin/package2composer.sh17
1 files changed, 8 insertions, 9 deletions
diff --git a/bin/package2composer.sh b/bin/package2composer.sh
index 165018d2f..cb43644e7 100755
--- a/bin/package2composer.sh
+++ b/bin/package2composer.sh
@@ -54,18 +54,17 @@ if ($package->license) {
}
if ($package->lead) {
- $data['authors'][] = array(
- 'name' => strval($package->lead->name),
- 'email' => strval($package->lead->email),
- 'role' => 'Lead',
- );
+ foreach ($package->lead as $lead) {
+ $data['authors'][] = array(
+ 'name' => strval($lead->name),
+ 'email' => strval($lead->email),
+ 'role' => 'Lead',
+ );
+ }
}
if ($devs = $package->developer) {
- if (!is_array($devs)) {
- $devs = array($package->developer);
- }
- foreach ($devs as $dev) {
+ foreach ($package->developer as $dev) {
$data['authors'][] = array(
'name' => strval($dev->name),
'email' => strval($dev->email),