Project

General

Profile

Bug #14984 » editpanels-javascript-dialog-charset-fix.patch

Administrator Admin, 2005-10-21 09:52

View differences:

t3lib/class.t3lib_tsfebeuserauth.php 21 Sep 2005 10:42:07 -0000
* IF the global variable $LOCAL_LANG is NOT an array (yet) then this function loads the global $LOCAL_LANG array with the content of "sysext/lang/locallang_tsfe.php" so that the values therein can be used for labels in the Admin Panel
*
* @param string Key for a label in the $LOCAL_LANG array of "sysext/lang/locallang_tsfe.php"
* @param boolean If set, the string won't be converted to utf-8 entities, but left in the current users charSet
* @return string The value for the $key
*/
function extGetLL($key) {
function extGetLL($key,$noConvert=0) {
global $LOCAL_LANG;
if (!is_array($LOCAL_LANG)) {
$GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_tsfe.php');
......
$labelStr = htmlspecialchars($GLOBALS['LANG']->getLL($key)); // Label string in the default backend output charset.
// Convert to utf-8, then to entities:
if ($GLOBALS['LANG']->charSet!='utf-8') {
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($labelStr,$GLOBALS['LANG']->charSet);
if (!$noConvert) {
// Convert to utf-8, then to entities:
if ($GLOBALS['LANG']->charSet!='utf-8') {
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_encode($labelStr,$GLOBALS['LANG']->charSet);
}
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_to_entities($labelStr);
}
$labelStr = $GLOBALS['LANG']->csConvObj->utf8_to_entities($labelStr);
// Return the result:
return $labelStr;
typo3/sysext/cms/tslib/class.tslib_content.php 21 Sep 2005 10:42:08 -0000
if ($dataArr[$hideField]) {
$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/button_unhide.gif" width="11" height="10" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_unhide').'" align="top" alt="" title="" />',$formName,'unhide');
} else {
$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/button_hide.gif" width="11" height="10" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_hide').'" align="top" alt="" title="" />',$formName,'hide','',$BE_USER->extGetLL('p_hideConfirm'));
$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/button_hide.gif" width="11" height="10" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_hide').'" align="top" alt="" title="" />',$formName,'hide','',$BE_USER->extGetLL('p_hideConfirm', 1));
}
}
if (isset($allow['new'])) {
......
$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/new_record.gif" width="16" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_newRecordAfter').'" align="top" alt="" title="" />',$formName,'new',$currentRecord);
}
}
if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/delete_record.gif" width="12" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_delete').'" align="top" alt="" title="" />',$formName,'delete','',$BE_USER->extGetLL('p_deleteConfirm')); }
if (isset($allow['delete'])) {$panel.=$this->editPanelLinkWrap('<img src="t3lib/gfx/delete_record.gif" width="12" height="12" vspace="1" hspace="2" border="0" title="'.$BE_USER->extGetLL('p_delete').'" align="top" alt="" title="" />',$formName,'delete','',$BE_USER->extGetLL('p_deleteConfirm', 1)); }
// Final
$labelTxt = $this->stdWrap($conf['label'],$conf['label.']);
......
}
} else {
if ($confirm) {
$cf1="if (confirm(unescape('".t3lib_div::rawurlencodeJS($confirm)."'))){";
$cf1="if (confirm('".htmlspecialchars(addcslashes($confirm,"'"))."')){";
$cf2='}';
} else {
$cf1=$cf2='';
(2-2/3)