Index: trunk/extensions/Gadgets/Gadgets.php |
— | — | @@ -126,10 +126,15 @@ |
127 | 127 | |
128 | 128 | $options = array(); |
129 | 129 | foreach( $gadgets as $section => $thisSection ) { |
130 | | - $section = wfMsgExt( "gadget-section-$section", 'parseinline' ); |
131 | | - $options[$section] = array(); |
| 130 | + if ( $section !== '' ) { |
| 131 | + $section = wfMsgExt( "gadget-section-$section", 'parseinline' ); |
| 132 | + $options[$section] = array(); |
| 133 | + $destination = &$options[$section]; |
| 134 | + } else { |
| 135 | + $destination = &$options; |
| 136 | + } |
132 | 137 | foreach( $thisSection as $gname => $code ) { |
133 | | - $options[$section][wfMsgExt( "gadget-$gname", 'parseinline' )] = $gname; |
| 138 | + $destination[wfMsgExt( "gadget-$gname", 'parseinline' )] = $gname; |
134 | 139 | } |
135 | 140 | } |
136 | 141 | |