File: /administrator/components/com_phocagallery/models/phocagalleryimg.php (line 190+)
Code: Select all
if ($data['extlink1link'] != '') {...
} else {
$data['extlink1'] = $data['extlink1link'] . '|'.$data['extlink1title'].'|'.$data['extlink1target'].'|'.$data['extlink1icon'];
}
if ($data['extlink2link'] != '') {...
} else {
$data['extlink2'] = $data['extlink2link'] . '|'.$data['extlink2title'].'|'.$data['extlink2target'].'|'.$data['extlink2icon'];
}
File: /components/com_phocagallery/views/category/view.html.php (line 1502+)
Code: Select all
$items[$iS]->displayiconextlink1 = 0;
if (isset($items[$iS]->extlink1)) {
$items[$iS]->extlink1 = explode("|", $items[$iS]->extlink1, 4);
if (isset($items[$iS]->extlink1[0]) && isset($items[$iS]->extlink1[1])) {
...
}
} else {
$items[$iS]->displayiconextlink1 = 0;
}
}
$items[$iS]->displayiconextlink2 = 0;
if (isset($items[$iS]->extlink2)) {
$items[$iS]->extlink2 = explode("|", $items[$iS]->extlink2, 4);
if (isset($items[$iS]->extlink2[0]) && isset($items[$iS]->extlink2[1])) {
...
}else {
$items[$iS]->extlink2[4] = $items[$iS]->extlink2[1];
$items[$iS]->extlink2[5] = 'style="text-decoration:underline"';
}
} else {
$items[$iS]->displayiconextlink2 = 0;
}
}
if (isset($items[$iS]->extlink1[0]) && isset($items[$iS]->extlink1[1]))
... because you already FORCING those variables to always exist:
else { $data['extlink1'] = $data['extlink1link'] . '|'.$data['extlink1title'].'|'.$data['extlink1target'].'|'.$data['extlink1icon']; }
You need to do one of two things: drop all external link information if no external link url is given: else { $data['extlink1'] =""} , or use !empty() either instead of isset() or along side of isset().
NOTE: The external links are used in a variety of scripts. I haven't checked the other scripts, but they are most likely facing the same problem; no external link was given, but because the variable still exists as an empty variable, it still tries to display the external links.