Introduce a new variable in DefaultSettings.php :
$wgMaxRedirects = 1;
During page retrieval, it is to be counted down to zero while redirects are honored. Proceed to page rendering when either a non-redirect is found, or the count reached zero.
Rationale:
- Some wikis are demanding multiple redirects being honored by the wiki software so as to allow a logical and structurally clean use of page names, with some indirection.
- Other wikis must minimize redirect 'chains' to a length of 1 for one or another reason. This is the current state of affairs, and should be the default.
- Theoretically at least, there may be reasons to not use redirects at all, thus $wgMaxRedirects = 0; might be an option.
Performance issues:
When the default is kept, there should be no difference to what we have now, so a majority of wikis will likely not experience a change in performance
With a reasonably small permissible number of redirects, performance should not be affected much since adding a level of indirection is considerably "cheaper" than having another image embedded in a page.
With huge redirect chains, however, performance might be slowed down a little, but that is the price to pay, if one really wants it.
We MUST NOT allow an 'unlimited' $wgMaxRedirects value for the obvious risk of an endless loop of page retrieves caused by redirect loops.
There is no point in adding loop detection logic to page retrieval, because that would be rather complicated, hardly ever triggered, plus unnecessary since $wgMaxRedirects is hit anyways after few steps.
See also: bug # 5503
See also: bug # 4578
Version: 1.11.x
Severity: enhancement