aboutsummaryrefslogtreecommitdiffstats
path: root/includes/api/ApiOptions.php
diff options
context:
space:
mode:
authorBrad Jorsch <bjorsch@wikimedia.org>2013-10-10 10:54:08 -0400
committerBrad Jorsch <bjorsch@wikimedia.org>2013-10-10 11:02:04 -0400
commitb393835bda6c6359dee4dfa5004d24319af262a3 (patch)
treed3787ce175dbf9e38eba9358f4a7f1752ac7138a /includes/api/ApiOptions.php
parent7d1cd6c376c4ae941a8f654815daad75f0146b2e (diff)
downloadmediawikicore-b393835bda6c6359dee4dfa5004d24319af262a3.tar.gz
mediawikicore-b393835bda6c6359dee4dfa5004d24319af262a3.zip
API: Handle "special" options in action=options
There are certain preferences, such as realname and emailaddress, that are handled specially in Special:Preferences and are not accessible by User::getOptions or User::setOptions. But action=options was allowing a 'dummy' version to be set in User::setOptions. Change-Id: I4c1b3d8e1eae9520228d7b6da9c41ada80f7c387
Diffstat (limited to 'includes/api/ApiOptions.php')
-rw-r--r--includes/api/ApiOptions.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/api/ApiOptions.php b/includes/api/ApiOptions.php
index b5aec7716a76..c9d63784e02f 100644
--- a/includes/api/ApiOptions.php
+++ b/includes/api/ApiOptions.php
@@ -99,6 +99,9 @@ class ApiOptions extends ApiBase {
$validation = true;
}
break;
+ case 'special':
+ $validation = "cannot be set by this module";
+ break;
case 'unused':
default:
$validation = "not a valid preference";