Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion e107_handlers/e_customfields_class.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getFieldValue($key, $parm=array())

$fieldType = $this->_config[$key]['type'];

if($value === null)
if($value === null || empty($value))
{
return null;
}
Expand All @@ -164,6 +164,15 @@ public function getFieldValue($key, $parm=array())


case "image":
//{CPAGEFIELD: name=XXXX&type=full} return full path to image. This ignore thumb params.
if($type == 'full') {
return ($raw) ? $value : $tp->replaceConstants($value, 'abs');
}
//{CPAGEFIELD: name=XXXX&type=popup} return a wrapped image with link to full image path.
if($type == 'popup') {
return ($raw) ? $value : '<a class="cpage_image cpage_image_popup '.$parm['name'].'" href="'.$tp->replaceConstants($value, 'abs').'">'.$tp->toImage($value,$parm).'</a>';
}

return ($raw) ? $tp->thumbUrl($value,$parm) : $tp->toImage($value,$parm);
break;

Expand Down