Index: trunk/extensions/CategoryTree/CategoryTree.php |
— | — | @@ -170,7 +170,7 @@ |
171 | 171 | * Hook it up |
172 | 172 | */ |
173 | 173 | function efCategoryTree() { |
174 | | - global $wgUseAjax, $wgHooks, $wgOut; |
| 174 | + global $wgUseAjax, $wgHooks, $wgOut, $wgRequest; |
175 | 175 | global $wgCategoryTreeDefaultOptions, $wgCategoryTreeDefaultMode, $wgCategoryTreeOmitNamespace; |
176 | 176 | global $wgCategoryTreeCategoryPageOptions, $wgCategoryTreeCategoryPageMode, $wgCategoryTreeAllowTag; |
177 | 177 | global $wgCategoryTreeSidebarRoot, $wgCategoryTreeForceHeaders, $wgCategoryTreeHijackPageCategories; |
— | — | @@ -204,8 +204,8 @@ |
205 | 205 | $wgCategoryTreeDefaultOptions['hideprefix'] = $wgCategoryTreeOmitNamespace; |
206 | 206 | } |
207 | 207 | |
208 | | - if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
209 | | - $wgCategoryTreeCategoryPageOptions['mode'] = $wgCategoryTreeCategoryPageMode; |
| 208 | + if ( !isset( $wgCategoryTreeCategoryPageOptions['mode'] ) || is_null( $wgCategoryTreeCategoryPageOptions['mode'] ) ) { |
| 209 | + $wgCategoryTreeCategoryPageOptions['mode'] = ( $mode = $wgRequest->getVal( 'mode' ) ) ? CategoryTree::decodeMode( $mode ) : $wgCategoryTreeCategoryPageMode; |
210 | 210 | } |
211 | 211 | |
212 | 212 | if ( $wgCategoryTreeForceHeaders ) { |
— | — | @@ -214,7 +214,7 @@ |
215 | 215 | $wgHooks['OutputPageParserOutput'][] = 'efCategoryTreeParserOutput'; |
216 | 216 | } |
217 | 217 | |
218 | | - $wgHooks['ResourceLoaderGetConfigVars'][] = 'efCategoryTreeGetConfigVars'; |
| 218 | + $wgHooks['MakeGlobalVariablesScript'][] = 'efCategoryTreeGetConfigVars'; |
219 | 219 | } |
220 | 220 | |
221 | 221 | /** |