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
(bug 9219) Auth plugins can control editing RealName/Email/Nick preferences. Based...
[lhc/web/wiklou.git]
/
includes
/
Preferences.php
diff --git
a/includes/Preferences.php
b/includes/Preferences.php
index
2040bb5
..
652ac08
100644
(file)
--- a/
includes/Preferences.php
+++ b/
includes/Preferences.php
@@
-138,11
+138,11
@@
class Preferences {
}
// Actually changeable stuff
}
// Actually changeable stuff
- global $wgAllowRealName;
+ global $wgAllowRealName
, $wgAuth
;
if ($wgAllowRealName) {
$defaultPreferences['realname'] =
array(
if ($wgAllowRealName) {
$defaultPreferences['realname'] =
array(
- 'type' =>
'text
',
+ 'type' =>
$wgAuth->allowRealNameChange() ? 'text' : 'info
',
'default' => $user->getRealName(),
'section' => 'personal/info',
'label-message' => 'yourrealname',
'default' => $user->getRealName(),
'section' => 'personal/info',
'label-message' => 'yourrealname',
@@
-164,7
+164,6
@@
class Preferences {
'help-message' => 'prefs-help-gender',
);
'help-message' => 'prefs-help-gender',
);
- global $wgAuth;
if ($wgAuth->allowPasswordChange()) {
global $wgUser; // For skin.
$link = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'ResetPass' ),
if ($wgAuth->allowPasswordChange()) {
global $wgUser; // For skin.
$link = $wgUser->getSkin()->link( SpecialPage::getTitleFor( 'ResetPass' ),
@@
-253,7
+252,7
@@
class Preferences {
global $wgMaxSigChars;
$defaultPreferences['nickname'] =
array(
global $wgMaxSigChars;
$defaultPreferences['nickname'] =
array(
- 'type' =>
'text
',
+ 'type' =>
$wgAuth->allowNickChange() ? 'text' : 'info
',
'maxlength' => $wgMaxSigChars,
'label-message' => 'yournick',
'validation-callback' =>
'maxlength' => $wgMaxSigChars,
'label-message' => 'yournick',
'validation-callback' =>
@@
-274,7
+273,7
@@
class Preferences {
$defaultPreferences['emailaddress'] =
array(
$defaultPreferences['emailaddress'] =
array(
- 'type' =>
'text
',
+ 'type' =>
$wgAuth->allowEmailChange() ? 'text' : 'info
',
'default' => $user->getEmail(),
'section' => 'personal/email',
'label-message' => 'youremail',
'default' => $user->getEmail(),
'section' => 'personal/email',
'label-message' => 'youremail',