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
Allow preferences that need not be rendered in Special:Preferences
[lhc/web/wiklou.git]
/
includes
/
Preferences.php
diff --git
a/includes/Preferences.php
b/includes/Preferences.php
index
9a10867
..
e41fbc0
100644
(file)
--- a/
includes/Preferences.php
+++ b/
includes/Preferences.php
@@
-1240,6
+1240,13
@@
class Preferences {
$formDescriptor = array_diff_key( $formDescriptor, $removeKeys );
}
$formDescriptor = array_diff_key( $formDescriptor, $removeKeys );
}
+ // Remove type=api preferences. They are not intended for rendering in the form.
+ foreach ( $formDescriptor as $name => $info ) {
+ if ( isset( $info['type'] ) && $info['type'] === 'api' ) {
+ unset( $formDescriptor[$name] );
+ }
+ }
+
/**
* @var $htmlForm PreferencesForm
*/
/**
* @var $htmlForm PreferencesForm
*/
@@
-1326,7
+1333,7
@@
class Preferences {
* @param $alldata
* @return int
*/
* @param $alldata
* @return int
*/
- static function filterIntval( $value, $alldata ){
+ static function filterIntval( $value, $alldata )
{
return intval( $value );
}
return intval( $value );
}