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
Rename Watchlist request parameters for consistency with RC's ones
[lhc/web/wiklou.git]
/
includes
/
Preferences.php
diff --git
a/includes/Preferences.php
b/includes/Preferences.php
index
d498770
..
5413f30
100644
(file)
--- a/
includes/Preferences.php
+++ b/
includes/Preferences.php
@@
-403,7
+403,12
@@
class Preferences {
}
// show a preview of the old signature first
}
// 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',
$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',
$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'
);
'section' => 'personal/signature'
);
@@
-742,7
+748,7
@@
class Preferences {
}
$defaultPreferences['stubthreshold'] = array(
}
$defaultPreferences['stubthreshold'] = array(
- 'type' => 'select
orother
',
+ 'type' => 'select',
'section' => 'rendering/advancedrendering',
'options' => $stubThresholdOptions,
'size' => 20,
'section' => 'rendering/advancedrendering',
'options' => $stubThresholdOptions,
'size' => 20,
@@
-756,11
+762,6
@@
class Preferences {
'label-message' => 'tog-showtoc',
);
}
'label-message' => 'tog-showtoc',
);
}
- $defaultPreferences['nocache'] = array(
- 'type' => 'toggle',
- 'label-message' => 'tog-nocache',
- 'section' => 'rendering/advancedrendering',
- );
$defaultPreferences['showhiddencats'] = array(
'type' => 'toggle',
'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;
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',
if ( $wgVectorUseSimpleSearch ) {
$defaultPreferences['vector-simplesearch'] = array(
'type' => 'toggle',
@@
-1062,12
+1055,6
@@
class Preferences {
);
}
);
}
- $defaultPreferences['disablesuggest'] = array(
- 'type' => 'toggle',
- 'label-message' => 'mwsuggest-disable',
- 'section' => 'searchoptions/displaysearchoptions',
- );
-
$defaultPreferences['searcheverything'] = array(
'type' => 'toggle',
'label-message' => 'searcheverything-enable',
$defaultPreferences['searcheverything'] = array(
'type' => 'toggle',
'label-message' => 'searcheverything-enable',
@@
-1146,7
+1133,10
@@
class Preferences {
$linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
}
$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;
}
$ret[$display] = $skinkey;
}
@@
-1237,8
+1227,13
@@
class Preferences {
$form->msg( 'badsiglength' )->numParams( $wgMaxSigChars )->text() );
} elseif ( isset( $alldata['fancysig'] ) &&
$alldata['fancysig'] &&
$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;
}
} else {
return true;
}
@@
-1269,7
+1264,12
@@
class Preferences {
* @param array $remove array of items to remove
* @return HtmlForm
*/
* @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 );
$formDescriptor = Preferences::getPreferences( $user, $context );
if ( count( $remove ) ) {
$removeKeys = array_flip( $remove );
@@
-1310,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 ) {
$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 {
} 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";
$server_tz_msg = $context->msg( 'timezoneuseserverdefault', $tzstring )->text();
}
$opt[$server_tz_msg] = "System|$wgLocalTZoffset";