Merge "Space out search results just ever so slightly"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 30 Jan 2014 18:35:47 +0000 (18:35 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 30 Jan 2014 18:35:47 +0000 (18:35 +0000)
includes/api/ApiFormatXml.php

index e707eb4..764e609 100644 (file)
@@ -156,6 +156,13 @@ class ApiFormatXml extends ApiFormatBase {
                                } elseif ( is_array( $subElemValue ) ) {
                                        $subElements[$subElemId] = $subElemValue;
                                        unset( $elemValue[$subElemId] );
+                               } elseif ( is_bool( $subElemValue ) ) {
+                                       // treat true as empty string, skip false in xml format
+                                       if ( $subElemValue === true ) {
+                                               $subElemValue = '';
+                                       } else {
+                                               unset( $elemValue[$subElemId] );
+                                       }
                                }
                        }