Changeset 712 for trunk/includes


Ignore:
Timestamp:
Jan 5, 2014, 4:28:51 PM (11 years ago)
Author:
chronos
Message:
  • Modified: Logged user state remade to use memory table to avoid offten writes to storage. Memory table lose their content if mysql server is restarted. So UserTrace still keep user information but table is only updated on login or logout. Login timeout is managed by UserOnline table.
  • Added: Ability to login permanently. Session will not timeout after short time. List of online users will be not affected as it use own timeout check.
Location:
trunk/includes
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/Version.php

    r711 r712  
    66// and system will need database update.
    77
    8 $Revision = 711; // Subversion revision
    9 $DatabaseRevision = 695; // Database structure revision
     8$Revision = 712; // Subversion revision
     9$DatabaseRevision = 712; // Database structure revision
    1010$ReleaseTime = '2014-01-05';
  • trunk/includes/global.php

    r703 r712  
    712712        return($Output);
    713713}
     714
     715function GetRemoteAddress()
     716{
     717  if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR'] ;
     718  else if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR'];
     719  else $IP = '0.0.0.0';
     720  return($IP);
     721}
  • trunk/includes/system.php

    r711 r712  
    279279                } else
    280280                {
    281                         $Output .= '<form action="'.$this->System->Link('/?action=login').'" method="post"> '.
    282                                         T('Name').': <input type="text" name="LoginUser" size="8 " /> '.
    283                                         T('Password').': <td><input type="password" name="LoginPass" size="8" /> '.
    284                                         '<input type="submit" value="'.T('Login').'" /></form> &nbsp; '.
     281                        $Output .= '<a href="'.$this->System->Link('/login/').'">'.T('Login').'</a>&nbsp;'.
    285282                                        '<a href="'.$this->System->Link('/registrace.php').'">'.T('Registration').'</a>';
    286283                }
     
    446443      '</body>'.
    447444      '</html>';
    448                 $this->System->User->Store();
    449445                return($Output);
    450446        }
Note: See TracChangeset for help on using the changeset viewer.