mirror of
https://github.com/friendica/friendica
synced 2024-12-25 08:00:17 +00:00
Merge pull request #401 from copyninja/master
Image part of Site should be accessed only if its present
This commit is contained in:
commit
691e770a68
1 changed files with 8 additions and 3 deletions
|
@ -302,11 +302,16 @@ function parse_url_content(&$a) {
|
||||||
|
|
||||||
$image = "";
|
$image = "";
|
||||||
|
|
||||||
foreach ($siteinfo["images"] as $imagedata)
|
if($siteinfo["image"] != ""){
|
||||||
|
/*
|
||||||
|
Execute below code only if image is present in siteinfo
|
||||||
|
*/
|
||||||
|
foreach ($siteinfo["images"] as $imagedata)
|
||||||
if($textmode)
|
if($textmode)
|
||||||
$image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
|
$image .= '[img='.$imagedata["width"].'x'.$imagedata["height"].']'.$imagedata["src"].'[/img]';
|
||||||
else
|
else
|
||||||
$image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
|
$image .= '<img height="'.$imagedata["height"].'" width="'.$imagedata["width"].'" src="'.$imagedata["src"].'" alt="photo" />';
|
||||||
|
}
|
||||||
|
|
||||||
if(strlen($text)) {
|
if(strlen($text)) {
|
||||||
if($textmode)
|
if($textmode)
|
||||||
|
|
Loading…
Reference in a new issue