From e311f9d3808ce5b70f04f2a89dfc146211ade21c Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Wed, 27 Jan 2010 22:02:49 +0000 Subject: [PATCH] * (bug 21922) YAML output should quote asterisk when used as key --- RELEASE-NOTES | 1 + includes/api/ApiFormatYaml_spyc.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 7d674d7985..f93d672094 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -803,6 +803,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 22245) blfilterredirect=nonredirects in blredirect mode wrongly filtering * (bug 22248) Output extension URLs in meta=siteinfo&siprop=extensions * Support key-params arrays in 'descriptionmsg' in meta=siteinfo&siprop=extensions +* (bug 21922) YAML output should quote asterisk when used as key === Languages updated in 1.16 === diff --git a/includes/api/ApiFormatYaml_spyc.php b/includes/api/ApiFormatYaml_spyc.php index d148fbb0ca..240a3e1089 100644 --- a/includes/api/ApiFormatYaml_spyc.php +++ b/includes/api/ApiFormatYaml_spyc.php @@ -185,6 +185,9 @@ class Spyc { else $string = $spaces . "-\n"; } else { + if ($key == '*') //https://bugzilla.wikimedia.org/show_bug.cgi?id=21922 - Quote asterix used as keys + $key = "'{$key}'"; + // It's mapped if ( $value !== '' && !is_null( $value ) ) $string = $spaces . $key . ': ' . $value . "\n"; -- 2.20.1