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 "StringUtils: Add a utility for checking if a string is a valid regex"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialPreferences.php
diff --git
a/includes/specials/SpecialPreferences.php
b/includes/specials/SpecialPreferences.php
index
04be22b
..
d541ead
100644
(file)
--- a/
includes/specials/SpecialPreferences.php
+++ b/
includes/specials/SpecialPreferences.php
@@
-53,7
+53,10
@@
class SpecialPreferences extends SpecialPage {
}
$out->addModules( 'mediawiki.special.preferences.ooui' );
}
$out->addModules( 'mediawiki.special.preferences.ooui' );
- $out->addModuleStyles( 'mediawiki.special.preferences.styles.ooui' );
+ $out->addModuleStyles( [
+ 'mediawiki.special.preferences.styles.ooui',
+ 'mediawiki.widgets.TagMultiselectWidget.styles',
+ ] );
$out->addModuleStyles( 'oojs-ui-widgets.styles' );
$session = $this->getRequest()->getSession();
$out->addModuleStyles( 'oojs-ui-widgets.styles' );
$session = $this->getRequest()->getSession();
@@
-103,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();
@@
-112,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' );
}
@@
-131,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' );
}