Index: trunk/extensions/InputBox/InputBox.classes.php |
— | — | @@ -12,22 +12,22 @@ |
13 | 13 | /* Fields */ |
14 | 14 | |
15 | 15 | 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; |
32 | 32 | |
33 | 33 | /* Functions */ |
34 | 34 | |
— | — | @@ -442,30 +442,28 @@ |
443 | 443 | $values[ strtolower( trim( $name ) ) ] = trim( $value ); |
444 | 444 | } |
445 | 445 | |
446 | | - // Build list of options, with local member names and deafults |
| 446 | + // Build list of options, with local member names |
447 | 447 | $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', |
464 | 464 | ); |
465 | 465 | foreach ( $options as $name => $var ) { |
466 | 466 | if ( isset( $values[$name] ) ) { |
467 | | - $this->$var[0] = $values[$name]; |
468 | | - } else { |
469 | | - $this->$var[0] = $var[1]; |
| 467 | + $this->$var = $values[$name]; |
470 | 468 | } |
471 | 469 | } |
472 | 470 | |