View Full Version : Links a file when no image is attached in 2.0
roaminginternet
11-10-2006, 02:18 AM
I have added a few image fields. When something is selected the fields work fine. When nothing is selected on the suggest-link.php their is a file uploaded and linked to the listing. This file has no extension. I can edit the link and delete, but I want it to flow correctly and with a value in the field I can't write my logic. Anyone else experiencing this or know how to fix it.
Thanks,
Mike
John Turner
11-10-2006, 07:31 AM
Hi Mike,
Open your '../suggest-link.php'
***find folowing code
if ($_POST[$field_name] == $_FILES[$field_name]['tmp_name'])
{
$link[$field_name] = $file_name;
$tmp[$field_name] = $file_name;
}
***replace it with
if ($_POST[$field_name] == $_FILES[$field_name]['tmp_name'])
{
if ($_POST[$field_name])
{
$link[$field_name] = $file_name;
$tmp[$field_name] = $file_name;
}
}
Save and close it.
vBulletin® v3.7.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.