Index: trunk/extensions/ReaderFeedback/ReaderFeedback.hooks.php |
— | — | @@ -70,10 +70,10 @@ |
71 | 71 | } |
72 | 72 | |
73 | 73 | public static function addFeedbackForm( &$data, $skin ) { |
74 | | - global $wgOut, $wgArticle; |
| 74 | + global $wgOut; |
75 | 75 | $title = $skin->getTitle(); |
76 | | - if( $wgOut->isArticleRelated() && isset($wgArticle) ) { |
77 | | - global $wgRequest, $wgUser, $wgOut; |
| 76 | + if( $wgOut->isArticleRelated() ) { |
| 77 | + global $wgRequest, $wgUser; |
78 | 78 | if( !$title->exists() || !ReaderFeedback::isPageRateable($title) || !$wgOut->getRevisionId() ) { |
79 | 79 | return true; |
80 | 80 | } |
— | — | @@ -85,7 +85,7 @@ |
86 | 86 | if( $wgUser->isAllowed( 'feedback' ) ) { |
87 | 87 | # Only allow votes on the latest revision! |
88 | 88 | $id = $wgOut->getRevisionId(); |
89 | | - if( $id != $wgArticle->getLatest() ) { |
| 89 | + if( $id != $title->getLatestRevID() ) { |
90 | 90 | return true; |
91 | 91 | } |
92 | 92 | # If the user already voted, then don't show the form. |