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 "Add tests for WikiMap and WikiReference"
[lhc/web/wiklou.git]
/
includes
/
specials
/
SpecialPreferences.php
diff --git
a/includes/specials/SpecialPreferences.php
b/includes/specials/SpecialPreferences.php
index
51454f6
..
4b75e5f
100644
(file)
--- a/
includes/specials/SpecialPreferences.php
+++ b/
includes/specials/SpecialPreferences.php
@@
-50,11
+50,20
@@
class SpecialPreferences extends SpecialPage {
if ( $this->getRequest()->getCheck( 'success' ) ) {
$out->wrapWikiMsg(
if ( $this->getRequest()->getCheck( 'success' ) ) {
$out->wrapWikiMsg(
- "<div class=\"successbox\">\n$1\n</div>",
+ Html::rawElement(
+ 'div',
+ array(
+ 'class' => 'mw-preferences-messagebox successbox',
+ 'id' => 'mw-preferences-success'
+ ),
+ Html::element( 'p', array(), '$1' )
+ ),
'savedprefs'
);
}
'savedprefs'
);
}
+ $this->addHelpLink( 'Help:Preferences' );
+
$htmlForm = Preferences::getFormObject( $this->getUser(), $this->getContext() );
$htmlForm->setSubmitCallback( array( 'Preferences', 'tryUISubmit' ) );
$htmlForm = Preferences::getFormObject( $this->getUser(), $this->getContext() );
$htmlForm->setSubmitCallback( array( 'Preferences', 'tryUISubmit' ) );
@@
-69,10
+78,11
@@
class SpecialPreferences extends SpecialPage {
$this->getOutput()->addWikiMsg( 'prefs-reset-intro' );
$context = new DerivativeContext( $this->getContext() );
$this->getOutput()->addWikiMsg( 'prefs-reset-intro' );
$context = new DerivativeContext( $this->getContext() );
- $context->setTitle( $this->getTitle( 'reset' ) ); // Reset subpage
+ $context->setTitle( $this->get
Page
Title( 'reset' ) ); // Reset subpage
$htmlForm = new HTMLForm( array(), $context, 'prefs-restore' );
$htmlForm->setSubmitTextMsg( 'restoreprefs' );
$htmlForm = new HTMLForm( array(), $context, 'prefs-restore' );
$htmlForm->setSubmitTextMsg( 'restoreprefs' );
+ $htmlForm->setSubmitDestructive();
$htmlForm->setSubmitCallback( array( $this, 'submitReset' ) );
$htmlForm->suppressReset();
$htmlForm->setSubmitCallback( array( $this, 'submitReset' ) );
$htmlForm->suppressReset();
@@
-88,7
+98,7
@@
class SpecialPreferences extends SpecialPage {
$user->resetOptions( 'all', $this->getContext() );
$user->saveSettings();
$user->resetOptions( 'all', $this->getContext() );
$user->saveSettings();
- $url = $this->getTitle()->getFullURL( 'success' );
+ $url = $this->get
Page
Title()->getFullURL( 'success' );
$this->getOutput()->redirect( $url );
$this->getOutput()->redirect( $url );