diff -r a1d0846c4504 -r b3cfaf0a505c plugins/SpecialUpdownload.php --- a/plugins/SpecialUpdownload.php Sat Nov 24 13:16:20 2007 -0500 +++ b/plugins/SpecialUpdownload.php Sun Nov 25 17:53:03 2007 -0500 @@ -218,12 +218,25 @@ global $do_gzip; $filename = rawurldecode($paths->getParam(0)); $timeid = $paths->getParam(1); - if($timeid && preg_match('#^([0-9]+)$#', (string)$timeid)) $tid = ' AND time_id='.$timeid; - else $tid = ''; + if ( $timeid && preg_match('#^([0-9]+)$#', (string)$timeid) ) + { + $tid = ' AND time_id='.$timeid; + } + else + { + $tid = ''; + } $filename = $db->escape($filename); $q = $db->sql_query('SELECT page_id,size,mimetype,time_id,file_extension,file_key FROM '.table_prefix.'files WHERE filename=\''.$filename.'\''.$tid.' ORDER BY time_id DESC;'); - if(!$q) $db->_die('The file data could not be selected.'); - if($db->numrows() < 1) { header('HTTP/1.1 404 Not Found'); die_friendly('File not found', '
The file "'.$filename.'" cannot be found.
'); } + if ( !$q ) + { + $db->_die('The file data could not be selected.'); + } + if ( $db->numrows() < 1 ) + { + header('HTTP/1.1 404 Not Found'); + die_friendly('File not found', 'The file "'.$filename.'" cannot be found.
'); + } $row = $db->fetchrow(); $db->free_result();