r102638 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102637‎ | r102638 | r102639 >
Date:11:50, 10 November 2011
Author:jeroendedauw
Status:deferred
Tags:
Comment:
minor fixes
Modified paths:
  • /trunk/extensions/SemanticImageInput/SemanticImageInput.php (modified) (history)
  • /trunk/extensions/SemanticImageInput/SemanticImageInput.settings.php (modified) (history)
  • /trunk/extensions/SemanticImageInput/includes/InstantImageInput.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticImageInput/includes/InstantImageInput.php
@@ -19,17 +19,15 @@
2020 }
2121
2222 public static function getDefaultPropTypes() {
23 - return array(
24 - );
 23+ return array();
2524 }
2625
2726 public static function getOtherPropTypesHandled() {
28 - return array( '_wpg' );
 27+ return array( '_txt', '_wpg' );
2928 }
3029
3130 public static function getDefaultPropTypeLists() {
32 - return array(
33 - );
 31+ return array();
3432 }
3533
3634 public static function getOtherPropTypeListsHandled() {
@@ -83,6 +81,10 @@
8482 global $wgOut;
8583 $html = '';
8684
 85+ if ( !array_key_exists( 'page', $other_args ) ) {
 86+ $other_args['type'] = 'page';
 87+ }
 88+
8789 $showDefault = !array_key_exists( 'showdefault', $other_args ) || $other_args['showdefault'] === 'yes';
8890
8991 if ( $showDefault && !array_key_exists( 'default', $other_args ) ) {
Index: trunk/extensions/SemanticImageInput/SemanticImageInput.settings.php
@@ -27,6 +27,8 @@
2828 */
2929 protected static function getDefaultSettings() {
3030 return array(
 31+ 'defaultImage' => 'File:Mail-envelope.png',
 32+ 'defaultWidth' => 200
3133 );
3234 }
3335
Index: trunk/extensions/SemanticImageInput/SemanticImageInput.php
@@ -57,7 +57,7 @@
5858
5959 $wgExtensionFunctions[] = function() {
6060 global $sfgFormPrinter;
61 - $sfgFormPrinter->registerInputType( 'WikiImageInput' );
 61+ $sfgFormPrinter->registerInputType( 'InstantImageInput' );
6262 };
6363
6464 // Resource loader modules