Move session->env->getIp into session->request->address
This commit is contained in:
parent
565cf955d7
commit
005b9da1ac
20 changed files with 49 additions and 48 deletions
|
|
@ -118,20 +118,6 @@ sub get {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getIp ( )
|
||||
|
||||
Returns the user's IP address.
|
||||
|
||||
=cut
|
||||
|
||||
sub getIp {
|
||||
my $self = shift;
|
||||
return $self->get('REMOTE_ADDR');
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 new ( )
|
||||
|
|
|
|||
|
|
@ -253,7 +253,7 @@ sub security {
|
|||
my $self = shift;
|
||||
my $message = shift;
|
||||
@_ = ($self, $self->session->user->username." (".$self->session->user->userId.") connecting from "
|
||||
.$self->session->env->getIp." attempted to ".$message);
|
||||
.$self->session->request->address." attempted to ".$message);
|
||||
goto $self->can('warn');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ sub new {
|
|||
my $time = time();
|
||||
my $timeout = $session->setting->get("sessionTimeout");
|
||||
$self->{_var}{lastPageView} = $time;
|
||||
$self->{_var}{lastIP} = $session->env->getIp;
|
||||
$self->{_var}{lastIP} = $session->request->address;
|
||||
$self->{_var}{expires} = $time + $timeout;
|
||||
if ($self->{_var}{nextCacheFlush} > 0 && $self->{_var}{nextCacheFlush} < $time) {
|
||||
delete $self->{_var}{nextCacheFlush};
|
||||
|
|
@ -247,7 +247,7 @@ sub start {
|
|||
$self->{_var} = {
|
||||
expires => $time + $timeout,
|
||||
lastPageView => $time,
|
||||
lastIP => $session->env->getIp,
|
||||
lastIP => $session->request->address,
|
||||
adminOn => 0,
|
||||
userId => $userId
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue