diff options
author | Yorhel <git@yorhel.nl> | 2009-10-10 16:05:30 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2009-10-10 16:05:30 +0200 |
commit | ecf82cabc44dcd333f0e46c037c7d9c1c4046a0d (patch) | |
tree | f76c4d3b8de834104410ad20088866a94e8d7c77 /lib/VNDB/Util/Auth.pm | |
parent | 5453223bf93a17d49d2717f8e0fbc70ed8477a94 (diff) |
Get unread posts count in htmlHeader() instead of Util::Auth
This way the counter resets itself immediately when opening the unread
thread page, which is more intuitive.
Diffstat (limited to 'lib/VNDB/Util/Auth.pm')
-rw-r--r-- | lib/VNDB/Util/Auth.pm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/VNDB/Util/Auth.pm b/lib/VNDB/Util/Auth.pm index c4daffd9..2595ce5b 100644 --- a/lib/VNDB/Util/Auth.pm +++ b/lib/VNDB/Util/Auth.pm @@ -26,7 +26,7 @@ sub authInit { my $token = substr($cookie, 0, 40); my $uid = substr($cookie, 40); return _rmcookie($self) if $uid !~ /^\d+$/ || !$self->dbSessionCheck($uid, $token); - $self->{_auth} = $self->dbUserGet(uid => $uid, what => 'mymessages')->[0]; + $self->{_auth} = $self->dbUserGet(uid => $uid)->[0]; } @@ -95,7 +95,7 @@ sub _authCheck { return 0 if !$user || length($user) > 15 || length($user) < 2 || !$pass; - my $d = $self->dbUserGet(username => $user, what => 'mymessages')->[0]; + my $d = $self->dbUserGet(username => $user)->[0]; return 0 if !defined $d->{id} || !$d->{rank}; if(_authEncryptPass($self, $pass, $d->{salt}) eq $d->{passwd}) { |