r107799 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107798‎ | r107799 | r107800 >
Date:05:25, 2 January 2012
Author:johnduhart
Status:ok
Tags:aft 
Comment:
Followup r107797, too much context source
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -323,7 +323,7 @@
324324 * @return bool
325325 */
326326 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
328328 return true;
329329 }
330330
@@ -331,7 +331,7 @@
332332 * Tracks successful edits
333333 *
334334 * @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleSaveComplete
335 - * @param $article Article
 335+ * @param $article WikiPage
336336 * @param $user
337337 * @param $text
338338 * @param $summary
@@ -347,7 +347,7 @@
348348 public static function trackEditSuccess( &$article, &$user, $text,
349349 $summary, $minoredit, $watchthis, $sectionanchor, &$flags,
350350 $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() );
352352 return true;
353353 }
354354
@@ -358,12 +358,11 @@
359359 * @param $context IContextSource
360360 * @return
361361 */
362 - private static function trackEvent( $event, $title, IContextSource $context ) {
 362+ private static function trackEvent( $event, $title ) {
363363 global $wgArticleFeedbackv5Tracking;
364364 $ctas = array( 'none', 'edit', 'learn_more' );
365365
366 - $request = $context->getRequest();
367 - $title = $context->getTitle();
 366+ $request = RequestContext::getMain()->getRequest();
368367
369368 $tracking = $request->getVal( 'articleFeedbackv5_click_tracking' );
370369 if ( !$tracking ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107797More context sourcejohnduhart04:34, 2 January 2012

Status & tagging log