Index: trunk/extensions/ClickTracking/ClickTracking.hooks.php |
— | — | @@ -220,36 +220,39 @@ |
221 | 221 | // Add clicktracking fields to form, if given |
222 | 222 | $session = $wgRequest->getVal( 'clicktrackingsession' ); |
223 | 223 | $event = $wgRequest->getVal( 'clicktrackingevent' ); |
| 224 | + $info = $wgRequest->getVal( 'clicktrackinginfo' ); |
224 | 225 | if ( $session !== null && $event !== null ) { |
225 | 226 | $editPage->editFormTextAfterContent .= Html::hidden( 'clicktrackingsession', $session ); |
226 | 227 | $editPage->editFormTextAfterContent .= Html::hidden( 'clicktrackingevent', $event ); |
| 228 | + $editPage->editFormTextAfterContent .= Html::hidden( 'clicktrackinginfo', $info ); |
227 | 229 | } |
228 | 230 | |
229 | 231 | return true; |
230 | 232 | } |
231 | 233 | |
232 | 234 | public static function articleSave( $editpage ) { |
233 | | - self::trackRequest( 'save-attempt' ); |
| 235 | + self::trackRequest( '-save-attempt' ); |
234 | 236 | return true; |
235 | 237 | } |
236 | 238 | |
237 | 239 | public static function articleSaveComplete( $article, $user, $text, $summary, $minoredit, |
238 | 240 | $watchthis, $sectionanchor, $flags, $revision, $baseRevId ) { |
239 | | - self::trackRequest( 'save-complete' ); |
| 241 | + self::trackRequest( '-save-complete' ); |
240 | 242 | return true; |
241 | 243 | } |
242 | 244 | |
243 | | - protected static function trackRequest( $info ) { |
| 245 | + protected static function trackRequest( $suffix ) { |
244 | 246 | global $wgRequest; |
245 | 247 | |
246 | 248 | $session = $wgRequest->getVal( 'clicktrackingsession' ); |
247 | 249 | $event = $wgRequest->getVal( 'clicktrackingevent' ); |
| 250 | + $info = $wgRequest->getVal( 'clicktrackinginfo' ); |
248 | 251 | if ( $session !== null && $event !== null ) { |
249 | 252 | $params = new FauxRequest( array( |
250 | 253 | 'action' => 'clicktracking', |
251 | | - 'eventid' => $event, |
| 254 | + 'eventid' => $event + $suffix, |
252 | 255 | 'token' => $session, |
253 | | - 'additional' => $info, |
| 256 | + 'info' => $info, |
254 | 257 | ) ); |
255 | 258 | $api = new ApiMain( $params, true ); |
256 | 259 | $api->execute(); |