Don't hard-code Preferences page name
[lhc/web/wiklou.git] / includes / Preferences.php
index 039d99c..04a3637 100644 (file)
@@ -1044,6 +1044,11 @@ class Preferences {
                        'section' => 'watchlist/advancedwatchlist',
                        'label-message' => 'tog-watchlistreloadautomatically',
                ];
+               $defaultPreferences['watchlistunwatchlinks'] = [
+                       'type' => 'toggle',
+                       'section' => 'watchlist/advancedwatchlist',
+                       'label-message' => 'tog-watchlistunwatchlinks',
+               ];
 
                if ( $config->get( 'RCWatchCategoryMembership' ) ) {
                        $defaultPreferences['watchlisthidecategorization'] = [
@@ -1677,7 +1682,7 @@ class PreferencesForm extends HTMLForm {
                $html = parent::getButtons();
 
                if ( $this->getModifiedUser()->isAllowed( 'editmyoptions' ) ) {
-                       $t = SpecialPage::getTitleFor( 'Preferences', 'reset' );
+                       $t = $this->getTitle()->getSubpage( 'reset' );
 
                        $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                        $html .= "\n" . $linkRenderer->makeLink( $t, $this->msg( 'restoreprefs' )->text(),