jenkins-bot has submitted this change and it was merged.
Change subject: Do not add empty arrays
......................................................................
Do not add empty arrays
Change-Id: Ic8ffb0d9759338617a92ad171a87652aaca6ccb6
---
M CldrCurrency/Symbols.php
M rebuild.php
2 files changed, 10 insertions(+), 12 deletions(-)
Approvals:
Santhosh: Looks good to me, approved
jenkins-bot: Verified
diff --git a/CldrCurrency/Symbols.php b/CldrCurrency/Symbols.php
index 3a417d3..313cbb1 100644
--- a/CldrCurrency/Symbols.php
+++ b/CldrCurrency/Symbols.php
@@ -12,8 +12,6 @@
'ps' => '؋',
'uz' => '؋',
),
- 'ALK' => array(
- ),
'ALL' => array(
'es' => array(
'MX' => 'ALL',
@@ -413,8 +411,6 @@
),
'fr' => '$CL',
'root' => '$',
- ),
- 'CNX' => array(
),
'CNY' => array(
'ar' => 'ي.ص',
@@ -832,8 +828,6 @@
'fr' => '£IL',
'he' => 'ל״י',
),
- 'ILR' => array(
- ),
'ILS' => array(
'bg' => 'ILS',
'dz' => 'ILS',
@@ -1237,8 +1231,6 @@
'MU' => 'Rs',
),
'mfe' => 'Rs',
- ),
- 'MVP' => array(
),
'MVR' => array(
'es' => array(
diff --git a/rebuild.php b/rebuild.php
index dfb86c1..50006b2 100644
--- a/rebuild.php
+++ b/rebuild.php
@@ -400,20 +400,26 @@
if ( !is_numeric( $key ) ) {
$key = "'$key'";
}
- $ret = "$tabs$key => array(\n";
+
+ $subKeys = '';
foreach ( $value as $subkey => $subvalue ) {
if ( is_array( $subvalue ) ) {
- $ret .= $this->makePrettyArrayOuts( $subkey,
$subvalue, $level + 1 );
+ $subKeys .= $this->makePrettyArrayOuts(
$subkey, $subvalue, $level + 1 );
} else {
$subkey = addcslashes( $subkey, "'" );
$subvalue = addcslashes( $subvalue, "'" );
if ( !is_numeric( $subkey ) ) {
$subkey = "'$subkey'";
}
- $ret .= "$tabs\t$subkey => '$subvalue',\n";
+ $subKeys .= "$tabs\t$subkey => '$subvalue',\n";
}
}
- $ret .= "$tabs),\n";
+
+ if( $subKeys === '' ) {
+ $ret = '';
+ } else {
+ $ret = "$tabs$key => array(\n$subKeys$tabs),\n";
+ }
return $ret;
}
--
To view, visit https://gerrit.wikimedia.org/r/91192
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ic8ffb0d9759338617a92ad171a87652aaca6ccb6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Amire80 <[email protected]>
Gerrit-Reviewer: Katie Horn <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: Santhosh <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits