Index: trunk/extensions/AjaxLogin/AjaxLogin.php |
— | — | @@ -94,12 +94,12 @@ |
95 | 95 | * @param $data The data, AjaxLogin form in this case, to be added to the HTML output of a page |
96 | 96 | * @return true |
97 | 97 | */ |
98 | | -function GetAjaxLoginForm( &$data ) { |
99 | | - global $wgAuth, $wgEnableEmail, $wgOut, $wgTitle, $wgUser; |
| 98 | +function GetAjaxLoginForm( &$data, $skin ) { |
| 99 | + global $wgAuth, $wgEnableEmail, $wgOut, $wgUser; |
100 | 100 | global $wgEnableAjaxLogin; |
101 | 101 | if ( |
102 | 102 | isset( $wgEnableAjaxLogin ) && $wgUser->isAnon() && |
103 | | - $wgTitle->getNamespace() != 8 && !$wgTitle->isSpecial( 'Userlogin' ) |
| 103 | + $skin->getTitle()->getNamespace() != 8 && !$skin->getTitle()->isSpecial( 'Userlogin' ) |
104 | 104 | ) { |
105 | 105 | $titleObj = SpecialPage::getTitleFor( 'Userlogin' ); |
106 | 106 | $link = $titleObj->getLocalURL( 'type=signup' ); |
Index: trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php |
— | — | @@ -72,11 +72,12 @@ |
73 | 73 | return ( $action == 'view' || $action == 'purge' || $action == 'render' ); |
74 | 74 | } |
75 | 75 | |
76 | | - public static function addFeedbackForm( &$data ) { |
77 | | - global $wgOut, $wgArticle, $wgTitle; |
| 76 | + public static function addFeedbackForm( &$data, $skin ) { |
| 77 | + global $wgOut, $wgArticle |
| 78 | + $title = $skin->getTitle(); |
78 | 79 | if( $wgOut->isArticleRelated() && isset($wgArticle) ) { |
79 | 80 | global $wgRequest, $wgUser, $wgOut; |
80 | | - if( !$wgTitle->exists() || !ReaderFeedback::isPageRateable($wgTitle) || !$wgOut->getRevisionId() ) { |
| 81 | + if( !$title->exists() || !ReaderFeedback::isPageRateable($title) || !$wgOut->getRevisionId() ) { |
81 | 82 | return true; |
82 | 83 | } |
83 | 84 | # Check action and if page is protected |
— | — | @@ -92,8 +93,8 @@ |
93 | 94 | } |
94 | 95 | # If the user already voted, then don't show the form. |
95 | 96 | # Always show for IPs however, due to squid caching... |
96 | | - if( !$wgUser->getId() || !ReaderFeedbackPage::userAlreadyVoted( $wgTitle, $id ) ) { |
97 | | - self::addQuickFeedback( $data, false, $wgTitle ); |
| 97 | + if( !$wgUser->getId() || !ReaderFeedbackPage::userAlreadyVoted( $title, $id ) ) { |
| 98 | + self::addQuickFeedback( $data, false, $title ); |
98 | 99 | } |
99 | 100 | } |
100 | 101 | return true; |