Fix hook documentation for PageRenderingHash
[lhc/web/wiklou.git] / includes / Preferences.php
index cd675c6..d0475c1 100644 (file)
@@ -751,7 +751,11 @@ class Preferences {
                        'type' => 'select',
                        'section' => 'rendering/advancedrendering',
                        'options' => $stubThresholdOptions,
-                       'label-raw' => $context->msg( 'stub-threshold' )->text(), // Raw HTML message. Yay?
+                       // This is not a raw HTML message; label-raw is needed for the manual <a></a>
+                       'label-raw' => $context->msg( 'stub-threshold' )->rawParams(
+                               '<a href="#" class="stub">' .
+                               $context->msg( 'stub-threshold-sample-link' )->parse() .
+                               '</a>' )->parse(),
                );
 
                $defaultPreferences['showhiddencats'] = array(
@@ -1429,10 +1433,10 @@ class Preferences {
                        }
 
                        Hooks::run( 'PreferencesFormPreSave', array( $formData, $form, $user, &$result ) );
-                       $user->saveSettings();
                }
 
                $wgAuth->updateExternalDB( $user );
+               $user->saveSettings();
 
                return $result;
        }