Hi all, I'm new to mediawiki (brand new), and finding it excellent. I hope this is the correct forum, apologies if it's not or this is has been discussed before.
I've just set up a small private wiki, and set it so the only whitelist page is Special:UserLogin. However I didn't want that to be the main page, and obviously didn't want the LoginRequired page to redirect to the main page = loop.
This is very similar to this post: http://www.gossamer-threads.com/lists/wiki/mediawiki/45763
My solution (which doesn't seemed to be mentioned in the answers to similar requests i'd found), was to add a returntoLogin method to OutputPage.php:
function returntoLogin() { global $wgOut; $titleObj = Title::newFromText("Special:Userlogin" ); $wgOut->addMeta( 'http:Refresh', '5;url=' . $titleObj->escapeFullURL() ); $this->addHTML("You will be refreshed to the login page in 5 seconds");
}
Then i changed loginToUse() from this: $this->returntoMain() to $this->returntoLogin().
I also changed SpecialUserlogout.php to use this as well.
Does this make any sense? am i duplicating functionality that i haven't found?
TIA, Alex