r70585 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70584‎ | r70585 | r70586 >
Date:19:07, 6 August 2010
Author:huji
Status:reverted (Comments)
Tags:
Comment:
(bug 24700) Update dialog shown when clicking on the special page tab after saving preferences
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPreferences.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialPreferences.php
@@ -45,7 +45,7 @@
4646
4747 $wgOut->addScriptFile( 'prefs.js' );
4848
49 - if ( $wgRequest->getCheck( 'success' ) ) {
 49+ if ( $wgRequest->getCheck( 'success' ) && $wgRequest->wasPosted()) {
5050 $wgOut->wrapWikiMsg(
5151 "<div class=\"successbox\"><strong>\n$1\n</strong></div><div id=\"mw-pref-clear\"></div>",
5252 'savedprefs'
Index: trunk/phase3/RELEASE-NOTES
@@ -278,6 +278,8 @@
279279 instead of showing an error page
280280 * (bug 24425) Use Database::replace instead of delete/insert in SqlBagOStuff::set
281281 to avoid query errors about duplicate keynames.
 282+* (bug 24700) Update dialog shown when clicking on the special page tab after
 283+ saving preferences
282284
283285 === API changes in 1.17 ===
284286 * (bug 22738) Allow filtering by action type on query=logevent.

Follow-up revisions

RevisionCommit summaryAuthorDate
r70746Reverting r70585 since it breaks the whole functionality. Bug 24700 reopened.huji06:33, 9 August 2010

Comments

#Comment by Simetrical (talk | contribs)   20:32, 8 August 2010

This has stopped the success box from showing at all, for me. At a glance, the problem seems to be that the POST URL redirects to a GET URL, so you never see the result of the POST URL. Thanks a lot for the detailed description of the problem, though -- that made it very easy for me to test whether the fix worked.

(Also, you should have a space before the closing parenthesis, like

+ if ( $wgRequest->getCheck( 'success' ) && $wgRequest->wasPosted() ) {

rather than

+ if ( $wgRequest->getCheck( 'success' ) && $wgRequest->wasPosted()) {

but that's a nitpick.)

#Comment by Nikerabbit (talk | contribs)   05:49, 9 August 2010

And if I remember correctly, it does the redirect to show the page in correct language if the user just changed it. I don't remember whether it was intelligent enough to check if language (or something else which also needs that) was changed.

#Comment by Huji (talk | contribs)   06:34, 9 August 2010

In that case, I'll revert it and reopen the bug, seeking a better solution (reverted with r70746).

Status & tagging log