Index: trunk/extensions/RecordAdmin/RecordAdmin_body.php |
— | — | @@ -396,11 +396,12 @@ |
397 | 397 | $tmp = array(); |
398 | 398 | foreach ( $records as $r ) { |
399 | 399 | $v0 = $r[$groupby[0]]; |
| 400 | + if ( !isset( $tmp[$v0] ) || !is_array( $tmp[$v0] ) ) $tmp[$v0] = array(); |
400 | 401 | if ( isset( $groupby[1] ) ) { |
401 | 402 | $v1 = $r[$groupby[1]]; |
402 | | - if ( !isset( $tmp[$v0] ) || !is_array( $tmp[$v0] ) ) $tmp[$v0] = array(); |
403 | | - $tmp[$v0][$v1] = $r; |
404 | | - } else $tmp[$v0] = $r; |
| 403 | + if ( !isset( $tmp[$v0][$v1] ) || !is_array( $tmp[$v0][$v1] ) ) $tmp[$v0][$v1] = array(); |
| 404 | + $tmp[$v0][$v1][] = $r; |
| 405 | + } else $tmp[$v0][] = $r; |
405 | 406 | } |
406 | 407 | $records = $tmp; |
407 | 408 | } |
— | — | @@ -489,7 +490,9 @@ |
490 | 491 | foreach( $records as $k1 => $v1 ) { |
491 | 492 | if ( empty( $k1 ) ) $k1 = wfMsg( 'recordadmin-notset', $groupby[0] ); |
492 | 493 | $tmp[] = "$td<h2>$k1</h2></td>\n"; |
| 494 | + print "---->$k1<br>"; |
493 | 495 | foreach( $v1 as $k2 => $v2 ) { |
| 496 | + print "-------->$k2:$v2<br>"; |
494 | 497 | if ( isset( $groupby[1] ) ) { |
495 | 498 | if ( empty( $k2 ) ) $k2 = wfMsg( 'recordadmin-notset', $groupby[1] ); |
496 | 499 | $tmp[] = "$td<h3>$k2</h3></td>\n"; |
Index: trunk/extensions/RecordAdmin/RecordAdmin.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | * @licence GNU General Public Licence 2.0 or later |
13 | 13 | */ |
14 | 14 | |
15 | | -define( 'RECORDADMIN_VERSION', '0.10.0, 2010-01-18' ); |
| 15 | +define( 'RECORDADMIN_VERSION', '0.10.1, 2010-01-19' ); |
16 | 16 | |
17 | 17 | $wgRecordAdminUseNamespaces = false; # Whether record articles should be in a namespace of the same name as their type |
18 | 18 | $wgRecordAdminCategory = 'Records'; # Category containing record types |