MediaWiki REL1_34
InputBox.php
Go to the documentation of this file.
1<?php
10
14class InputBox {
15
16 /* Fields */
17
18 private $mParser;
19 private $mType = '';
20 private $mWidth = 50;
21 private $mPreload = null;
22 private $mPreloadparams = null;
23 private $mEditIntro = null;
24 private $mUseVE = null;
25 private $mSummary = null;
26 private $mNosummary = null;
27 private $mMinor = null;
28 private $mPage = '';
29 private $mBR = 'yes';
30 private $mDefaultText = '';
31 private $mPlaceholderText = '';
32 private $mBGColor = 'transparent';
33 private $mButtonLabel = '';
34 private $mSearchButtonLabel = '';
35 private $mFullTextButton = '';
36 private $mLabelText = '';
37 private $mHidden = '';
38 private $mNamespaces = '';
39 private $mID = '';
40 private $mInline = false;
41 private $mPrefix = '';
42 private $mDir = '';
43 private $mSearchFilter = '';
44 private $mTour = '';
45
46 /* Functions */
47
51 public function __construct( $parser ) {
52 $this->mParser = $parser;
53 // Default value for dir taken from the page language (bug 37018)
54 $this->mDir = $this->mParser->getTargetLanguage()->getDir();
55 // Split caches by language, to make sure visitors do not see a cached
56 // version in a random language (since labels are in the user language)
57 $this->mParser->getOptions()->getUserLangObj();
58 $this->mParser->getOutput()->addModuleStyles( [
59 'ext.inputBox.styles',
60 'mediawiki.ui.input',
61 'mediawiki.ui.checkbox',
62 ] );
63 }
64
65 public function render() {
66 // Handle various types
67 switch ( $this->mType ) {
68 case 'create':
69 case 'comment':
70 $this->mParser->getOutput()->addModules( 'ext.inputBox' );
71 return $this->getCreateForm();
72 case 'move':
73 return $this->getMoveForm();
74 case 'commenttitle':
75 return $this->getCommentForm();
76 case 'search':
77 return $this->getSearchForm( 'search' );
78 case 'fulltext':
79 return $this->getSearchForm( 'fulltext' );
80 case 'search2':
81 return $this->getSearchForm2();
82 default:
83 return Xml::tags( 'div', null,
84 Xml::element( 'strong',
85 [ 'class' => 'error' ],
86 strlen( $this->mType ) > 0
87 ? wfMessage( 'inputbox-error-bad-type', $this->mType )->text()
88 : wfMessage( 'inputbox-error-no-type' )->text()
89 )
90 );
91 }
92 }
93
101 private function getEditActionArgs() {
102 // default is wikitext editor
103 $args = [
104 'name' => 'action',
105 'value' => 'edit',
106 ];
107 // check, if VE is installed and VE editor is requested
108 if ( $this->shouldUseVE() ) {
109 $args = [
110 'name' => 'veaction',
111 'value' => 'edit',
112 ];
113 }
114 return $args;
115 }
116
123 private function getLinebreakClasses() {
124 return strtolower( $this->mBR ) === '<br />' ? 'mw-inputbox-input ' : '';
125 }
126
132 public function getSearchForm( $type ) {
133 global $wgNamespaceAliases;
134
135 // Use button label fallbacks
136 if ( !$this->mButtonLabel ) {
137 $this->mButtonLabel = wfMessage( 'inputbox-tryexact' )->text();
138 }
139 if ( !$this->mSearchButtonLabel ) {
140 $this->mSearchButtonLabel = wfMessage( 'inputbox-searchfulltext' )->text();
141 }
142 if ( $this->mID !== '' ) {
143 $idArray = [ 'id' => Sanitizer::escapeIdForAttribute( $this->mID ) ];
144 } else {
145 $idArray = [];
146 }
147 // We need a unqiue id to link <label> to checkboxes, but also
148 // want multiple <inputbox>'s to not be invalid html
149 $idRandStr = Sanitizer::escapeIdForAttribute( '-' . $this->mID . wfRandom() );
150
151 // Build HTML
152 $htmlOut = Xml::openElement( 'div',
153 [
154 'class' => 'mw-inputbox-centered',
155 'style' => $this->bgColorStyle(),
156 ]
157 );
158 $htmlOut .= Xml::openElement( 'form',
159 [
160 'name' => 'searchbox',
161 'class' => 'searchbox',
162 'action' => SpecialPage::getTitleFor( 'Search' )->getLocalUrl(),
163 ] + $idArray
164 );
165 $htmlOut .= Xml::element( 'input',
166 [
167 'class' => $this->getLinebreakClasses() . 'searchboxInput mw-ui-input mw-ui-input-inline',
168 'name' => 'search',
169 'type' => $this->mHidden ? 'hidden' : 'text',
170 'value' => $this->mDefaultText,
171 'placeholder' => $this->mPlaceholderText,
172 'size' => $this->mWidth,
173 'dir' => $this->mDir,
174 ]
175 );
176
177 if ( $this->mPrefix != '' ) {
178 $htmlOut .= Html::hidden( 'prefix', $this->mPrefix );
179 }
180
181 if ( $this->mSearchFilter != '' ) {
182 $htmlOut .= Html::hidden( 'searchfilter', $this->mSearchFilter );
183 }
184
185 if ( $this->mTour != '' ) {
186 $htmlOut .= Html::hidden( 'tour', $this->mTour );
187 }
188
189 $htmlOut .= $this->mBR;
190
191 // Determine namespace checkboxes
192 $namespacesArray = explode( ',', $this->mNamespaces );
193 if ( $this->mNamespaces ) {
194 $contLang = MediaWikiServices::getInstance()->getContentLanguage();
195 $namespaces = $contLang->getNamespaces();
196 $nsAliases = array_merge( $contLang->getNamespaceAliases(), $wgNamespaceAliases );
197 $showNamespaces = [];
198 $checkedNS = [];
199 // Check for valid namespaces
200 foreach ( $namespacesArray as $userNS ) {
201 $userNS = trim( $userNS ); // no whitespace
202
203 // Namespace needs to be checked if flagged with "**"
204 if ( strpos( $userNS, '**' ) ) {
205 $userNS = str_replace( '**', '', $userNS );
206 $checkedNS[$userNS] = true;
207 }
208
209 $mainMsg = wfMessage( 'inputbox-ns-main' )->inContentLanguage()->text();
210 if ( $userNS == 'Main' || $userNS == $mainMsg ) {
211 $i = 0;
212 } elseif ( array_search( $userNS, $namespaces ) ) {
213 $i = array_search( $userNS, $namespaces );
214 } elseif ( isset( $nsAliases[$userNS] ) ) {
215 $i = $nsAliases[$userNS];
216 } else {
217 continue; // Namespace not recognized, skip
218 }
219 $showNamespaces[$i] = $userNS;
220 if ( isset( $checkedNS[$userNS] ) && $checkedNS[$userNS] ) {
221 $checkedNS[$i] = true;
222 }
223 }
224
225 // Show valid namespaces
226 foreach ( $showNamespaces as $i => $name ) {
227 $checked = [];
228 // Namespace flagged with "**" or if it's the only one
229 if ( ( isset( $checkedNS[$i] ) && $checkedNS[$i] ) || count( $showNamespaces ) == 1 ) {
230 $checked = [ 'checked' => 'checked' ];
231 }
232
233 if ( count( $showNamespaces ) == 1 ) {
234 // Checkbox
235 $htmlOut .= Xml::element( 'input',
236 [
237 'type' => 'hidden',
238 'name' => 'ns' . $i,
239 'value' => 1,
240 'id' => 'mw-inputbox-ns' . $i . $idRandStr
241 ] + $checked
242 );
243 } else {
244 // Checkbox
245 $htmlOut .= ' <div class="mw-inputbox-element mw-ui-checkbox">';
246 $htmlOut .= Xml::element( 'input',
247 [
248 'type' => 'checkbox',
249 'name' => 'ns' . $i,
250 'value' => 1,
251 'id' => 'mw-inputbox-ns' . $i . $idRandStr
252 ] + $checked
253 );
254 // Label
255 $htmlOut .= Xml::label( $name, 'mw-inputbox-ns' . $i . $idRandStr );
256 $htmlOut .= '</div> ';
257 }
258 }
259
260 // Line break
261 $htmlOut .= $this->mBR;
262 } elseif ( $type == 'search' ) {
263 // Go button
264 $htmlOut .= Xml::element( 'input',
265 [
266 'type' => 'submit',
267 'name' => 'go',
268 'class' => 'mw-ui-button',
269 'value' => $this->mButtonLabel
270 ]
271 );
272 $htmlOut .= "\u{00A0}";
273 }
274
275 // Search button
276 $htmlOut .= Xml::element( 'input',
277 [
278 'type' => 'submit',
279 'name' => 'fulltext',
280 'class' => 'mw-ui-button',
281 'value' => $this->mSearchButtonLabel
282 ]
283 );
284
285 // Hidden fulltext param for IE (bug 17161)
286 if ( $type == 'fulltext' ) {
287 $htmlOut .= Html::hidden( 'fulltext', 'Search' );
288 }
289
290 $htmlOut .= Xml::closeElement( 'form' );
291 $htmlOut .= Xml::closeElement( 'div' );
292
293 // Return HTML
294 return $htmlOut;
295 }
296
301 public function getSearchForm2() {
302 // Use button label fallbacks
303 if ( !$this->mButtonLabel ) {
304 $this->mButtonLabel = wfMessage( 'inputbox-tryexact' )->text();
305 }
306
307 if ( $this->mID !== '' ) {
308 $unescapedID = $this->mID;
309 } else {
310 // The label element needs a unique id, use
311 // random number to avoid multiple input boxes
312 // having conflicts.
313 $unescapedID = wfRandom();
314 }
315 $id = Sanitizer::escapeIdForAttribute( $unescapedID );
316 $htmlLabel = '';
317 if ( isset( $this->mLabelText ) && strlen( trim( $this->mLabelText ) ) ) {
318 $htmlLabel = Xml::openElement( 'label', [ 'for' => 'bodySearchInput' . $id ] );
319 $htmlLabel .= $this->mParser->recursiveTagParse( $this->mLabelText );
320 $htmlLabel .= Xml::closeElement( 'label' );
321 }
322 $htmlOut = Xml::openElement( 'form',
323 [
324 'name' => 'bodySearch' . $id,
325 'id' => 'bodySearch' . $id,
326 'class' => 'bodySearch' . ( $this->mInline ? ' mw-inputbox-inline' : '' ),
327 'action' => SpecialPage::getTitleFor( 'Search' )->getLocalUrl(),
328 ]
329 );
330 $htmlOut .= Xml::openElement( 'div',
331 [
332 'class' => 'bodySearchWrap' . ( $this->mInline ? ' mw-inputbox-inline' : '' ),
333 'style' => $this->bgColorStyle(),
334 ]
335 );
336 $htmlOut .= $htmlLabel;
337 $htmlOut .= Xml::element( 'input',
338 [
339 'type' => $this->mHidden ? 'hidden' : 'text',
340 'name' => 'search',
341 'class' => 'mw-ui-input mw-ui-input-inline',
342 'size' => $this->mWidth,
343 'id' => 'bodySearchInput' . $id,
344 'dir' => $this->mDir,
345 ]
346 );
347 $htmlOut .= "\u{00A0}" . Xml::element( 'input',
348 [
349 'type' => 'submit',
350 'name' => 'go',
351 'value' => $this->mButtonLabel,
352 'class' => 'mw-ui-button',
353 ]
354 );
355
356 // Better testing needed here!
357 if ( !empty( $this->mFullTextButton ) ) {
358 $htmlOut .= Xml::element( 'input',
359 [
360 'type' => 'submit',
361 'name' => 'fulltext',
362 'class' => 'mw-ui-button',
363 'value' => $this->mSearchButtonLabel
364 ]
365 );
366 }
367
368 $htmlOut .= Xml::closeElement( 'div' );
369 $htmlOut .= Xml::closeElement( 'form' );
370
371 // Return HTML
372 return $htmlOut;
373 }
374
379 public function getCreateForm() {
380 global $wgScript;
381
382 if ( $this->mType == "comment" ) {
383 if ( !$this->mButtonLabel ) {
384 $this->mButtonLabel = wfMessage( 'inputbox-postcomment' )->text();
385 }
386 } else {
387 if ( !$this->mButtonLabel ) {
388 $this->mButtonLabel = wfMessage( 'inputbox-createarticle' )->text();
389 }
390 }
391
392 $htmlOut = Xml::openElement( 'div',
393 [
394 'class' => 'mw-inputbox-centered',
395 'style' => $this->bgColorStyle(),
396 ]
397 );
398 $createBoxParams = [
399 'name' => 'createbox',
400 'class' => 'createbox',
401 'action' => $wgScript,
402 'method' => 'get'
403 ];
404 if ( $this->mID !== '' ) {
405 $createBoxParams['id'] = Sanitizer::escapeIdForAttribute( $this->mID );
406 }
407 $htmlOut .= Xml::openElement( 'form', $createBoxParams );
408 $editArgs = $this->getEditActionArgs();
409 $htmlOut .= Html::hidden( $editArgs['name'], $editArgs['value'] );
410 if ( $this->mPreload !== null ) {
411 $htmlOut .= Html::hidden( 'preload', $this->mPreload );
412 }
413 if ( is_array( $this->mPreloadparams ) ) {
414 foreach ( $this->mPreloadparams as $preloadparams ) {
415 $htmlOut .= Html::hidden( 'preloadparams[]', $preloadparams );
416 }
417 }
418 if ( $this->mEditIntro !== null ) {
419 $htmlOut .= Html::hidden( 'editintro', $this->mEditIntro );
420 }
421 if ( $this->mSummary !== null ) {
422 $htmlOut .= Html::hidden( 'summary', $this->mSummary );
423 }
424 if ( $this->mNosummary !== null ) {
425 $htmlOut .= Html::hidden( 'nosummary', $this->mNosummary );
426 }
427 if ( $this->mPrefix !== '' ) {
428 $htmlOut .= Html::hidden( 'prefix', $this->mPrefix );
429 }
430 if ( $this->mMinor !== null ) {
431 $htmlOut .= Html::hidden( 'minor', $this->mMinor );
432 }
433 if ( $this->mType == 'comment' ) {
434 $htmlOut .= Html::hidden( 'section', 'new' );
435 }
436 $htmlOut .= Xml::openElement( 'input',
437 [
438 'type' => $this->mHidden ? 'hidden' : 'text',
439 'name' => 'title',
440 'class' => $this->getLinebreakClasses() .
441 'mw-ui-input mw-ui-input-inline createboxInput',
442 'value' => $this->mDefaultText,
443 'placeholder' => $this->mPlaceholderText,
444 'size' => $this->mWidth,
445 'dir' => $this->mDir,
446 ]
447 );
448 $htmlOut .= $this->mBR;
449 $htmlOut .= Xml::openElement( 'input',
450 [
451 'type' => 'submit',
452 'name' => 'create',
453 'class' => 'mw-ui-button mw-ui-progressive createboxButton',
454 'value' => $this->mButtonLabel
455 ]
456 );
457 $htmlOut .= Xml::closeElement( 'form' );
458 $htmlOut .= Xml::closeElement( 'div' );
459
460 // Return HTML
461 return $htmlOut;
462 }
463
468 public function getMoveForm() {
469 global $wgScript;
470
471 if ( !$this->mButtonLabel ) {
472 $this->mButtonLabel = wfMessage( 'inputbox-movearticle' )->text();
473 }
474
475 $htmlOut = Xml::openElement( 'div',
476 [
477 'class' => 'mw-inputbox-centered',
478 'style' => $this->bgColorStyle(),
479 ]
480 );
481 $moveBoxParams = [
482 'name' => 'movebox',
483 'class' => 'mw-movebox',
484 'action' => $wgScript,
485 'method' => 'get'
486 ];
487 if ( $this->mID !== '' ) {
488 $moveBoxParams['id'] = Sanitizer::escapeIdForAttribute( $this->mID );
489 }
490 $htmlOut .= Xml::openElement( 'form', $moveBoxParams );
491 $htmlOut .= Html::hidden( 'title',
492 SpecialPage::getTitleFor( 'Movepage', $this->mPage )->getPrefixedText() );
493 $htmlOut .= Html::hidden( 'wpReason', $this->mSummary );
494 $htmlOut .= Html::hidden( 'prefix', $this->mPrefix );
495 $htmlOut .= Xml::openElement( 'input',
496 [
497 'type' => $this->mHidden ? 'hidden' : 'text',
498 'name' => 'wpNewTitle',
499 'class' => $this->getLinebreakClasses() . 'mw-moveboxInput mw-ui-input mw-ui-input-inline',
500 'value' => $this->mDefaultText,
501 'placeholder' => $this->mPlaceholderText,
502 'size' => $this->mWidth,
503 'dir' => $this->mDir,
504 ]
505 );
506 $htmlOut .= $this->mBR;
507 $htmlOut .= Xml::openElement( 'input',
508 [
509 'type' => 'submit',
510 'class' => 'mw-ui-button mw-ui-progressive',
511 'value' => $this->mButtonLabel
512 ]
513 );
514 $htmlOut .= Xml::closeElement( 'form' );
515 $htmlOut .= Xml::closeElement( 'div' );
516
517 // Return HTML
518 return $htmlOut;
519 }
520
525 public function getCommentForm() {
526 global $wgScript;
527
528 if ( !$this->mButtonLabel ) {
529 $this->mButtonLabel = wfMessage( 'inputbox-postcommenttitle' )->text();
530 }
531
532 $htmlOut = Xml::openElement( 'div',
533 [
534 'class' => 'mw-inputbox-centered',
535 'style' => $this->bgColorStyle(),
536 ]
537 );
538 $commentFormParams = [
539 'name' => 'commentbox',
540 'class' => 'commentbox',
541 'action' => $wgScript,
542 'method' => 'get'
543 ];
544 if ( $this->mID !== '' ) {
545 $commentFormParams['id'] = Sanitizer::escapeIdForAttribute( $this->mID );
546 }
547 $htmlOut .= Xml::openElement( 'form', $commentFormParams );
548 $editArgs = $this->getEditActionArgs();
549 $htmlOut .= Html::hidden( $editArgs['name'], $editArgs['value'] );
550 if ( $this->mPreload !== null ) {
551 $htmlOut .= Html::hidden( 'preload', $this->mPreload );
552 }
553 if ( is_array( $this->mPreloadparams ) ) {
554 foreach ( $this->mPreloadparams as $preloadparams ) {
555 $htmlOut .= Html::hidden( 'preloadparams[]', $preloadparams );
556 }
557 }
558 if ( $this->mEditIntro !== null ) {
559 $htmlOut .= Html::hidden( 'editintro', $this->mEditIntro );
560 }
561 $htmlOut .= Xml::openElement( 'input',
562 [
563 'type' => $this->mHidden ? 'hidden' : 'text',
564 'name' => 'preloadtitle',
565 'class' => $this->getLinebreakClasses() . 'commentboxInput mw-ui-input mw-ui-input-inline',
566 'value' => $this->mDefaultText,
567 'placeholder' => $this->mPlaceholderText,
568 'size' => $this->mWidth,
569 'dir' => $this->mDir,
570 ]
571 );
572 $htmlOut .= Html::hidden( 'section', 'new' );
573 $htmlOut .= Html::hidden( 'title', $this->mPage );
574 $htmlOut .= $this->mBR;
575 $htmlOut .= Xml::openElement( 'input',
576 [
577 'type' => 'submit',
578 'name' => 'create',
579 'class' => 'mw-ui-button mw-ui-progressive',
580 'value' => $this->mButtonLabel
581 ]
582 );
583 $htmlOut .= Xml::closeElement( 'form' );
584 $htmlOut .= Xml::closeElement( 'div' );
585
586 // Return HTML
587 return $htmlOut;
588 }
589
595 public function extractOptions( $text ) {
596 // Parse all possible options
597 $values = [];
598 foreach ( explode( "\n", $text ) as $line ) {
599 if ( strpos( $line, '=' ) === false ) {
600 continue;
601 }
602 list( $name, $value ) = explode( '=', $line, 2 );
603 $name = strtolower( trim( $name ) );
604 $value = Sanitizer::decodeCharReferences( trim( $value ) );
605 if ( $name == 'preloadparams[]' ) {
606 // We have to special-case this one because it's valid for it to appear more than once.
607 $this->mPreloadparams[] = $value;
608 } else {
609 $values[ $name ] = $value;
610 }
611 }
612
613 // Validate the dir value.
614 if ( isset( $values['dir'] ) && !in_array( $values['dir'], [ 'ltr', 'rtl' ] ) ) {
615 unset( $values['dir'] );
616 }
617
618 // Build list of options, with local member names
619 $options = [
620 'type' => 'mType',
621 'width' => 'mWidth',
622 'preload' => 'mPreload',
623 'page' => 'mPage',
624 'editintro' => 'mEditIntro',
625 'useve' => 'mUseVE',
626 'summary' => 'mSummary',
627 'nosummary' => 'mNosummary',
628 'minor' => 'mMinor',
629 'break' => 'mBR',
630 'default' => 'mDefaultText',
631 'placeholder' => 'mPlaceholderText',
632 'bgcolor' => 'mBGColor',
633 'buttonlabel' => 'mButtonLabel',
634 'searchbuttonlabel' => 'mSearchButtonLabel',
635 'fulltextbutton' => 'mFullTextButton',
636 'namespaces' => 'mNamespaces',
637 'labeltext' => 'mLabelText',
638 'hidden' => 'mHidden',
639 'id' => 'mID',
640 'inline' => 'mInline',
641 'prefix' => 'mPrefix',
642 'dir' => 'mDir',
643 'searchfilter' => 'mSearchFilter',
644 'tour' => 'mTour'
645 ];
646 // Options we should maybe run through lang converter.
647 $convertOptions = [
648 'default' => true,
649 'buttonlabel' => true,
650 'searchbuttonlabel' => true,
651 'placeholder' => true
652 ];
653 foreach ( $options as $name => $var ) {
654 if ( isset( $values[$name] ) ) {
655 $this->$var = $values[$name];
656 if ( isset( $convertOptions[$name] ) ) {
657 $this->$var = $this->languageConvert( $this->$var );
658 }
659 }
660 }
661
662 // Insert a line break if configured to do so
663 $this->mBR = ( strtolower( $this->mBR ) == "no" ) ? ' ' : '<br />';
664
665 // Validate the width; make sure it's a valid, positive integer
666 $this->mWidth = intval( $this->mWidth <= 0 ? 50 : $this->mWidth );
667
668 // Validate background color
669 if ( !$this->isValidColor( $this->mBGColor ) ) {
670 $this->mBGColor = 'transparent';
671 }
672 }
673
679 public function isValidColor( $color ) {
680 $regex = <<<REGEX
681 /^ (
682 [a-zA-Z]* | # color names
683 \# [0-9a-f]{3} | # short hexadecimal
684 \# [0-9a-f]{6} | # long hexadecimal
685 rgb \s* \‍( \s* (
686 \d+ \s* , \s* \d+ \s* , \s* \d+ | # rgb integer
687 [0-9.]+% \s* , \s* [0-9.]+% \s* , \s* [0-9.]+% # rgb percent
688 ) \s* \)
689 ) $ /xi
690REGEX;
691 return (bool)preg_match( $regex, $color );
692 }
693
694 private function bgColorStyle() {
695 if ( $this->mBGColor != 'transparent' ) {
696 return 'background-color: ' . $this->mBGColor . ';';
697 }
698 return '';
699 }
700
707 private function shouldUseVE() {
708 return ExtensionRegistry::getInstance()->isLoaded( 'VisualEditor' ) && $this->mUseVE !== null;
709 }
710
727 private function languageConvert( $text ) {
728 $lang = $this->mParser->getTargetLanguage();
729 if ( $lang->hasVariants() && strpos( $text, '-{' ) !== false ) {
730 $text = $lang->convert( $text );
731 }
732 return $text;
733 }
734}
$wgScript
The URL path to index.php.
$wgNamespaceAliases
Namespace aliases.
wfRandom()
Get a random decimal value in the domain of [0, 1), in a way not likely to give duplicate values for ...
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
$line
Definition cdb.php:59
if( $line===false) $args
Definition cdb.php:64
InputBox class.
Definition InputBox.php:14
$mPlaceholderText
Definition InputBox.php:31
$mSearchButtonLabel
Definition InputBox.php:34
isValidColor( $color)
Do a security check on the bgcolor parameter.
Definition InputBox.php:679
getEditActionArgs()
Returns the action name and value to use in inputboxes which redirects to edit pages.
Definition InputBox.php:101
languageConvert( $text)
For compatability with pre T119158 behaviour.
Definition InputBox.php:727
bgColorStyle()
Definition InputBox.php:694
__construct( $parser)
Definition InputBox.php:51
getSearchForm2()
Generate search form version 2.
Definition InputBox.php:301
$mFullTextButton
Definition InputBox.php:35
getLinebreakClasses()
Get common classes, that could be added and depend on, if a line break between a button and an input ...
Definition InputBox.php:123
getSearchForm( $type)
Generate search form.
Definition InputBox.php:132
getMoveForm()
Generate move page form.
Definition InputBox.php:468
getCreateForm()
Generate create page form.
Definition InputBox.php:379
getCommentForm()
Generate new section form.
Definition InputBox.php:525
extractOptions( $text)
Extract options from a blob of text.
Definition InputBox.php:595
shouldUseVE()
Returns true, if the VisualEditor is requested from the inputbox wikitext definition and if the Visua...
Definition InputBox.php:707
$mPreloadparams
Definition InputBox.php:22
MediaWikiServices is the service locator for the application scope of MediaWiki.
return true
Definition router.php:94
if(!isset( $args[0])) $lang