Index: trunk/extensions/Collection/Collection.hooks.php |
— | — | @@ -38,10 +38,15 @@ |
39 | 39 | wfLoadExtensionMessages( 'CollectionCore' ); |
40 | 40 | |
41 | 41 | $action = $wgRequest->getVal('action'); |
| 42 | + if ( method_exists( $skinTemplate, 'getTitle' ) ) { |
| 43 | + $title = $skinTemplate->getTitle(); |
| 44 | + } else { |
| 45 | + $title = $skinTemplate->mTitle; |
| 46 | + } |
42 | 47 | |
43 | 48 | if ( $skinTemplate->iscontent && ( $action == '' || $action == 'view' || $action == 'purge' ) ) { |
44 | | - if ( self::_isCollectionPage( $skinTemplate->getTitle(), $wgArticle ) ) { |
45 | | - $params = 'colltitle=' . wfUrlencode( $skinTemplate->getTitle()->getPrefixedDBKey() ); |
| 49 | + if ( self::_isCollectionPage( $title, $wgArticle ) ) { |
| 50 | + $params = 'colltitle=' . wfUrlencode( $title->getPrefixedDBKey() ); |
46 | 51 | if ( isset( $wgCollectionFormats['rl'] ) ) { |
47 | 52 | $nav_urls['printable_version_pdf'] = array( |
48 | 53 | 'href' => SkinTemplate::makeSpecialUrlSubpage( |
— | — | @@ -54,7 +59,7 @@ |
55 | 60 | foreach ( $wgCollectionFormats as $writer => $name ) { |
56 | 61 | } |
57 | 62 | } else { |
58 | | - $params = 'arttitle=' . $skinTemplate->getTitle()->getPrefixedURL(); |
| 63 | + $params = 'arttitle=' . $title->getPrefixedURL(); |
59 | 64 | if( $wgArticle ) { |
60 | 65 | $oldid = $wgArticle->getOldID(); |
61 | 66 | if ( $oldid ) { |
— | — | @@ -309,11 +314,11 @@ |
310 | 315 | <script type="text/javascript"> |
311 | 316 | /* <![CDATA[ */ |
312 | 317 | wgCollectionNavPopupJSURL = '$wgCollectionNavPopupJSURL'; |
313 | | - wgCollectionNavPopupCSSURL = '$wgCollectionNavPopupCSSURL'; |
314 | | - wgCollectionAddPageText = '$addPageText'; |
315 | | - wgCollectionAddCategoryText = '$addCategoryText'; |
316 | | - wgCollectionRemovePageText = '$removePageText'; |
317 | | - wgCollectionPopupHelpText = '$popupHelpText'; |
| 318 | + wgCollectionNavPopupCSSURL = '$wgCollectionNavPopupCSSURL'; |
| 319 | + wgCollectionAddPageText = '$addPageText'; |
| 320 | + wgCollectionAddCategoryText = '$addCategoryText'; |
| 321 | + wgCollectionRemovePageText = '$removePageText'; |
| 322 | + wgCollectionPopupHelpText = '$popupHelpText'; |
318 | 323 | wgCollectionArticleNamespaces = [ |
319 | 324 | EOS |
320 | 325 | ; |