Remove timed redirect/refresh on "return to" pages
Closed, ResolvedPublic

Assigned To
None
Priority
Normal
Author
bzimport
Subscribers
demon, wikibugs-l
Projects
Reference
bz9153
Description

Author: fernandoacorreia

Description:
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;


Version: unspecified
Severity: enhancement

bzimport added a project: MediaWiki-Interface.Via ConduitNov 21 2014, 9:36 PM
bzimport added a subscriber: wikibugs-l.
bzimport set Reference to bz9153.
bzimport created this task.Via LegacyMar 2 2007, 7:33 PM
bzimport added a comment.Via ConduitMar 2 2007, 7:38 PM

robchur wrote:

"Too long" and "too short", for reading purposes, is subjective.

bzimport added a comment.Via ConduitMar 2 2007, 7:44 PM

fernandoacorreia wrote:

Agreed. That's why the wiki administrator should be able to decide the issue.
For instance, why 10 instead of 9 or 11?

bzimport added a comment.Via ConduitMar 2 2007, 9:51 PM

ayg wrote:

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 . . .

brion added a comment.Via ConduitMar 6 2007, 7:06 PM

We should remove the delayed redirects entirely; they're poorly accessible and
annoying to everyone.

bzimport added a comment.Via ConduitMar 6 2007, 8:41 PM

fernandoacorreia wrote:

Agreed. I think that would make implementation of Bug 7129 even more valuable.

demon added a comment.Via ConduitJul 10 2007, 2:00 PM

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" );
	}
bzimport added a comment.Via ConduitJul 10 2007, 9:48 PM

ayg wrote:

Timed redirect removed in r23979.

Add Comment

Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.