Index: trunk/extensions/DynamicSidebar/DynamicSidebar.body.php |
— | — | @@ -30,18 +30,18 @@ |
31 | 31 | // Replace the GROUP-SIDEBAR entry with the group's sidebar |
32 | 32 | $groupSB = array(); |
33 | 33 | $skin->addToSidebarPlain( $groupSB, self::doGroupSidebar() ); |
34 | | - array_splice( $sidebar, array_search( 'GROUP-SIDEBAR', $sidebar ), 1, $groupSB ); |
| 34 | + array_splice( $sidebar, array_search( 'GROUP-SIDEBAR', array_keys( $sidebar ), true ), 1, $groupSB ); |
35 | 35 | } |
36 | 36 | if ( $wgDynamicSidebarUseUserpages && isset( $sidebar['USER-SIDEBAR'] ) ) { |
37 | 37 | // Replace the USER-SIDEBAR entry with the user's sidebar |
38 | 38 | $userSB = array(); |
39 | 39 | $skin->addToSidebarPlain( $userSB, self::doUserSidebar() ); |
40 | | - array_splice( $sidebar, array_search( 'USER-SIDEBAR', $sidebar ), 1, $userSB ); |
| 40 | + array_splice( $sidebar, array_search( 'USER-SIDEBAR', array_keys( $sidebar ), true ), 1, $userSB ); |
41 | 41 | } |
42 | 42 | if ( $wgDynamicSidebarUseCategories && isset( $sidebar['CATEGORY-SIDEBAR'] ) ) { |
43 | 43 | $catSB = array(); |
44 | 44 | $skin->addToSidebarPlain( $catSB, self::doCategorySidebar() ); |
45 | | - array_splice( $sidebar, array_search( 'CATEGORY-SIDEBAR', $sidebar ), 1, $catSB ); |
| 45 | + array_splice( $sidebar, array_search( 'CATEGORY-SIDEBAR', array_keys( $sidebar ), true ), 1, $catSB ); |
46 | 46 | } |
47 | 47 | return true; |
48 | 48 | } |