Index: trunk/extensions/DiscussionThreading/DiscussionThreading.php |
— | — | @@ -39,21 +39,11 @@ |
40 | 40 | $wgHooks['AlternateEdit'][] = 'efDiscussionThreadEdit'; |
41 | 41 | $wgHooks['DoEditSectionLink'][] = 'efDoDiscussionLink'; |
42 | 42 | |
43 | | -# must use the deprecated efDiscussionLink hook if before MW Version 1.14 |
44 | | -# |
45 | | -if (version_compare( $wgVersion , '1.14.0' ) < 0 ) { |
46 | | - $wgHooks['EditSectionLink'][] = 'efDiscussionLink'; |
47 | | -} |
48 | 43 | /** |
49 | 44 | * Initial setup, add .i18n. messages from $IP/extensions/DiscussionThreading/DiscussionThreading.i18n.php |
50 | 45 | */ |
51 | 46 | function efDiscussionThreadSetup() { |
52 | | - global $wgVersion; |
53 | | - if (version_compare( $wgVersion , '1.11.0' ) < 0 ) { |
54 | | - global $wgMessageCache, $messages; |
55 | | - foreach( $messages as $lang => $LangMsg ) |
56 | | - $wgMessageCache->addMessages( $LangMsg, $lang ); |
57 | | - } else wfLoadExtensionMessages( 'DiscussionThreading' ); |
| 47 | + wfLoadExtensionMessages( 'DiscussionThreading' ); |
58 | 48 | } |
59 | 49 | |
60 | 50 | /** |
— | — | @@ -80,32 +70,6 @@ |
81 | 71 | return ( true ); |
82 | 72 | } |
83 | 73 | |
84 | | -/** |
85 | | - * This function creates a linkobject for the editSectionLink function in linker |
86 | | - * |
87 | | - * @param $callobj Article object. |
88 | | - * @param $nt Title object. |
89 | | - * @param $section Integer: section number. |
90 | | - * @param $hint Link String: title, or default if omitted or empty |
91 | | - * @param $url Link String: for edit url |
92 | | - * @param $result String: Returns the section [new][edit][reply] html if in a talk page - otherwise whatever came in with |
93 | | - * @return true |
94 | | - */ |
95 | | -function efDiscussionLink ( $callobj , $nt , $section , $hint='' , $url , &$result ) |
96 | | -{ |
97 | | - global $wgSectionThreadingOn; |
98 | | - if( $wgSectionThreadingOn && $nt->isTalkPage() ) { |
99 | | - $commenturl = '§ion='.$section.'&replyto=yes'; |
100 | | - $hint = ( $hint=='' ) ? '' : ' title="' . wfMsgHtml( 'discussionthreading-replysectionhint', htmlspecialchars( $hint ) ) . '"'; |
101 | | - $curl = $callobj->makeKnownLinkObj( $nt, wfMsg( 'discussionthreading-replysection' ), 'action=edit'.$commenturl , '' , '' , '' , $hint ); |
102 | | - $newthreadurl = '§ion=new'; |
103 | | - $hint = ( $hint=='' ) ? '' : ' title="' . wfMsgHtml( 'discussionthreading-threadnewsectionhint', htmlspecialchars( $hint ) ) . '"'; |
104 | | - $nurl = $callobj->makeKnownLinkObj( $nt, wfMsg('discussionthreading-threadnewsection' ), 'action=edit'.$newthreadurl, '' , '' , '' , $hint ); |
105 | | - $result = $nurl."][".$url."][".$curl; |
106 | | - } |
107 | | - return ( true ); |
108 | | -} |
109 | | - |
110 | 74 | function efDoDiscussionLink ( $callobj , $nt , $section , $hint='' , $result , $lang = false ) |
111 | 75 | { |
112 | 76 | global $wgSectionThreadingOn; |