# This patch file was generated by NetBeans IDE # Following Index: paths are relative to: Joomla root # This patch can be applied using context Tools: Patch action on respective folder. # It uses platform neutral UTF-8 encoding and \n newlines. # Above lines and this line are ignored by the patching process. --- components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php +++ components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php @@ -734,26 +734,23 @@ case 'json': case 'php': if ( substr( $reason, -11 ) == ':translated' ) { - // Translated version in case reason finishes by :translated: (will be used later): - if ( in_array( $field->type, array( 'radio', 'select' ) ) ) { - $chosen = getLangDefinition( $value ); + if ( $value != '' ) { + $chosen = $this->_explodeCBvalues( $value ); } else { - // multiselect, multicheckbox: - $chosen = $this->_explodeCBvalues( $value ); - for( $i = 0, $n = count( $chosen ); $i < $n; $i++ ) { - $chosen[$i] = getLangDefinition( $chosen[$i] ); - } + $chosen = array(); } + for( $i = 0, $n = count( $chosen ); $i < $n; $i++ ) { + $chosen[$i] = getLangDefinition( $chosen[$i] ); + } return $this->_arrayToFormat( $field, $chosen, $output ); break; } // else: fall-through on purpose here (fixes bug #2960): case 'csv': - if ( in_array( $field->type, array( 'radio', 'select' ) ) ) { - $chosen = $value; - } else { - // multiselect, multicheckbox: + if ( $value != '' ) { $chosen = $this->_explodeCBvalues( $value ); + } else { + $chosen = array(); \ No newline at end of file } return $this->_arrayToFormat( $field, $chosen, $output ); break;