Skip to content

Commit

Permalink
Dev Speed optimizations when browsing responses
Browse files Browse the repository at this point in the history
  • Loading branch information
c-schmitz committed Dec 12, 2013
1 parent e64f2a4 commit 95064f1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion application/helpers/common_helper.php
Expand Up @@ -1695,7 +1695,7 @@ function getSIDGIDQIDAIDType($fieldcode)
*/
function getExtendedAnswer($iSurveyID, $sFieldCode, $sValue, $oLanguage)
{
if (is_null($sValue) || $sValue=='') return '';
if ($sValue==null || $sValue=='') return '';
$sLanguage = $oLanguage->langcode;
//Fieldcode used to determine question, $sValue used to match against answer code
//Returns NULL if question type does not suit
Expand Down
14 changes: 7 additions & 7 deletions application/libraries/Limesurvey_lang.php
Expand Up @@ -110,13 +110,13 @@ function eT($string, $escapemode = 'html')
* @param mixed $escapemode Different uses require the string to be escaped accordinlgy. Possible values are 'html'(default),'js' and 'unescaped'
* @return string Translated string
*/
function gT($string, $escapemode = 'html')
function gT($sText, $sEscapeMode = 'html')
{
if ($this->gettextclass)
{
$basestring=str_replace('‘','\'',$this->gettextclass->translate($string));
$basestring=$this->gettextclass->translate($sText);

switch ($escapemode)
switch ($sEscapeMode)
{
case 'html':
return $this->HTMLEscape($basestring);
Expand All @@ -132,16 +132,16 @@ function gT($string, $escapemode = 'html')
break;
}
} else {
switch ($escapemode)
switch ($sEscapeMode)
{
case 'html':
return $this->HTMLEscape($string);
return $this->HTMLEscape($sText);
break;
case 'js':
return $this->javascriptEscape($string);
return $this->javascriptEscape($sText);
break;
case 'unescaped':
return $string;
return $sText;
break;
default:
return "Unsupported EscapeMode in gT method";
Expand Down
2 changes: 1 addition & 1 deletion application/views/admin/responses/browseallrow_view.php
Expand Up @@ -40,7 +40,7 @@

for ($i; $i < $fncount; $i++)
{
if (isset($fnames[$i]['type']) && $fnames[$i]['type'] == "|")
if (isset($fnames[$i]['type']) && $fnames[$i]['type'] == "|" && $dtrow[$fnames[$i][0]]!='')
{
$index = $fnames[$i]['index'];
$metadata = $fnames[$i]['metadata'];
Expand Down

0 comments on commit 95064f1

Please sign in to comment.