Index: trunk/extensions/BackAndForth/BackAndForth.class.php |
— | — | @@ -65,6 +65,7 @@ |
66 | 66 | ) |
67 | 67 | ); |
68 | 68 | if( $dbr->numRows( $res ) > 0 ) { |
| 69 | + wfLoadExtensionMessages( 'BackAndForth' ); |
69 | 70 | $row = $dbr->fetchObject( $res ); |
70 | 71 | $dbr->freeResult( $res ); |
71 | 72 | $target = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); |
Index: trunk/extensions/BackAndForth/BackAndForth.php |
— | — | @@ -13,7 +13,7 @@ |
14 | 14 | } |
15 | 15 | |
16 | 16 | $wgAutoloadClasses['BackAndForth'] = dirname( __FILE__ ) . '/BackAndForth.class.php'; |
17 | | -$wgExtensionFunctions[] = 'efBackAndForth'; |
| 17 | +$wgHooks['ArticleViewHeader'][] = 'BackAndForth::viewHook'; |
18 | 18 | $wgExtensionCredits['other'][] = array( |
19 | 19 | 'name' => 'Back and Forth', |
20 | 20 | 'author' => 'Rob Church', |
— | — | @@ -23,14 +23,3 @@ |
24 | 24 | ); |
25 | 25 | |
26 | 26 | $wgExtensionMessagesFiles['BackAndForth'] = dirname(__FILE__) . '/BackAndForth.i18n.php'; |
27 | | - |
28 | | -/** |
29 | | - * Extension setup function |
30 | | - */ |
31 | | -function efBackAndForth() { |
32 | | - global $wgHooks; |
33 | | - |
34 | | - wfLoadExtensionMessages( 'BackAndForth' ); |
35 | | - |
36 | | - $wgHooks['ArticleViewHeader'][] = 'BackAndForth::viewHook'; |
37 | | -} |