X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FPreferences.php;h=5413f30caeb32529b6c1294088011f11c3d76eaf;hb=aea3a5dce215b9f3929d65365fe9bd101ecdf07d;hp=cf4d5c91b54a7378f780f88a1fb73f3296de1272;hpb=5de26bec5939c28849245e721252243b4c250c57;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Preferences.php b/includes/Preferences.php index cf4d5c91b5..5413f30cae 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -403,7 +403,12 @@ class Preferences { } // show a preview of the old signature first - $oldsigWikiText = $wgParser->preSaveTransform( "~~~", $context->getTitle(), $user, ParserOptions::newFromContext( $context ) ); + $oldsigWikiText = $wgParser->preSaveTransform( + '~~~', + $context->getTitle(), + $user, + ParserOptions::newFromContext( $context ) + ); $oldsigHTML = $context->getOutput()->parseInline( $oldsigWikiText, true, true ); $defaultPreferences['oldsig'] = array( 'type' => 'info', @@ -423,7 +428,8 @@ class Preferences { $defaultPreferences['fancysig'] = array( 'type' => 'toggle', 'label-message' => 'tog-fancysig', - 'help-message' => 'prefs-help-signature', // show general help about signature at the bottom of the section + // show general help about signature at the bottom of the section + 'help-message' => 'prefs-help-signature', 'section' => 'personal/signature' ); @@ -742,7 +748,7 @@ class Preferences { } $defaultPreferences['stubthreshold'] = array( - 'type' => 'selectorother', + 'type' => 'select', 'section' => 'rendering/advancedrendering', 'options' => $stubThresholdOptions, 'size' => 20, @@ -756,11 +762,6 @@ class Preferences { 'label-message' => 'tog-showtoc', ); } - $defaultPreferences['nocache'] = array( - 'type' => 'toggle', - 'label-message' => 'tog-nocache', - 'section' => 'rendering/advancedrendering', - ); $defaultPreferences['showhiddencats'] = array( 'type' => 'toggle', 'section' => 'rendering/advancedrendering', @@ -1046,14 +1047,6 @@ class Preferences { static function searchPreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgContLang, $wgVectorUseSimpleSearch; - ## Search ##################################### - $defaultPreferences['searchlimit'] = array( - 'type' => 'int', - 'label-message' => 'resultsperpage', - 'section' => 'searchoptions/displaysearchoptions', - 'min' => 0, - ); - if ( $wgVectorUseSimpleSearch ) { $defaultPreferences['vector-simplesearch'] = array( 'type' => 'toggle', @@ -1140,7 +1133,10 @@ class Preferences { $linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() ); } - $display = $sn . ' ' . $context->msg( 'parentheses', $context->getLanguage()->pipeList( $linkTools ) )->text(); + $display = $sn . ' ' . $context->msg( + 'parentheses', + $context->getLanguage()->pipeList( $linkTools ) + )->text(); $ret[$display] = $skinkey; } @@ -1231,8 +1227,13 @@ class Preferences { $form->msg( 'badsiglength' )->numParams( $wgMaxSigChars )->text() ); } elseif ( isset( $alldata['fancysig'] ) && $alldata['fancysig'] && - false === $wgParser->validateSig( $signature ) ) { - return Xml::element( 'span', array( 'class' => 'error' ), $form->msg( 'badsig' )->text() ); + $wgParser->validateSig( $signature ) === false + ) { + return Xml::element( + 'span', + array( 'class' => 'error' ), + $form->msg( 'badsig' )->text() + ); } else { return true; } @@ -1263,7 +1264,12 @@ class Preferences { * @param array $remove array of items to remove * @return HtmlForm */ - static function getFormObject( $user, IContextSource $context, $formClass = 'PreferencesForm', array $remove = array() ) { + static function getFormObject( + $user, + IContextSource $context, + $formClass = 'PreferencesForm', + array $remove = array() + ) { $formDescriptor = Preferences::getPreferences( $user, $context ); if ( count( $remove ) ) { $removeKeys = array_flip( $remove ); @@ -1304,9 +1310,16 @@ class Preferences { $timestamp = MWTimestamp::getLocalInstance(); // Check that $wgLocalTZoffset is the same as the local time zone offset if ( $wgLocalTZoffset == $timestamp->format( 'Z' ) / 60 ) { - $server_tz_msg = $context->msg( 'timezoneuseserverdefault', $timestamp->getTimezone()->getName() )->text(); + $server_tz_msg = $context->msg( + 'timezoneuseserverdefault', + $timestamp->getTimezone()->getName() + )->text(); } else { - $tzstring = sprintf( '%+03d:%02d', floor( $wgLocalTZoffset / 60 ), abs( $wgLocalTZoffset ) % 60 ); + $tzstring = sprintf( + '%+03d:%02d', + floor( $wgLocalTZoffset / 60 ), + abs( $wgLocalTZoffset ) % 60 + ); $server_tz_msg = $context->msg( 'timezoneuseserverdefault', $tzstring )->text(); } $opt[$server_tz_msg] = "System|$wgLocalTZoffset";