Skip to content

Commit

Permalink
Fixed issue #4454: Help icon not always hidden if no text entered
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8889 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jul 4, 2010
1 parent 3666363 commit 77f050f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common.php
Expand Up @@ -1862,7 +1862,7 @@ function getextendedanswer($fieldcode, $value, $format='', $dateformatphp='d.m.Y
if (isset($fieldmap[$fieldcode]))
$fields = $fieldmap[$fieldcode];
else
safe_die ("Couldn't get question type - getextendedanswer() in common.php for field $fieldcode<br />");
return false;
//Find out the question type
$this_type = $fields['type'];
switch($this_type)
Expand Down Expand Up @@ -2911,7 +2911,7 @@ function templatereplace($line, $replacements=array())
$line=str_replace("{TEMPLATECSS}", $templatecss, $line);
}

if ($help) {
if (FlattenText($help,true)!='') {
if (strpos($line, "{QUESTIONHELP}") !== false)
{
If (!isset($helpicon))
Expand Down Expand Up @@ -4546,11 +4546,11 @@ function FlattenText($texttoflatten, $decodeUTF8Entities=false)
$nicetext = strip_javascript($texttoflatten);
$nicetext = strip_tags($nicetext);
$nicetext = str_replace(array("\n","\r"),array('',''), $nicetext);
$nicetext = trim($nicetext);
if ($decodeUTF8Entities==true)
{
$nicetext=html_entity_decode($nicetext,ENT_QUOTES,'UTF-8');
}
$nicetext = trim($nicetext);
return $nicetext;
}

Expand Down

0 comments on commit 77f050f

Please sign in to comment.