r107562 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107561‎ | r107562 | r107563 >
Date:11:44, 29 December 2011
Author:reedy
Status:ok
Tags:
Comment:
Fix minor indenting issue, and make onLoadExtensionSchemaUpdates paths more consistent with other extensions

Comment noops from getUserBuckets
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MoodBar/MoodBar.hooks.php
@@ -43,9 +43,9 @@
4444 $res = $dbr->selectRow( array( 'moodbar_feedback', 'moodbar_feedback_response' ),
4545 array( 'mbf_id' ),
4646 array( 'mbf_id = mbfr_mbf_id',
47 - 'mbfr_id' => intval( $item ),
48 - 'mbf_user_id' => $User->getId() ),
49 - __METHOD__ );
 47+ 'mbfr_id' => intval( $item ),
 48+ 'mbf_user_id' => $User->getId()
 49+ ), __METHOD__ );
5050
5151 if ( $res === false ) {
5252 $isAbleToMark = false;
@@ -127,24 +127,24 @@
128128 * @param $updater DatabaseUpdater
129129 */
130130 public static function onLoadExtensionSchemaUpdates( $updater = null ) {
131 - $dir = dirname(__FILE__) . '/sql/';
132 - $updater->addExtensionTable( 'moodbar_feedback', $dir . 'MoodBar.sql' );
 131+ $dir = dirname(__FILE__) . '/sql';
 132+ $updater->addExtensionTable( 'moodbar_feedback', "$dir/MoodBar.sql" );
133133
134 - $updater->addExtensionField( 'moodbar_feedback', 'mbf_user_editcount', $dir . 'mbf_user_editcount.sql' );
 134+ $updater->addExtensionField( 'moodbar_feedback', 'mbf_user_editcount', "$dir/mbf_user_editcount.sql" );
135135
136 - $updater->addExtensionIndex( 'moodbar_feedback', 'mbf_type_timestamp_id', $dir . 'AddIDToIndexes.sql' );
 136+ $updater->addExtensionIndex( 'moodbar_feedback', 'mbf_type_timestamp_id', "$dir/AddIDToIndexes.sql" );
137137
138138 $updater->addExtensionUpdate( array( 'dropIndex', 'moodbar_feedback',
139 - 'mbf_userid_ip_timestamp', $dir . 'AddIDToIndexes2.sql', true )
 139+ 'mbf_userid_ip_timestamp', "$dir/AddIDToIndexes2.sql", true )
140140 );
141141
142 - $updater->addExtensionIndex( 'moodbar_feedback', 'mbfr_timestamp_id', $dir . 'mbf_timestamp_id.sql' );
 142+ $updater->addExtensionIndex( 'moodbar_feedback', 'mbfr_timestamp_id', "$dir/mbf_timestamp_id.sql" );
143143
144 - $updater->addExtensionField( 'moodbar_feedback', 'mbf_hidden_state', $dir . 'mbf_hidden_state.sql' );
 144+ $updater->addExtensionField( 'moodbar_feedback', 'mbf_hidden_state', "$dir/mbf_hidden_state.sql" );
145145
146 - $updater->addExtensionTable( 'moodbar_feedback_response', $dir . 'moodbar_feedback_response.sql' );
 146+ $updater->addExtensionTable( 'moodbar_feedback_response', "$dir/moodbar_feedback_response.sql" );
147147
148 - $updater->addExtensionIndex( 'moodbar_feedback_response', 'mbfr_timestamp_id', $dir . 'mbfr_timestamp_id_index.sql' );
 148+ $updater->addExtensionIndex( 'moodbar_feedback_response', 'mbfr_timestamp_id', "$dir/mbfr_timestamp_id_index.sql" );
149149
150150 return true;
151151 }
@@ -155,12 +155,12 @@
156156 * @return array of bucket names
157157 */
158158 public static function getUserBuckets( $user ) {
159 - $id = $user->getID();
 159+ //$id = $user->getID();
160160 $buckets = array();
161161
162162 // No show-time bucketing yet. This method is a stub.
163163
164 - sort($buckets);
 164+ //sort($buckets);
165165 return $buckets;
166166 }
167167 }

Status & tagging log