Project

General

Profile

Bug #16870 » ff_label_charset.txt

Administrator Admin, 2007-01-20 22:20

 
Index: t3lib/class.t3lib_tceforms.php
===================================================================
--- t3lib/class.t3lib_tceforms.php (revision 1891)
+++ t3lib/class.t3lib_tceforms.php (working copy)
@@ -38,132 +38,137 @@
*
*
*
- * 196: class t3lib_TCEforms
- * 302: function t3lib_TCEforms()
- * 338: function initDefaultBEmode()
+ * 201: class t3lib_TCEforms
+ * 311: function t3lib_TCEforms()
+ * 347: function initDefaultBEmode()
*
* SECTION: Rendering the forms, fields etc
- * 385: function getSoloField($table,$row,$theFieldToReturn)
- * 424: function getMainFields($table,$row,$depth=0)
- * 618: function getListedFields($table,$row,$list)
- * 660: function getPaletteFields($table,$row,$palette,$header='',$itemList='',$collapsedHeader='')
- * 737: function getSingleField($table,$field,$row,$altName='',$palette=0,$extra='',$pal=0)
- * 900: function getSingleField_SW($table,$field,$row,&$PA)
+ * 394: function getSoloField($table,$row,$theFieldToReturn)
+ * 433: function getMainFields($table,$row,$depth=0)
+ * 638: function getListedFields($table,$row,$list)
+ * 680: function getPaletteFields($table,$row,$palette,$header='',$itemList='',$collapsedHeader='')
+ * 757: function getSingleField($table,$field,$row,$altName='',$palette=0,$extra='',$pal=0)
+ * 921: function getSingleField_SW($table,$field,$row,&$PA)
*
* SECTION: Rendering of each TCEform field type
- * 976: function getSingleField_typeInput($table,$field,$row,&$PA)
- * 1057: function getSingleField_typeText($table,$field,$row,&$PA)
- * 1178: function getSingleField_typeCheck($table,$field,$row,&$PA)
- * 1244: function getSingleField_typeRadio($table,$field,$row,&$PA)
- * 1279: function getSingleField_typeSelect($table,$field,$row,&$PA)
- * 1359: function getSingleField_typeSelect_single($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
- * 1490: function getSingleField_typeSelect_checkbox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
- * 1609: function getSingleField_typeSelect_singlebox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
- * 1719: function getSingleField_typeSelect_multiple($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
- * 1823: function getSingleField_typeGroup($table,$field,$row,&$PA)
- * 1992: function getSingleField_typeNone($table,$field,$row,&$PA)
- * 2008: function getSingleField_typeNone_render($config,$itemValue)
- * 2070: function getSingleField_typeFlex($table,$field,$row,&$PA)
- * 2205: function getSingleField_typeFlex_langMenu($languages,$elName,$selectedLanguage,$multi=1)
- * 2224: function getSingleField_typeFlex_sheetMenu($sArr,$elName,$sheetKey)
- * 2259: function getSingleField_typeFlex_draw($dataStruct,$editData,$cmdData,$table,$field,$row,&$PA,$formPrefix='',$level=0,$tRows=array())
- * 2452: function getSingleField_typeUnknown($table,$field,$row,&$PA)
- * 2467: function getSingleField_typeUser($table,$field,$row,&$PA)
+ * 997: function getSingleField_typeInput($table,$field,$row,&$PA)
+ * 1078: function getSingleField_typeText($table,$field,$row,&$PA)
+ * 1199: function getSingleField_typeCheck($table,$field,$row,&$PA)
+ * 1267: function getSingleField_typeRadio($table,$field,$row,&$PA)
+ * 1303: function getSingleField_typeSelect($table,$field,$row,&$PA)
+ * 1383: function getSingleField_typeSelect_single($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
+ * 1514: function getSingleField_typeSelect_checkbox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
+ * 1633: function getSingleField_typeSelect_singlebox($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
+ * 1743: function getSingleField_typeSelect_multiple($table,$field,$row,&$PA,$config,$selItems,$nMV_label)
+ * 1847: function getSingleField_typeGroup($table,$field,$row,&$PA)
+ * 2017: function getSingleField_typeNone($table,$field,$row,&$PA)
+ * 2033: function getSingleField_typeNone_render($config,$itemValue)
+ * 2095: function getSingleField_typeFlex($table,$field,$row,&$PA)
+ * 2230: function getSingleField_typeFlex_langMenu($languages,$elName,$selectedLanguage,$multi=1)
+ * 2249: function getSingleField_typeFlex_sheetMenu($sArr,$elName,$sheetKey)
+ * 2284: function getSingleField_typeFlex_draw($dataStruct,$editData,$cmdData,$table,$field,$row,&$PA,$formPrefix='',$level=0,$tRows=array())
+ * 2484: function getSingleField_typeUnknown($table,$field,$row,&$PA)
+ * 2499: function getSingleField_typeUser($table,$field,$row,&$PA)
*
* SECTION: Field content processing
- * 2496: function formatValue ($config, $itemValue)
+ * 2528: function formatValue ($config, $itemValue)
*
* SECTION: "Configuration" fetching/processing functions
- * 2588: function getRTypeNum($table,$row)
- * 2614: function rearrange($fields)
- * 2640: function getExcludeElements($table,$row,$typeNum)
- * 2688: function getFieldsToAdd($table,$row,$typeNum)
- * 2713: function mergeFieldsWithAddedFields($fields,$fieldsToAdd)
- * 2745: function setTSconfig($table,$row,$field='')
- * 2767: function getSpecConfForField($table,$row,$field)
- * 2788: function getSpecConfFromString($extraString, $defaultExtras)
+ * 2624: function getRTypeNum($table,$row)
+ * 2650: function rearrange($fields)
+ * 2676: function getExcludeElements($table,$row,$typeNum)
+ * 2724: function getFieldsToAdd($table,$row,$typeNum)
+ * 2749: function mergeFieldsWithAddedFields($fields,$fieldsToAdd)
+ * 2781: function setTSconfig($table,$row,$field='')
+ * 2803: function getSpecConfForField($table,$row,$field)
+ * 2824: function getSpecConfFromString($extraString, $defaultExtras)
*
* SECTION: Display of localized content etc.
- * 2816: function registerDefaultLanguageData($table,$rec)
- * 2848: function getLanguageOverlayRawValue($table, $row, $field, $fieldConf)
- * 2876: function renderDefaultLanguageContent($table,$field,$row,$item)
- * 2899: function renderDefaultLanguageDiff($table,$field,$row,$item)
+ * 2852: function registerDefaultLanguageData($table,$rec)
+ * 2894: function getLanguageOverlayRawValue($table, $row, $field, $fieldConf)
+ * 2922: function renderDefaultLanguageContent($table,$field,$row,$item)
+ * 2953: function renderDefaultLanguageDiff($table,$field,$row,$item)
*
* SECTION: Form element helper functions
- * 2955: function dbFileIcons($fName,$mode,$allowed,$itemArray,$selector='',$params=array(),$onFocus='')
- * 3108: function getClipboardElements($allowed,$mode)
- * 3157: function getClickMenu($str,$table,$uid='')
- * 3178: function renderWizards($itemKinds,$wizConf,$table,$row,$field,&$PA,$itemName,$specConf,$RTE=0)
- * 3382: function getIcon($icon)
- * 3409: function optionTagStyle($iconString)
- * 3425: function extractValuesOnlyFromValueLabelList($itemFormElValue)
- * 3447: function wrapOpenPalette($header,$table,$row,$palette,$retFunc=0)
- * 3471: function checkBoxParams($itemName,$thisValue,$c,$iCount,$addFunc='')
- * 3485: function elName($itemName)
- * 3496: function noTitle($str,$wrapParts=array())
- * 3505: function blur()
- * 3514: function thisReturnUrl()
- * 3527: function getSingleHiddenField($table,$field,$row)
- * 3549: function formWidth($size=48,$textarea=0)
- * 3576: function formWidthText($size=48,$wrap='')
- * 3592: function formElStyle($type)
- * 3603: function formElClass($type)
- * 3614: function formElStyleClassValue($type, $class=FALSE)
- * 3638: function insertDefStyle($type)
- * 3657: function getDynTabMenu($parts, $idString)
+ * 3009: function dbFileIcons($fName,$mode,$allowed,$itemArray,$selector='',$params=array(),$onFocus='')
+ * 3162: function getClipboardElements($allowed,$mode)
+ * 3211: function getClickMenu($str,$table,$uid='')
+ * 3232: function renderWizards($itemKinds,$wizConf,$table,$row,$field,&$PA,$itemName,$specConf,$RTE=0)
+ * 3436: function getIcon($icon)
+ * 3463: function optionTagStyle($iconString)
+ * 3479: function extractValuesOnlyFromValueLabelList($itemFormElValue)
+ * 3501: function wrapOpenPalette($header,$table,$row,$palette,$retFunc=0)
+ * 3525: function checkBoxParams($itemName,$thisValue,$c,$iCount,$addFunc='')
+ * 3539: function elName($itemName)
+ * 3553: function noTitle($str,$wrapParts=array())
+ * 3562: function blur()
+ * 3571: function thisReturnUrl()
+ * 3584: function getSingleHiddenField($table,$field,$row)
+ * 3606: function formWidth($size=48,$textarea=0)
+ * 3633: function formWidthText($size=48,$wrap='')
+ * 3649: function formElStyle($type)
+ * 3660: function formElClass($type)
+ * 3671: function formElStyleClassValue($type, $class=FALSE)
+ * 3695: function insertDefStyle($type)
+ * 3714: function getDynTabMenu($parts, $idString)
*
* SECTION: Item-array manipulation functions (check/select/radio)
- * 3696: function initItemArray($fieldValue)
- * 3714: function addItems($items,$iArray)
- * 3736: function procItems($items,$iArray,$config,$table,$row,$field)
- * 3760: function addSelectOptionsToItemArray($items,$fieldValue,$TSconfig,$field)
- * 3980: function addSelectOptionsToItemArray_makeModuleData($value)
- * 4002: function foreignTable($items,$fieldValue,$TSconfig,$field,$pFFlag=0)
+ * 3753: function initItemArray($fieldValue)
+ * 3771: function addItems($items,$iArray)
+ * 3793: function procItems($items,$iArray,$config,$table,$row,$field)
+ * 3817: function addSelectOptionsToItemArray($items,$fieldValue,$TSconfig,$field)
+ * 4037: function addSelectOptionsToItemArray_makeModuleData($value)
+ * 4059: function foreignTable($items,$fieldValue,$TSconfig,$field,$pFFlag=0)
*
* SECTION: Template functions
- * 4083: function setNewBEDesign()
- * 4138: function intoTemplate($inArr,$altTemplate='')
- * 4162: function addUserTemplateMarkers($marker,$table,$field,$row,&$PA)
- * 4173: function wrapLabels($str)
- * 4186: function wrapTotal($c,$rec,$table)
- * 4199: function replaceTableWrap($arr,$rec,$table)
- * 4236: function wrapBorder(&$out_array,&$out_pointer)
- * 4258: function rplColorScheme($inTemplate)
- * 4278: function getDivider()
- * 4288: function printPalette($palArr)
- * 4339: function helpTextIcon($table,$field,$force=0)
- * 4359: function helpText($table,$field)
- * 4380: function setColorScheme($scheme)
- * 4404: function resetSchemes()
- * 4415: function storeSchemes()
- * 4427: function restoreSchemes()
+ * 4140: function setNewBEDesign()
+ * 4195: function intoTemplate($inArr,$altTemplate='')
+ * 4219: function addUserTemplateMarkers($marker,$table,$field,$row,&$PA)
+ * 4230: function wrapLabels($str)
+ * 4243: function wrapTotal($c,$rec,$table)
+ * 4256: function replaceTableWrap($arr,$rec,$table)
+ * 4293: function wrapBorder(&$out_array,&$out_pointer)
+ * 4315: function rplColorScheme($inTemplate)
+ * 4335: function getDivider()
+ * 4345: function printPalette($palArr)
+ * 4396: function helpTextIcon($table,$field,$force=0)
+ * 4416: function helpText($table,$field)
+ * 4437: function setColorScheme($scheme)
+ * 4461: function resetSchemes()
+ * 4472: function storeSchemes()
+ * 4484: function restoreSchemes()
*
* SECTION: JavaScript related functions
- * 4457: function JStop()
- * 4508: function JSbottom($formname='forms[0]')
- * 4835: function dbFileCon($formObj='document.forms[0]')
- * 5053: function printNeededJSFunctions()
- * 5080: function printNeededJSFunctions_top()
+ * 4514: function JStop()
+ * 4565: function JSbottom($formname='forms[0]')
+ * 4892: function dbFileCon($formObj='document.forms[0]')
+ * 5110: function printNeededJSFunctions()
+ * 5137: function printNeededJSFunctions_top()
*
* SECTION: Various helper functions
- * 5128: function getDefaultRecord($table,$pid=0)
- * 5167: function getRecordPath($table,$rec)
- * 5181: function readPerms()
- * 5195: function sL($str)
- * 5208: function getLL($str)
- * 5229: function isPalettesCollapsed($table,$palette)
- * 5245: function isDisplayCondition($displayCond,$row,$ffValueKey='')
- * 5349: function getTSCpid($table,$uid,$pid)
- * 5363: function doLoadTableDescr($table)
- * 5375: function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1)
+ * 5185: function getDefaultRecord($table,$pid=0)
+ * 5224: function getRecordPath($table,$rec)
+ * 5238: function readPerms()
+ * 5252: function sL($str)
+ * 5262: function sL_FF($str)
+ * 5281: function getLL($str)
+ * 5302: function isPalettesCollapsed($table,$palette)
+ * 5318: function isDisplayCondition($displayCond,$row,$ffValueKey='')
+ * 5422: function getTSCpid($table,$uid,$pid)
+ * 5436: function doLoadTableDescr($table)
+ * 5448: function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1)
+ * 5488: function getLanguageIcon($table,$row,$sys_language_uid)
+ * 5520: function previewFieldValue($value, $config)
+ * 5567: function getAdditionalPreviewLanguages()
+ * 5599: function getDynTabLevelState($appendString = '')
*
*
- * 5417: class t3lib_TCEforms_FE extends t3lib_TCEforms
- * 5425: function wrapLabels($str)
- * 5435: function printPalette($palArr)
- * 5460: function setFancyDesign()
+ * 5621: class t3lib_TCEforms_FE extends t3lib_TCEforms
+ * 5629: function wrapLabels($str)
+ * 5639: function printPalette($palArr)
+ * 5664: function setFancyDesign()
*
- * TOTAL FUNCTIONS: 100
+ * TOTAL FUNCTIONS: 105
* (This index is automatically created/updated by the extension "extdeveval")
*
*/
@@ -2395,7 +2400,7 @@
if (!$value['TCEforms']['displayCond'] || $this->isDisplayCondition($value['TCEforms']['displayCond'],$editData,$vDEFkey)) {
$fakePA=array();
$fakePA['fieldConf']=array(
- 'label' => $this->sL(trim($value['TCEforms']['label'])),
+ 'label' => $this->sL_FF(trim($value['TCEforms']['label'])),
'config' => $value['TCEforms']['config'],
'defaultExtras' => $value['TCEforms']['defaultExtras'],
'onChange' => $value['TCEforms']['onChange']
@@ -2444,7 +2449,7 @@
} else {
$defInfo = '';
}
-
+
if (!$PA['_noEditDEF']) {
$prLang = $this->getAdditionalPreviewLanguages();
foreach($prLang as $prL) {
@@ -2922,13 +2927,13 @@
if (strcmp($dLVal,'')) {
$item.='<div class="typo3-TCEforms-originalLanguageValue">'.$this->getLanguageIcon($table,$row,0).$this->previewFieldValue($dLVal,$fCfg).'&nbsp;</div>';
}
-
+
$prLang = $this->getAdditionalPreviewLanguages();
foreach($prLang as $prL) {
$dlVal = t3lib_BEfunc::getProcessedValue($table,$field,$this->additionalPreviewLanguageData[$table.':'.$row['uid']][$prL['uid']][$field],0,1);
$item.= '<div class="typo3-TCEforms-originalLanguageValue">'.$this->getLanguageIcon($table,$row,'v'.$prL['ISOcode']).$this->previewFieldValue($dlVal, $fCfg).'&nbsp;</div>';
}
-
+
}
return $item;
@@ -5249,6 +5254,22 @@
}
/**
+ * Fetches language label for key from flexform. This function is also called for "plain" labels (not <code>LLL:</code>). Labels in flexforms are always in UTF-8, so this function temporarily alters $LANG->origCharSet to UTF-8 to correctly convert text.
+ *
+ * @param string Language label reference, eg. 'LLL:EXT:lang/locallang_core.php:labels.blablabla'
+ * @return string The value of the label, fetched for the current backend language.
+ */
+ function sL_FF($str) {
+ global $LANG;
+
+ $charset = $LANG->origCharSet;
+ $LANG->origCharSet = 'utf-8';
+ $result = $LANG->sL($str);
+ $LANG->origCharSet = $charset;
+ return $result;
+ }
+
+ /**
* Returns language label from locallang_core.php
* Labels must be prefixed with either "l_" or "m_".
* The prefix "l_" maps to the prefix "labels." inside locallang_core.php
@@ -5451,13 +5472,13 @@
}
return $output;
}
-
+
/**
* Initializes language icons etc.
*
* param string Table name
* param array Record
- * param string Sys language uid OR ISO language code prefixed with "v", eg. "vDA"
+ * param string Sys language uid OR ISO language code prefixed with "v", eg. "vDA"
* @return void
*/
function getLanguageIcon($table,$row,$sys_language_uid) {
@@ -5490,7 +5511,7 @@
*
* @param string The value to output
* @param array Configuration for field.
- * @return string HTML formatted output
+ * @return string HTML formatted output
*/
function previewFieldValue($value, $config) {
if ($config['config']['type']==='group' && $config['config']['internal_type'] === 'file') {
@@ -5561,7 +5582,7 @@
}
return $this->cachedAdditionalPreviewLanguages;
}
-
+
/**
* Get a list, depending on $this->dynTabLevelStack, that has the information
* in which tab (--div--) fields are inserted.
(2-2/5)