Last modified: 2009-03-27 08:35:35 UTC
When an outdated red link is clicked, and the target page has been created in the meantime, MediaWiki should not display edit form, even though action=edit has been given. It should redirect to normal page view.
Created attachment 5197 [details] A simple patch for this enhancement (Why do I always receive “The bug was created successfully, but attachment creation failed.” when trying to create a new bug with an attachment included in the first commit?)
That patch looks bad. The current redlink logic is part of EditForm::readOnlyPage(), if that is a bad location then it should be moved, rather than duplicated.
Created attachment 5201 [details] A slightly refactored patch Well, to be honest, I did not see much of common “redlink logic”. But OK, the $wgRequest->getBool and the $wgOut->redirect can be factored out. (Even though the result does not seem too much better to me.)
Created attachment 5280 [details] Fixed patch There was a tiny bug in the patch, fixed.
I'd move '$wgOut->redirect( $this->mTitle->getFullUrl() );' out of the autoredirect function and leave readonlypage() alone.
(In reply to comment #5) > I'd move '$wgOut->redirect( $this->mTitle->getFullUrl() );' out of the > autoredirect function and leave readonlypage() alone. Mmmm… you mean like in the original version of the patch (attachment 5197 [details])? ;-)
This was done in r48039.
OK, so FIXED, I guess…