Index: trunk/extensions/DiscussionThreading/DiscussionThreading.php |
— | — | @@ -41,19 +41,15 @@ |
42 | 42 | |
43 | 43 | # must use the deprecated efDiscussionLink hook if before MW Version 1.14 |
44 | 44 | # |
45 | | -$xversion = explode( "." , $wgVersion ); |
46 | | -if ( $xversion[0] <= "1" && $xversion[1] < "14" ) { |
| 45 | +if (version_compare( $wgVersion , '1.14.0' ) < 0 ) { |
47 | 46 | $wgHooks['EditSectionLink'][] = 'efDiscussionLink'; |
48 | 47 | } |
49 | | -unset( $xversion ); |
50 | | - |
51 | 48 | /** |
52 | 49 | * Initial setup, add .i18n. messages from $IP/extensions/DiscussionThreading/DiscussionThreading.i18n.php |
53 | 50 | */ |
54 | 51 | function efDiscussionThreadSetup() { |
55 | 52 | global $wgVersion; |
56 | | - $xversion = explode( ".",$wgVersion ); |
57 | | - if ( $xversion[0] <= "1" && $xversion[1] <= "11" ) { |
| 53 | + if (version_compare( $wgVersion , '1.11.0' ) < 0 ) { |
58 | 54 | global $wgMessageCache, $messages; |
59 | 55 | foreach( $messages as $lang => $LangMsg ) |
60 | 56 | $wgMessageCache->addMessages( $LangMsg, $lang ); |