|
@@ -146,7 +146,7 @@ class Model extends ParentModel
|
|
':name' => (string) $this->c->user->isBot,
|
|
':name' => (string) $this->c->user->isBot,
|
|
':ip' => $this->c->user->ip
|
|
':ip' => $this->c->user->ip
|
|
];
|
|
];
|
|
- if ($this->c->user->isLogged) {
|
|
|
|
|
|
+ if ($this->c->user->logged > 0) {
|
|
$this->c->DB->exec('UPDATE ::online SET logged=?i:logged, o_position=?s:pos, o_name=?s:name WHERE user_id=1 AND ident=?s:ip', $vars);
|
|
$this->c->DB->exec('UPDATE ::online SET logged=?i:logged, o_position=?s:pos, o_name=?s:name WHERE user_id=1 AND ident=?s:ip', $vars);
|
|
} else {
|
|
} else {
|
|
$this->c->DB->exec('INSERT INTO ::online (user_id, ident, logged, o_position, o_name) SELECT 1, ?s:ip, ?i:logged, ?s:pos, ?s:name FROM ::groups WHERE NOT EXISTS (SELECT 1 FROM ::online WHERE user_id=1 AND ident=?s:ip) LIMIT 1', $vars);
|
|
$this->c->DB->exec('INSERT INTO ::online (user_id, ident, logged, o_position, o_name) SELECT 1, ?s:ip, ?i:logged, ?s:pos, ?s:name FROM ::groups WHERE NOT EXISTS (SELECT 1 FROM ::online WHERE user_id=1 AND ident=?s:ip) LIMIT 1', $vars);
|
|
@@ -159,7 +159,7 @@ class Model extends ParentModel
|
|
':id' => $this->c->user->id,
|
|
':id' => $this->c->user->id,
|
|
':name' => $this->c->user->username,
|
|
':name' => $this->c->user->username,
|
|
];
|
|
];
|
|
- if ($this->c->user->isLogged) {
|
|
|
|
|
|
+ if ($this->c->user->logged > 0) {
|
|
$this->c->DB->exec('UPDATE ::online SET logged=?i:logged, o_position=?s:pos WHERE user_id=?i:id', $vars);
|
|
$this->c->DB->exec('UPDATE ::online SET logged=?i:logged, o_position=?s:pos WHERE user_id=?i:id', $vars);
|
|
} else {
|
|
} else {
|
|
$this->c->DB->exec('INSERT INTO ::online (user_id, ident, logged, o_position) SELECT ?i:id, ?s:name, ?i:logged, ?s:pos FROM ::groups WHERE NOT EXISTS (SELECT 1 FROM ::online WHERE user_id=?i:id) LIMIT 1', $vars);
|
|
$this->c->DB->exec('INSERT INTO ::online (user_id, ident, logged, o_position) SELECT ?i:id, ?s:name, ?i:logged, ?s:pos FROM ::groups WHERE NOT EXISTS (SELECT 1 FROM ::online WHERE user_id=?i:id) LIMIT 1', $vars);
|