Index: trunk/extensions/TalkHere/TalkHere.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | $wgAutoloadClasses['TalkHereEditTarget'] = $dir . 'TalkHereArticle.php'; |
37 | 37 | |
38 | 38 | $wgHooks['BeforePageDisplay'][] = 'wfTalkHereBeforePageDisplay'; |
39 | | -#$wgHooks['ArticleFromTitle'][] = 'wfTalkHereArticleFromTitle'; |
| 39 | +$wgHooks['ArticleFromTitle'][] = 'wfTalkHereArticleFromTitle'; |
40 | 40 | $wgHooks['CustomEditor'][] = 'wfTalkHereCustomEditor'; |
41 | 41 | $wgHooks['EditPage::showEditForm:fields'][] = 'wfTalkHereShowEditFormFields'; |
42 | 42 | |
— | — | @@ -44,18 +44,11 @@ |
45 | 45 | function wfTalkHereBeforePageDisplay( $out, $skin ) { |
46 | 46 | global $wgScriptPath, $wgJsMimeType, $wgUseAjax; |
47 | 47 | |
48 | | - $out->addLink( |
49 | | - array( |
50 | | - 'rel' => 'stylesheet', |
51 | | - 'type' => 'text/css', |
52 | | - 'href' => $wgScriptPath . '/extensions/TalkHere/TalkHere.css' |
53 | | - ) |
54 | | - ); |
| 48 | + $out->addExtensionStyle( $wgScriptPath . '/extensions/TalkHere/TalkHere.css' ); |
55 | 49 | |
56 | | - if ( $wgUseAjax ) $out->addScript( |
57 | | - "<script type=\"{$wgJsMimeType}\" src=\"{$wgScriptPath}/extensions/TalkHere/TalkHere.js\">" . |
58 | | - "</script>\n" |
59 | | - ); |
| 50 | + if ( $wgUseAjax ) { |
| 51 | + $out->addScriptFile( $wgScriptPath . '/extensions/TalkHere/TalkHere.js' ); |
| 52 | + } |
60 | 53 | |
61 | 54 | return true; |
62 | 55 | } |
— | — | @@ -63,7 +56,9 @@ |
64 | 57 | function wfTalkHereArticleFromTitle( &$title, &$article ) { |
65 | 58 | global $wgRequest, $wgTalkHereNamespaces; |
66 | 59 | |
67 | | - if (isset($title->noTalkHere)) return true; //stop recursion |
| 60 | + if ( isset( $title->noTalkHere ) ) { |
| 61 | + return true; //stop recursion |
| 62 | + } |
68 | 63 | |
69 | 64 | $action = $wgRequest->getVal( 'action' ); |
70 | 65 | $oldid = $wgRequest->getVal( 'oldid' ); |