Last modified: 2007-07-10 21:48:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T11153, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 9153 - Remove timed redirect/refresh on "return to" pages
Remove timed redirect/refresh on "return to" pages
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Interface (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2007-03-02 19:33 UTC by Fernando Correia
Modified: 2007-07-10 21:48 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Fernando Correia 2007-03-02 19:33:19 UTC
In function returnToMain() of OutputPage, use a global variable instead of the
magic number 10 so the refresh delay can be configured in LocalSettings.php.

The default delay may be too long. For instance with 5 seconds the message still
could be read and the user would not have to click the link.

Proposed solution:

$wgRedirectDelay = 10;
Comment 1 Rob Church 2007-03-02 19:38:47 UTC
"Too long" and "too short", for reading purposes, is subjective.
Comment 2 Fernando Correia 2007-03-02 19:44:13 UTC
Agreed. That's why the wiki administrator should be able to decide the issue.
For instance, why 10 instead of 9 or 11?
Comment 3 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-03-02 21:51:50 UTC
Why do we have a delayed redirect anyway?  Those are evil.  Slow readers,
opening in another tab, tiny screens so you haven't even scrolled down to the
message before it goes away, slow output devices like screen readers . . .
Comment 4 Brion Vibber 2007-03-06 19:06:48 UTC
We should remove the delayed redirects entirely; they're poorly accessible and
annoying to everyone.
Comment 5 Fernando Correia 2007-03-06 20:41:39 UTC
Agreed. I think that would make implementation of Bug 7129 even more valuable.
Comment 6 Chad H. 2007-07-10 14:00:59 UTC
As a temporary fix until/unless all redirects are made seamless (either via AJAX or removing them entirely), here's a fix for OutputPage.php. Setting $wgRedirectDelay in DefaultSettings to 10 will leave functionality as it is now, but of course users can override that in their LocalSettings

Index: OutputPage.php
===================================================================
--- OutputPage.php	(revision 23952)
+++ OutputPage.php	(working copy)
@@ -1076,7 +1076,7 @@
 	 * @param $returnto page title to return to. Default is Main Page.
 	 */
 	public function returnToMain( $auto = true, $returnto = NULL ) {
-		global $wgUser, $wgOut, $wgRequest;
+		global $wgUser, $wgOut, $wgRequest, $wgRedirectDelay;
 		
 		if ( $returnto == NULL ) {
 			$returnto = $wgRequest->getText( 'returnto' );
@@ -1100,7 +1100,7 @@
 
 		$r = wfMsg( 'returnto', $link );
 		if ( $auto ) {
-			$wgOut->addMeta( 'http:Refresh', '10;url=' . $titleObj->escapeFullURL() );
+			$wgOut->addMeta( 'http:Refresh', $wgRedirectDelay';url=' . $titleObj->escapeFullURL() );
 		}
 		$wgOut->addHTML( "\n<p>$r</p>\n" );
 	}
Comment 7 Aryeh Gregor (not reading bugmail, please e-mail directly) 2007-07-10 21:48:09 UTC
Timed redirect removed in r23979.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links