r43439 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43438‎ | r43439 | r43440 >
Date:08:50, 13 November 2008
Author:aaron
Status:old
Tags:
Comment:
Cleanup for r42696: use class defaults
Modified paths:
  • /trunk/extensions/InputBox/InputBox.classes.php (modified) (history)

Diff [purge]

Index: trunk/extensions/InputBox/InputBox.classes.php
@@ -12,22 +12,22 @@
1313 /* Fields */
1414
1515 private $mParser;
16 - private $mType;
17 - private $mWidth;
18 - private $mPreload;
19 - private $mEditIntro;
20 - private $mPage;
21 - private $mBR;
22 - private $mDefaultText;
23 - private $mBGColor;
24 - private $mButtonLabel;
25 - private $mSearchButtonLabel;
26 - private $mFullTextButton;
27 - private $mLabelText;
28 - private $mHidden;
29 - private $mNamespaces;
30 - private $mID;
31 - private $mInline;
 16+ private $mType = '';
 17+ private $mWidth = 50;
 18+ private $mPreload = '';
 19+ private $mEditIntro = '';
 20+ private $mPage = '';
 21+ private $mBR = 'yes';
 22+ private $mDefaultText = '';
 23+ private $mBGColor = 'transparent';
 24+ private $mButtonLabel = '';
 25+ private $mSearchButtonLabel = '';
 26+ private $mFullTextButton = '';
 27+ private $mLabelText = '';
 28+ private $mHidden = '';
 29+ private $mNamespaces = '';
 30+ private $mID = '';
 31+ private $mInline = false;
3232
3333 /* Functions */
3434
@@ -442,30 +442,28 @@
443443 $values[ strtolower( trim( $name ) ) ] = trim( $value );
444444 }
445445
446 - // Build list of options, with local member names and deafults
 446+ // Build list of options, with local member names
447447 $options = array(
448 - 'type' => array( 'mType', '' ),
449 - 'width' => array( 'mWidth', 50 ),
450 - 'preload' => array( 'mPreload', '' ),
451 - 'page' => array( 'mPage', '' ),
452 - 'editintro' => array( 'mEditIntro', '' ),
453 - 'break' => array( 'mBR', 'yes' ),
454 - 'default' => array( 'mDefaultText', '' ),
455 - 'bgcolor' => array( 'mBGColor', 'transparent' ),
456 - 'buttonlabel' => array( 'mButtonLabel', '' ),
457 - 'searchbuttonlabel' => array( 'mSearchButtonLabel', '' ),
458 - 'fulltextbutton' => array( 'mFullTextButton', '' ),
459 - 'namespaces' => array( 'mNamespaces', '' ),
460 - 'labeltext' => array( 'mLabelText', '' ),
461 - 'hidden' => array( 'mHidden', '' ),
462 - 'id' => array( 'mID', '' ),
463 - 'inline' => array( 'mInline', false )
 448+ 'type' => 'mType',
 449+ 'width' => 'mWidth',
 450+ 'preload' => 'mPreload',
 451+ 'page' => 'mPage',
 452+ 'editintro' => 'mEditIntro',
 453+ 'break' => 'mBR',
 454+ 'default' => 'mDefaultText',
 455+ 'bgcolor' => 'mBGColor',
 456+ 'buttonlabel' => 'mButtonLabel',
 457+ 'searchbuttonlabel' => 'mSearchButtonLabel',
 458+ 'fulltextbutton' => 'mFullTextButton',
 459+ 'namespaces' => 'mNamespaces',
 460+ 'labeltext' => 'mLabelText',
 461+ 'hidden' => 'mHidden',
 462+ 'id' => 'mID',
 463+ 'inline' => 'mInline',
464464 );
465465 foreach ( $options as $name => $var ) {
466466 if ( isset( $values[$name] ) ) {
467 - $this->$var[0] = $values[$name];
468 - } else {
469 - $this->$var[0] = $var[1];
 467+ $this->$var = $values[$name];
470468 }
471469 }
472470

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r42696Added default values for parameters.tparscal22:52, 27 October 2008

Status & tagging log