Index: trunk/extensions/ConfirmAccount/presentation/ConfirmAccountUI.hooks.php |
— | — | @@ -38,11 +38,20 @@ |
39 | 39 | |
40 | 40 | // FIXME: don't just take on to general site notice |
41 | 41 | public static function confirmAccountsNotice( $notice ) { |
42 | | - global $wgConfirmAccountNotice, $wgUser; |
| 42 | + global $wgConfirmAccountNotice, $wgUser, $wgMemc, $wgOut; |
43 | 43 | if ( !$wgConfirmAccountNotice || !$wgUser->isAllowed( 'confirmaccount' ) ) { |
44 | 44 | return true; |
45 | 45 | } |
46 | | - global $wgMemc, $wgOut; |
| 46 | + # Only show on some special pages |
| 47 | + $title = RequestContext::getMain()->getTitle(); |
| 48 | + if ( !$title->isSpecialPage() ) { |
| 49 | + return true; |
| 50 | + } elseif ( |
| 51 | + !$title->equals( SpecialPage::getTitleFor( 'Recentchanges' ) ) && |
| 52 | + !$title->equals( SpecialPage::getTitleFor( 'Watchlist' ) ) ) |
| 53 | + { |
| 54 | + return true; |
| 55 | + } |
47 | 56 | # Check cached results |
48 | 57 | $key = wfMemcKey( 'confirmaccount', 'noticecount' ); |
49 | 58 | $count = $wgMemc->get( $key ); |