RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

AJAX upload progress bar

File sharing script

File mirror script

Newsletter script
Need quick fix for mp3/image preview bug

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro
View previous topic :: View next topic  
Author Message
qq_bbq



Joined: 05 Jul 2009
Posts: 122

PostPosted: Aug 19, 2009 10:30 pm    Post subject: Need quick fix for mp3/image preview bug Reply with quote

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
View user's profile Send private message
PilgrimX182



Joined: 22 Mar 2006
Posts: 2106
Location: UFO Lab

PostPosted: Aug 20, 2009 6:24 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> XFileSharing Pro All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB © 2001, 2005 phpBB Group