MediaWiki REL1_33
HTMLSelectLimitField.php
Go to the documentation of this file.
1<?php
2
15 public function validate( $value, $alldata ) {
16 if ( $value == '' ) {
17 return true;
18 }
19
20 // Let folks pick an explicit limit not from our list, as long as it's a real numbr.
21 if ( !in_array( $value, $this->mParams['options'] )
22 && $value == intval( $value )
23 && $value > 0
24 ) {
25 // This adds the explicitly requested limit value to the drop-down,
26 // then makes sure it's sorted correctly so when we output the list
27 // later, the custom option doesn't just show up last.
28 $this->mParams['options'][$this->mParent->getLanguage()->formatNum( $value )] =
29 intval( $value );
30 asort( $this->mParams['options'] );
31 }
32
33 return true;
34 }
35}
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
A select dropdown field.
A limit dropdown, which accepts any valid number.
validate( $value, $alldata)
Basically don't do any validation.