| View previous topic :: View next topic |
| Author |
Message |
qq_bbq
Joined: 05 Jul 2009 Posts: 114
|
Posted: Aug 19, 2009 10:30 pm Post subject: Need quick fix for mp3/image preview bug |
|
|
If mp3/image preview is enabled and user go to the download page, the last download is not updated.
So it will be deleted as inactive even though they were played/viewed. Especially the images are vulnerable since not many will push download button. |
|
| Back to top |
|
 |
PilgrimX182

Joined: 22 Mar 2006 Posts: 2109 Location: UFO Lab
|
Posted: Aug 20, 2009 6:24 am Post subject: |
|
|
Good point, thanks!
In index.cgi find
| Code: | if($c->{image_mod} && $file->{file_name}=~/\.(jpg|jpeg|gif|png|bmp)$/i && $file->{file_size}<1048576*3)
{ |
and add line below:
| Code: | | $db->Exec("UPDATE Files SET file_downloads=file_downloads+1, file_last_download=NOW() WHERE file_id=?",$file->{file_id}); |
add same line after
| Code: | if($c->{mp3_mod} && $file->{file_name}=~/\.mp3$/i && $file->{file_size}<1048576*10 && !$file->{message})
{ |
|
|
| Back to top |
|
 |
|