From 6ae73c827b1b6873fe8bdc64064f033e4a142905 Mon Sep 17 00:00:00 2001 From: Hector Cortez Date: Mon, 17 Oct 2011 09:29:55 -0400 Subject: [PATCH] BUG 7104 Fix Bug in grids for long text content. --- workflow/engine/classes/class.propelTable.php | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/workflow/engine/classes/class.propelTable.php b/workflow/engine/classes/class.propelTable.php index e66ed9873..1471c2c6e 100755 --- a/workflow/engine/classes/class.propelTable.php +++ b/workflow/engine/classes/class.propelTable.php @@ -397,12 +397,22 @@ class propelTable $value = ''; } // checking if the value variable is a html field, a html tag content can't contain   as white spaces - $testValue = preg_match( "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i", $value, $matches ); - if (empty($matches)){ - $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); + + $testValue = preg_match( "/(.*)<\/a>/i", $htmlField, $value); + $this->tpl->assign( "value" , $htmlField ); + if ($testValue>0 && (isset($value[1]) && strlen(trim($value[1])) == 0 )) { + $this->tpl->assign( "value" , " " ); + // $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); } else { $this->tpl->assign( "value" , $htmlField ); } + + /* $testValue = preg_match( "/<\/?\w+((\s+(\w|\w[\w-]*\w)(\s*=\s*(?:\".*?\"|'.*?'|[^'\">\s]+))?)+\s*|\s*)\/?>/i", $value, $matches ); */ +// if (empty($matches)){ +// $this->tpl->assign( "value" , (preg_match('^[[:space:]]^', $value) && (substr($fieldName,0,3)!="PRO"))? str_ireplace(" "," ",$htmlField):$htmlField ); +// } else { +// $this->tpl->assign( "value" , $htmlField ); +// } } return $this->fields[$r]['Type']; }