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
Revert "Move NewPP limit report HTML comments to JS variables" and followups
[lhc/web/wiklou.git]
/
includes
/
FormOptions.php
diff --git
a/includes/FormOptions.php
b/includes/FormOptions.php
index
5e5e8d4
..
725a512
100644
(file)
--- a/
includes/FormOptions.php
+++ b/
includes/FormOptions.php
@@
-52,6
+52,9
@@
class FormOptions implements ArrayAccess {
* This is useful for the namespace selector.
*/
const INTNULL = 3;
* This is useful for the namespace selector.
*/
const INTNULL = 3;
+ /** Array type, maps guessType() to WebRequest::getArray()
+ * @since 1.29 */
+ const ARR = 5;
/* @} */
/**
/* @} */
/**
@@
-120,6
+123,8
@@
class FormOptions implements ArrayAccess {
return self::FLOAT;
} elseif ( is_string( $data ) ) {
return self::STRING;
return self::FLOAT;
} elseif ( is_string( $data ) ) {
return self::STRING;
+ } elseif ( is_array( $data ) ) {
+ return self::ARR;
} else {
throw new MWException( 'Unsupported datatype' );
}
} else {
throw new MWException( 'Unsupported datatype' );
}
@@
-358,6
+363,9
@@
class FormOptions implements ArrayAccess {
case self::INTNULL:
$value = $r->getIntOrNull( $name );
break;
case self::INTNULL:
$value = $r->getIntOrNull( $name );
break;
+ case self::ARR:
+ $value = $r->getArray( $name );
+ break;
default:
throw new MWException( 'Unsupported datatype' );
}
default:
throw new MWException( 'Unsupported datatype' );
}
@@
-370,7
+378,7
@@
class FormOptions implements ArrayAccess {
/** @name ArrayAccess functions
* These functions implement the ArrayAccess PHP interface.
/** @name ArrayAccess functions
* These functions implement the ArrayAccess PHP interface.
- * @see http
://
php.net/manual/en/class.arrayaccess.php
+ * @see http
s://secure.
php.net/manual/en/class.arrayaccess.php
*/
/* @{ */
/**
*/
/* @{ */
/**