r111136 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r111135‎ | r111136 | r111137 >
Date:00:51, 10 February 2012
Author:werdna
Status:ok
Tags:
Comment:
ArticleCreationWorkflow: Remove the $info parameter to ArticleCreationUtils::clickTracking. Instead draw the extra info from the Title object that is passed along. Also, change it so the title that is passed along is the title being accessed rather than the special page
Modified paths:
  • /trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleCreationWorkflow/includes/ArticleCreationUtil.php
@@ -71,16 +71,15 @@
7272 }
7373 }
7474
75 - self::clickTracking( $event, SpecialPage::getTitleFor( 'ArticleCreationLanding' ), $par );
 75+ self::clickTracking( $event, Title::newFromText( $par ) );
7676 }
7777
7878 /**
7979 * Tracking code that calls ClickTracking
8080 * @param $event string the event name
8181 * @param $title Object
82 - * @param $info string - additional info for click tracking
8382 */
84 - private static function clickTracking( $event, $title, $info = '' ) {
 83+ private static function clickTracking( $event, $title ) {
8584 // check if ClickTracking API is enabled
8685 if ( !self::trackingEnabled() ) {
8786 return;
@@ -91,7 +90,7 @@
9291 'eventid' => self::trackingCodePrefix() . $event,
9392 'token' => wfGenerateToken(),
9493 'namespacenumber' => $title->getNamespace(),
95 - 'additional' => $info
 94+ 'additional' => $title->getDBkey(),
9695 ) );
9796 $api = new ApiMain( $params, true );
9897 $api->execute();

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r110989Adding ClickTracking to Article Creationbsitu00:17, 9 February 2012
r111007tracking the title for missing article in additional fieldbsitu01:16, 9 February 2012

Status & tagging log