Commit 37db313e authored by Mac Newbold's avatar Mac Newbold
Browse files

Fix the relogin stuff according to a couple of requests:

 - Don't use the image, just use a text link. (Note: the text link in the
   middle is different than the button link on the left, since the button
   doesn't set refer=1.) (From Rob/Chad)
 - Don't jump back into admin mode just because I was before. Let it dump
   me back to green dot when I log back in. (From Leigh)
parent 484921c1
......@@ -256,25 +256,8 @@ function LOGGEDINORDIE($uid, $modifier = 0) {
# uid to hcecklogin, so we can give the right error message.
if ($uid=="") { $uid=$HTTP_COOKIE_VARS[$TBNAMECOOKIE]; }
# If I was reddot adminmode before I had problems, the login link
# should put me back in reddot immediately.
$q = DBQueryFatal("select admin,adminoff from users ".
"where uid='$uid'");
if (mysql_num_rows($q)>0) {
$r = mysql_fetch_array($q);
if (($r["admin"]==1) &&
($r["adminoff"]==0)) {
$adminstr = "&adminmode=1";
$link = "\n<blockquote><blockquote>\n".
"<table class=\"menu\" cellpadding=10 cellspacing=0 align=center>\n".
"<tr>\n<td class=\"menufooter\" align=center valign=center>\n".
"<a href=\"$TBBASE/login.php3?refer=1$adminstr\">".
"<img alt=\"logon\" border=0 src=\"$BASEPATH/logon.gif\"></a>\n".
$link = "\n<a href=\"$TBBASE/login.php3?refer=1\">Please ".
"log in again.</a>\n";
if ($uid == FALSE)
USERERROR("You do not appear to be logged in! $link", 1);
......@@ -286,7 +269,7 @@ function LOGGEDINORDIE($uid, $modifier = 0) {
USERERROR("You do not appear to be logged in! $link", 1);
USERERROR("Your login has timed out! Please log in again. $link", 1);
USERERROR("Your login has timed out! $link", 1);
USERERROR("Your login cannot be verified. Are cookies turned on? ".
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment