Skip to content
Snippets Groups Projects
Commit 88e1ade2 authored by Uma's avatar Uma
Browse files

Fixes #1202 image url only on existence

parent b7e9763b
No related branches found
No related tags found
No related merge requests found
......@@ -399,13 +399,16 @@ class Users_Record_Model extends Vtiger_Record_Model {
//decode_html - added to handle UTF-8 characters in file names
$imageOriginalName = urlencode(decode_html($imageName));
if($url) {
$url = $site_URL.$url;
}
$imageDetails[] = array(
'id' => $imageId,
'orgname' => $imageOriginalName,
'path' => $imagePath.$imageId,
'name' => $imageName,
'url' => $site_URL.$url
'url' => $url
);
}
return $imageDetails;
......
......@@ -416,14 +416,17 @@ class Vtiger_Record_Model extends Vtiger_Base_Model {
$url = \Vtiger_Functions::getFilePublicURL($imageId, $imageName);
//decode_html - added to handle UTF-8 characters in file names
$imageOriginalName = urlencode(decode_html($imageName));
if($url) {
$url = $site_URL.$url;
}
if(!empty($imageName)){
$imageDetails[] = array(
'id' => $imageId,
'orgname' => $imageOriginalName,
'path' => $imagePath.$imageId,
'name' => $imageName,
'url' => $site_URL.$url
'url' => $url
);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment