mirror of https://github.com/nokonoko/uguu
fixed empty db when not logging ip
If you set the config value to no in order to not log IP's it would not insert anything to the DB because of the missing empty ip.s3lva-kumar/ansible-role
parent
a06deebce9
commit
317f689904
|
@ -133,7 +133,8 @@ function uploadFile($file)
|
|||
if(LOG_IP == 'yes'){
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date, ip) VALUES (:hash, :orig, :name, :size, :date, :ip)');
|
||||
}else{
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date) VALUES (:hash, :orig, :name, :size, :date)');
|
||||
$ip = '0';
|
||||
$q = $db->prepare('INSERT INTO files (hash, originalname, filename, size, date, ip) VALUES (:hash, :orig, :name, :size, :date, :ip)');
|
||||
}
|
||||
// Common parameters binding
|
||||
$q->bindValue(':hash', $file->getSha1(), PDO::PARAM_STR);
|
||||
|
|
Loading…
Reference in New Issue