Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -323,7 +323,7 @@ |
324 | 324 | * @return bool |
325 | 325 | */ |
326 | 326 | public static function trackEditAttempt( $editpage ) { |
327 | | - self::trackEvent( 'edit_attempt', $editpage->getArticle()->getTitle(), $editpage->getArticle()->getContext() ); // EditPage::getTitle() doesn't exist in 1.18wmf1 |
| 327 | + self::trackEvent( 'edit_attempt', $editpage->getArticle()->getTitle() ); // EditPage::getTitle() doesn't exist in 1.18wmf1 |
328 | 328 | return true; |
329 | 329 | } |
330 | 330 | |
— | — | @@ -331,7 +331,7 @@ |
332 | 332 | * Tracks successful edits |
333 | 333 | * |
334 | 334 | * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleSaveComplete |
335 | | - * @param $article Article |
| 335 | + * @param $article WikiPage |
336 | 336 | * @param $user |
337 | 337 | * @param $text |
338 | 338 | * @param $summary |
— | — | @@ -347,7 +347,7 @@ |
348 | 348 | public static function trackEditSuccess( &$article, &$user, $text, |
349 | 349 | $summary, $minoredit, $watchthis, $sectionanchor, &$flags, |
350 | 350 | $revision, &$status, $baseRevId /*, &$redirect */ ) { // $redirect not passed in 1.18wmf1 |
351 | | - self::trackEvent( 'edit_success', $article->getTitle(), $article->getContext() ); |
| 351 | + self::trackEvent( 'edit_success', $article->getTitle() ); |
352 | 352 | return true; |
353 | 353 | } |
354 | 354 | |
— | — | @@ -358,12 +358,11 @@ |
359 | 359 | * @param $context IContextSource |
360 | 360 | * @return |
361 | 361 | */ |
362 | | - private static function trackEvent( $event, $title, IContextSource $context ) { |
| 362 | + private static function trackEvent( $event, $title ) { |
363 | 363 | global $wgArticleFeedbackv5Tracking; |
364 | 364 | $ctas = array( 'none', 'edit', 'learn_more' ); |
365 | 365 | |
366 | | - $request = $context->getRequest(); |
367 | | - $title = $context->getTitle(); |
| 366 | + $request = RequestContext::getMain()->getRequest(); |
368 | 367 | |
369 | 368 | $tracking = $request->getVal( 'articleFeedbackv5_click_tracking' ); |
370 | 369 | if ( !$tracking ) { |