r102688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102687‎ | r102688 | r102689 >
Date:20:50, 10 November 2011
Author:reedy
Status:ok
Tags:
Comment:
Documentation
Modified paths:
  • /trunk/extensions/MoodBar/MoodBar.hooks.php (modified) (history)
  • /trunk/phase3/includes/api/ApiUpload.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiUpload.php
@@ -222,9 +222,10 @@
223223 $request = $this->getMain()->getRequest();
224224
225225 // chunk or one and only one of the following parameters is needed
226 - if(!$this->mParams['chunk'])
 226+ if( !$this->mParams['chunk'] ) {
227227 $this->requireOnlyOneParameter( $this->mParams,
228 - 'filekey', 'file', 'url', 'statuskey' );
 228+ 'filekey', 'file', 'url', 'statuskey' );
 229+ }
229230
230231 if ( $this->mParams['statuskey'] ) {
231232 $this->checkAsyncDownloadEnabled();
Index: trunk/extensions/MoodBar/MoodBar.hooks.php
@@ -3,6 +3,9 @@
44 class MoodBarHooks {
55 /**
66 * Adds MoodBar JS to the output if appropriate.
 7+ *
 8+ * @param $output OutputPage
 9+ * @param $skin Skin
710 */
811 public static function onPageDisplay( &$output, &$skin ) {
912 if ( self::shouldShowMoodbar( $output, $skin ) ) {
@@ -14,6 +17,9 @@
1518
1619 /**
1720 * Determines whether or not we should show the MoodBar.
 21+ *
 22+ * @param $output OutputPage
 23+ * @param $skin Skin
1824 */
1925 public static function shouldShowMoodbar( &$output, &$skin ) {
2026 // Front-end appends to header elements, which have different
@@ -65,7 +71,9 @@
6672 }
6773
6874 /**
69 - * Runs MoodBar schema updates
 75+ * Runs MoodBar schema updates#
 76+ *
 77+ * @param $updater DatabasEUpdater
7078 */
7179 public static function onLoadExtensionSchemaUpdates( $updater = null ) {
7280 $updater->addExtensionUpdate( array( 'addTable', 'moodbar_feedback',
@@ -74,9 +82,9 @@
7583 $updater->addExtensionUpdate( array( 'addField', 'moodbar_feedback',
7684 'mbf_user_editcount', dirname(__FILE__).'/sql/mbf_user_editcount.sql', true )
7785 );
78 -
 86+
7987 $db = $updater->getDB();
80 - if ( $db->tableExists( 'moodbar_feedback' ) &&
 88+ if ( $db->tableExists( 'moodbar_feedback' ) &&
8189 $db->indexExists( 'moodbar_feedback', 'type_timestamp', __METHOD__ ) )
8290 {
8391 $updater->addExtensionUpdate( array( 'addIndex', 'moodbar_feedback',
@@ -86,11 +94,11 @@
8795 $updater->addExtensionUpdate( array( 'dropIndex', 'moodbar_feedback',
8896 'mbf_timestamp', dirname( __FILE__ ) . '/sql/AddIDToIndexes2.sql', true )
8997 );
90 -
 98+
9199 $updater->addExtensionUpdate( array( 'addIndex', 'moodbar_feedback',
92100 'mbf_timestamp_id', dirname( __FILE__ ) . '/sql/mbf_timestamp_id.sql', true )
93101 );
94 -
 102+
95103 $updater->addExtensionUpdate( array( 'addField', 'moodbar_feedback',
96104 'mbf_hidden_state', dirname(__FILE__).'/sql/mbf_hidden_state.sql', true ) );
97105

Status & tagging log