r111 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110‎ | r111 | r112 >
Date:20:02, 10 February 2002
Author:magnus_manske
Status:old
Tags:
Comment:
Attempting to fix user login/logout
Modified paths:
  • /trunk/phpwiki/fpw/special_userlogin.php (modified) (history)
  • /trunk/phpwiki/fpw/special_userlogout.php (modified) (history)
  • /trunk/phpwiki/fpw/wiki.phtml (modified) (history)

Diff [purge]

Index: trunk/phpwiki/fpw/special_userlogin.php
@@ -27,6 +27,7 @@
2828 $user = $nu ;
2929 setcookie ( "WikiUserID" , $user->id , $expiration ) ;
3030 setcookie ( "WikiLoggedIn" , "yes" , $expiration ) ;
 31+ $WikiLoggedIn = "yes" ;
3132 if ( $user->options["rememberPassword"] == "on" ) setcookie ( "WikiUserPassword" , $user->password , $expiration ) ;
3233 $user->options["rememberPassword"] = $REMEMBERPASSWORD ;
3334 $user->saveSettings() ;
Index: trunk/phpwiki/fpw/wiki.phtml
@@ -58,7 +58,7 @@
5959 global $THESCRIPT ;
6060
6161 global $metaDescription , $metaKeywords , $wikiCharset ; # For meta tags in the HTML code
62 - $expiration = time()+315360000 ; # Cookies set will expire in ten years from now
 62+ $expiration = time()+31536000 ; # Cookies set will expire in one year from now
6363 $pageTitle = "" ;
6464
6565 # $mt = getmicrotime() ;
Index: trunk/phpwiki/fpw/special_userlogout.php
@@ -1,11 +1,11 @@
22 <?
33 function userLogout () {
4 - global $user , $vpage ;
 4+ global $user , $vpage , $WikiLoggedIn , $wikiGoodbye ;
55 $vpage->title = "User logout" ;
66 setcookie ( "WikiLoggedIn" , "" , time()-3600 ) ;
77 if ( $user->options["rememberPassword"] != "on" ) setcookie ( "WikiUserPassword" , "" , time()-3600 ) ;
88 $user->isLoggedIn = false ;
9 - global $wikiGoodbye ;
 9+ $WikiLoggedIn = false ;
1010 return str_replace ( "$1" , $user->name , $wikiGoodbye ) ;
1111 }
1212 ?>
\ No newline at end of file

Status & tagging log