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 "resourceloader: Add Doxygen group and improve overall docs"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialPreferences.php
diff --git
a/includes/specials/SpecialPreferences.php
b/includes/specials/SpecialPreferences.php
index
cc7ed55
..
d541ead
100644
(file)
--- a/
includes/specials/SpecialPreferences.php
+++ b/
includes/specials/SpecialPreferences.php
@@
-106,7
+106,7
@@
class SpecialPreferences extends SpecialPage {
* Get the preferences form to use.
* @param User $user The user.
* @param IContextSource $context The context.
* Get the preferences form to use.
* @param User $user The user.
* @param IContextSource $context The context.
- * @return PreferencesForm
Legacy
|HTMLForm
+ * @return PreferencesForm
OOUI
|HTMLForm
*/
protected function getFormObject( $user, IContextSource $context ) {
$preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory();
*/
protected function getFormObject( $user, IContextSource $context ) {
$preferencesFactory = MediaWikiServices::getInstance()->getPreferencesFactory();
@@
-115,7
+115,10
@@
class SpecialPreferences extends SpecialPage {
}
protected function showResetForm() {
}
protected function showResetForm() {
- if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
+ if ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'editmyoptions' )
+ ) {
throw new PermissionsError( 'editmyoptions' );
}
throw new PermissionsError( 'editmyoptions' );
}
@@
-134,7
+137,10
@@
class SpecialPreferences extends SpecialPage {
}
public function submitReset( $formData ) {
}
public function submitReset( $formData ) {
- if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
+ if ( !MediaWikiServices::getInstance()
+ ->getPermissionManager()
+ ->userHasRight( $this->getUser(), 'editmyoptions' )
+ ) {
throw new PermissionsError( 'editmyoptions' );
}
throw new PermissionsError( 'editmyoptions' );
}