fixing get_remote_ip() quoting

This commit is contained in:
Benjamin Sonntag 2016-05-18 15:12:49 +02:00
parent 06076b6fe0
commit b6eb1e668c
1 changed files with 2 additions and 2 deletions

View File

@ -142,9 +142,9 @@ class m_mem {
// End AuthIP // End AuthIP
if ($restrictip) { if ($restrictip) {
$ip = "'" . get_remote_ip() . "'"; $ip = get_remote_ip();
} else { } else {
$ip = "''"; $ip = "";
} }
/* Close sessions that are more than 2 days old. */ /* Close sessions that are more than 2 days old. */
$db->query("DELETE FROM sessions WHERE DATE_ADD(ts,INTERVAL 2 DAY)<NOW();"); $db->query("DELETE FROM sessions WHERE DATE_ADD(ts,INTERVAL 2 DAY)<NOW();");