Status
Not open for further replies.

Daviid

Member
24
2009
0
0
Hello,
Im having a problem, when a user submits alot of downloads, occassionally about 10 blank ones appear to. Is their any script that can auto delete empty downloads from the WCDDL downloads database?
 
9 comments
Aaah, nvm :)
Fixed it.
Just had to add:
Code:
mysql_query("DELETE FROM wcddl_downloads WHERE title='' OR url='' OR sid=''");
mysql_query("DELETE FROM wcddl_queue WHERE title='' OR url='' OR sid=''");
To funcs.php
 
It should stop any blank form entries before it even gets to entering it into database... strange...

Code:
if(empty($titles[0]) || empty($urls[0]) || empty($types[0]) || empty($sname) || empty($surl) || empty($email)) {$this->error = 'Error: Some fields were not set, please check you filled in all details.';}
 
It should stop any blank form entries before it even gets to entering it into database... strange...

Code:
if(empty($titles[0]) || empty($urls[0]) || empty($types[0]) || empty($sname) || empty($surl) || empty($email)) {$this->error = 'Error: Some fields were not set, please check you filled in all details.';}


assuming the empty download is the first element in the array. What if its the idk, 7th? or... 2nd? or 3rd? etc.
 
Around Line 227 of funcs.php:
Code:
if(!empty($titles[$i]) && !empty($urls[$i]) && !empty($types[$i]) && (in_array(strtolower($types[$i]),$this->allowed_types) || in_array($types[$i],$this->allowed_types)) && !isset($downDupe)) {

All downloads are checked.
 
Status
Not open for further replies.
Back
Top