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 "(bug 43498) (bug 43574) Two wikilink types and {{int:}}."
[lhc/web/wiklou.git]
/
includes
/
Preferences.php
diff --git
a/includes/Preferences.php
b/includes/Preferences.php
index
9a10867
..
9878396
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 );
}
@@
-1406,9
+1413,8
@@
class Preferences {
$formData[$pref] = $user->getOption( $pref, null, true );
}
$formData[$pref] = $user->getOption( $pref, null, true );
}
- // Keeps old preferences from interfering due to back-compat
- // code, etc.
- $user->resetOptions();
+ // Keep old preferences from interfering due to back-compat code, etc.
+ $user->resetOptions( 'unused', $form->getContext() );
foreach ( $formData as $key => $value ) {
$user->setOption( $key, $value );
foreach ( $formData as $key => $value ) {
$user->setOption( $key, $value );