r113858 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r113857‎ | r113858 | r113859 >
Date:21:23, 14 March 2012
Author:emsmith
Status:ok
Tags:
Comment:
bug 35106 - adding | and rev id after rest of tracking items
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php (modified) (history)
  • /trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.js
@@ -3193,7 +3193,7 @@
31943194 'eventid': id,
31953195 'namespacenumber': mw.config.get( 'wgNamespaceNumber' ),
31963196 'token': $.cookie( 'clicktracking-session' ),
3197 - 'additional': mw.config.get( 'wgTitle' ),
 3197+ 'additional': mw.config.get( 'wgTitle' ) + '|' + $.articleFeedbackv5.revisionId,
31983198 'redirectto': url
31993199 } );
32003200 };
Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php
@@ -418,7 +418,7 @@
419419 * @return bool
420420 */
421421 public static function trackEditAttempt( $editpage ) {
422 - self::trackEvent( 'edit_attempt', $editpage->getArticle()->getTitle() ); // EditPage::getTitle() doesn't exist in 1.18wmf1
 422+ self::trackEvent( 'edit_attempt', $editpage->getArticle()->getTitle(), $editpage->getRevIdFetched()); // EditPage::getTitle() doesn't exist in 1.18wmf1
423423 return true;
424424 }
425425
@@ -442,7 +442,7 @@
443443 public static function trackEditSuccess( &$article, &$user, $text,
444444 $summary, $minoredit, $watchthis, $sectionanchor, &$flags,
445445 $revision, &$status, $baseRevId /*, &$redirect */ ) { // $redirect not passed in 1.18wmf1
446 - self::trackEvent( 'edit_success', $article->getTitle() . '|' . $baseRevId );
 446+ self::trackEvent( 'edit_success', $article->getTitle(), $baseRevId );
447447 return true;
448448 }
449449
@@ -453,7 +453,7 @@
454454 * @param $context IContextSource
455455 * @return
456456 */
457 - private static function trackEvent( $event, $title ) {
 457+ private static function trackEvent( $event, $title, $rev_id) {
458458 global $wgArticleFeedbackv5Tracking;
459459 $ctas = array( 'none', 'edit', 'learn_more' );
460460
@@ -485,7 +485,7 @@
486486 'action' => 'clicktracking',
487487 'eventid' => $trackingId,
488488 'token' => $token,
489 - 'additional' => $title->getText(),
 489+ 'additional' => $title->getText() . '|' . $rev_id,
490490 'namespacenumber' => $title->getNamespace()
491491 ) );
492492 $api = new ApiMain( $params, true );

Follow-up revisions

RevisionCommit summaryAuthorDate
r1139571.19wmf1: MFT r113858catrope21:07, 15 March 2012
r113960Fix r113858: EditPage::getRevIdFetched() doesn't existcatrope21:26, 15 March 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r113626bug 35106 - really two issues here - fix for part one - the api wants the par...emsmith16:00, 12 March 2012
r113628bug 35106 - fix for part two - had to implement our own trackActionURL which ...emsmith16:20, 12 March 2012
r113718bug 35106 - missed spot still using the clicktracking javascript for click li...emsmith13:38, 13 March 2012
r113735bug 35106 - adding | and rev id after title to edit_success items being trackedemsmith17:30, 13 March 2012

Status & tagging log