Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -10,7 +10,7 @@ |
11 | 11 | * @author Siebrand Mazeland |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | | -define( 'RECORDADMIN_VERSION', '1.2.3, 2011-06-08' ); |
| 14 | +define( 'RECORDADMIN_VERSION', '1.2.4, 2011-06-21' ); |
15 | 15 | |
16 | 16 | $dir = dirname( __FILE__ ) . '/'; |
17 | 17 | $wgExtensionMessagesFiles['RecordAdmin'] = $dir . 'RecordAdmin.i18n.php'; |
Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -118,14 +118,17 @@ |
119 | 119 | for( j = 0; j < tags.length; j++ ) { |
120 | 120 | var inputs = form.getElementsByTagName( tags[j] ); |
121 | 121 | for( k = 0; k < inputs.length; k++ ) { |
122 | | - var multi = jQuery( inputs[k] ).val(); |
123 | | - if( typeof( multi ) == 'object' ) multi = multi.join('\\n'); |
124 | | - var key = type + ':' + inputs[k].getAttribute('name'); |
125 | | - var hidden = jQuery( document.createElement( 'input' ) ); |
126 | | - hidden.attr( 'name', key ); |
127 | | - hidden.attr( 'type', 'hidden' ); |
128 | | - hidden.val( multi ); |
129 | | - jQuery( '#editform' ).append( hidden ); |
| 122 | + var input = jQuery( inputs[k] ); |
| 123 | + if( input.attr('type') != 'checkbox' || input.attr('checked') ) { |
| 124 | + var multi = input.val(); |
| 125 | + if( typeof( multi ) == 'object' ) multi = multi.join('\\n'); |
| 126 | + var key = type + ':' + inputs[k].getAttribute('name'); |
| 127 | + var hidden = jQuery( document.createElement( 'input' ) ); |
| 128 | + hidden.attr( 'name', key ); |
| 129 | + hidden.attr( 'type', 'hidden' ); |
| 130 | + hidden.val( multi ); |
| 131 | + jQuery( '#editform' ).append( hidden ); |
| 132 | + } |
130 | 133 | } |
131 | 134 | } |
132 | 135 | } |
— | — | @@ -149,8 +152,6 @@ |
150 | 153 | |
151 | 154 | # Organise the posted record data |
152 | 155 | $data = array(); |
153 | | -#print_r($_REQUEST); |
154 | | -#die; |
155 | 156 | foreach( $_REQUEST as $key => $value ) { |
156 | 157 | if( preg_match( "|(.+):ra_(.+)|", $key, $m ) ) { |
157 | 158 | if( is_array( $value ) ) $value = join( "\n", $value ); |