r55295 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55294‎ | r55295 | r55296 >
Date:00:27, 19 August 2009
Author:demon
Status:deferred
Tags:
Comment:
Spacing fixes
Modified paths:
  • /trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/ClickTracking/ClickTracking.hooks.php
@@ -12,12 +12,12 @@
1313 /* Static Functions */
1414 public static function schema() {
1515 global $wgExtNewTables;
16 -
 16+
1717 $wgExtNewTables[] = array(
1818 'click_tracking',
1919 dirname( __FILE__ ) . '/ClickTracking.sql'
2020 );
21 -
 21+
2222 return true;
2323 }
2424
@@ -29,23 +29,21 @@
3030 * @param $contribs contributions the user has made (or NULL if user not logged in)
3131 * @return true if the event was stored in the DB
3232 */
33 - public static function trackEvent($is_logged_in, $namespace, $event_id, $contribs=0){
34 -
 33+ public static function trackEvent( $is_logged_in, $namespace, $event_id, $contribs = 0 ){
3534 $dbw = wfGetDB( DB_MASTER );
36 -
 35+
3736 $dbw->begin();
 37+
3838 // Builds insert information
39 -
4039 $data = array(
4140 'is_logged_in' => (bool) $is_logged_in,
4241 'namespace' => (int) $namespace,
4342 'event_id' => (int) $event_id,
44 - 'user_contribs' => ($is_logged_in?$contribs:null)
 43+ 'user_contribs' => ( $is_logged_in? $contribs : null )
4544 );
46 -
 45+
4746 $db_status = $dbw->insert('click_tracking', $data, __METHOD__);
4847 $dbw->commit();
4948 return $db_status;
5049 }
51 -
52 -}
\ No newline at end of file
 50+}

Status & tagging log