dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "Handle null data return in HTMLForm"
[lhc/web/wiklou.git]
/
includes
/
htmlform
/
HTMLCheckField.php
diff --git
a/includes/htmlform/HTMLCheckField.php
b/includes/htmlform/HTMLCheckField.php
index
13f30c2
..
4a6b804
100644
(file)
--- a/
includes/htmlform/HTMLCheckField.php
+++ b/
includes/htmlform/HTMLCheckField.php
@@
-56,9
+56,8
@@
class HTMLCheckField extends HTMLFormField {
$attr['id'] = $this->mID;
$attr['name'] = $this->mName;
$attr['id'] = $this->mID;
$attr['name'] = $this->mName;
- $attr += $this->getAttributes(
- [ 'disabled', 'tabindex' ],
- [ 'tabindex' => 'tabIndex' ]
+ $attr += OOUI\Element::configFromHtmlAttributes(
+ $this->getAttributes( [ 'disabled', 'tabindex' ] )
);
if ( $this->mClass !== '' ) {
);
if ( $this->mClass !== '' ) {
@@
-112,7
+111,7
@@
class HTMLCheckField extends HTMLFormField {
/**
* @param WebRequest $request
*
/**
* @param WebRequest $request
*
- * @return
string
+ * @return
bool
*/
function loadDataFromRequest( $request ) {
$invert = isset( $this->mParams['invert'] ) && $this->mParams['invert'];
*/
function loadDataFromRequest( $request ) {
$invert = isset( $this->mParams['invert'] ) && $this->mParams['invert'];
@@
-126,7
+125,7
@@
class HTMLCheckField extends HTMLFormField {
? !$request->getBool( $this->mName )
: $request->getBool( $this->mName );
} else {
? !$request->getBool( $this->mName )
: $request->getBool( $this->mName );
} else {
- return $this->getDefault();
+ return
(bool)
$this->getDefault();
}
}
}
}
}
}