Sorry Platonides, I forgot the error message:
Fatal error: Call to a member function isLoggedIn() on a non-object in
C:\xampp\htdocs\xoran\wiki\includes\xoran_custom.php on line 195
//
// Begin: Check if user is logged-in, if not force login
page
//
global $wgUser;
Line 195 -> if ( $wgUser->isLoggedIn() ) {
header("Location: /index.php/Main_Page"); //Issues a
302 Redirect
} else {
header("Location:
/index.php?title=Special:Userlogin&returnto=Main_Page");
}
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Thanks.
-----Original Message-----
From: mediawiki-l-bounces(a)lists.wikimedia.org
[mailto:mediawiki-l-bounces@lists.wikimedia.org] On Behalf Of Jason Spirko
Sent: Sunday, July 29, 2007 8:09 PM
To: 'MediaWiki announcements and site admin list'
Subject: Re: [Mediawiki-l] Use Special:UserLogin as Main Page
Platonides wrote:
Instead of writing to the special page:
global $wgUser;
if ( $wgUser->isLoggedIn() )
header("Location: /wiki/Real_Main_Page"); //Issues a 302 Redirect
else
header("Location: /wiki/Special:UserLogin");
exit(0);
#TODO: Send the redirect using the Mediawiki function.
Thanks Platonides, where would I place this code? I tried in the
LocalSettings.php and it does not seem to work.
............................................................................
........
This message (including any attachments) contains confidential and
proprietary information intended only for the addressee. If you are not the
intended recipient, please notify the sender immediately by responding to
this e-mail, and delete this message and attachments from your system. If
you have any questions about this e-mail please notify the sender
immediately. Any unauthorized disclosure, copying, distribution or reliance
on the contents of this information is strictly prohibited and may
constitute a violation of law.
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
............................................................................
........
This message (including any attachments) contains confidential and
proprietary information intended only for the addressee. If you are not the
intended recipient, please notify the sender immediately by responding to
this e-mail, and delete this message and attachments from your system. If
you have any questions about this e-mail please notify the sender
immediately. Any unauthorized disclosure, copying, distribution or reliance
on the contents of this information is strictly prohibited and may
constitute a violation of law.
....................................................................................
This message (including any attachments) contains confidential and proprietary
information intended only for the addressee. If you are not the intended recipient,
please notify the sender immediately by responding to this e-mail, and delete
this message and attachments from your system. If you have any questions
about this e-mail please notify the sender immediately. Any unauthorized
disclosure, copying, distribution or reliance on the contents of this information
is strictly prohibited and may constitute a violation of law.