Index: trunk/extensions/ArticleFeedbackv5/ArticleFeedbackv5.hooks.php |
— | — | @@ -307,7 +307,7 @@ |
308 | 308 | * @see http://www.mediawiki.org/wiki/Manual:Hooks/EditPage::attemptSave |
309 | 309 | */ |
310 | 310 | public static function trackEditAttempt( $editpage ) { |
311 | | - self::trackEvent( 'edit_attempt' ); |
| 311 | + self::trackEvent( 'edit_attempt', $editpage->getTitle() ); |
312 | 312 | return true; |
313 | 313 | } |
314 | 314 | |
— | — | @@ -319,7 +319,7 @@ |
320 | 320 | public static function trackEditSuccess( &$article, &$user, $text, |
321 | 321 | $summary, $minoredit, $watchthis, $sectionanchor, &$flags, |
322 | 322 | $revision, &$status, $baseRevId, &$redirect) { |
323 | | - self::trackEvent( 'edit_success' ); |
| 323 | + self::trackEvent( 'edit_success', $article->getTitle() ); |
324 | 324 | return true; |
325 | 325 | } |
326 | 326 | |
— | — | @@ -328,10 +328,8 @@ |
329 | 329 | * |
330 | 330 | * @param $event string the event name |
331 | 331 | */ |
332 | | - private static function trackEvent( $event ) { |
333 | | - global $wgRequest, |
334 | | - $wgArticleFeedbackv5Tracking, |
335 | | - $wgTitle; |
| 332 | + private static function trackEvent( $event, $title ) { |
| 333 | + global $wgRequest, $wgArticleFeedbackv5Tracking; |
336 | 334 | $ctas = array( 'none', 'edit', 'learn_more' ); |
337 | 335 | |
338 | 336 | $tracking = $wgRequest->getVal( 'articleFeedbackv5_click_tracking' ); |
— | — | @@ -355,8 +353,8 @@ |
356 | 354 | 'action' => 'clicktracking', |
357 | 355 | 'eventid' => $trackingId, |
358 | 356 | 'token' => $token, |
359 | | - 'info' => $wgTitle->getText(), |
360 | | - 'namespacenumber' => $wgTitle->getNamespace() |
| 357 | + 'info' => $title->getText(), |
| 358 | + 'namespacenumber' => $title->getNamespace() |
361 | 359 | ) ); |
362 | 360 | $api = new ApiMain( $params, true ); |
363 | 361 | $api->execute(); |