Project

General

Profile

Feature #20014 » 10432.diff

Administrator Admin, 2009-03-23 11:34

View differences:

typo3/sysext/cms/web_info/class.tx_cms_webinfo_lang.php (working copy)
$tCells[] = '<td class="'.$status.' c-leftLine">'.$info.'</td>';
$tCells[] = '<td class="'.$status.'" title="'.$LANG->getLL('lang_renderl10n_CEcount','1').'" align="center">'.$this->getContentElementCount($data['row']['uid'],0).'</td>';
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($data['row']['uid'], 'mod.SHARED');
$disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? t3lib_div::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
// Traverse system languages:
foreach($languages as $langRow) {
if ($this->pObj->MOD_SETTINGS['lang']==0 || (int)$this->pObj->MOD_SETTINGS['lang']===(int)$langRow['uid']) {
......
$tCells[] = '<td class="'.$status.'">'.$info.'</td>';
$tCells[] = '<td class="'.$status.'" title="'.$LANG->getLL('lang_renderl10n_CEcount','1').'" align="center">'.$this->getContentElementCount($data['row']['uid'],$langRow['uid']).'</td>';
} else {
$status = t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg']&1 ? 'c-blocked' : 'c-fallback';
if (in_array($langRow['uid'], $disableLanguages)) {
// Language has been disabled for this page
$status = 'c-blocked';
$info = '';
} else {
$status = t3lib_div::hideIfNotTranslated($data['row']['l18n_cfg']) || $data['row']['l18n_cfg']&1 ? 'c-blocked' : 'c-fallback';
$info = '<input type="checkbox" name="newOL['.$langRow['uid'].']['.$data['row']['uid'].']" value="1" />';
$newOL_js[$langRow['uid']].= '
+(document.webinfoForm[\'newOL['.$langRow['uid'].']['.$data['row']['uid'].']\'].checked ? \'&edit[pages_language_overlay]['.$data['row']['uid'].']=new\' : \'\')
';
}
$tCells[] = '<td class="'.$status.' c-leftLine">&nbsp;</td>';
$tCells[] = '<td class="'.$status.'">&nbsp;</td>';
$info = '<input type="checkbox" name="newOL['.$langRow['uid'].']['.$data['row']['uid'].']" value="1" />';
$newOL_js[$langRow['uid']].= '
+(document.webinfoForm[\'newOL['.$langRow['uid'].']['.$data['row']['uid'].']\'].checked ? \'&edit[pages_language_overlay]['.$data['row']['uid'].']=new\' : \'\')
';
$tCells[] = '<td class="'.$status.'">'.$info.'</td>';
}
}
typo3/sysext/cms/layout/class.tx_cms_layout.php (working copy)
/**
* Make selector box for creating new translation in a language
* Displays only languages which are not yet present for the current page.
* Displays only languages which are not yet present for the current page and
* that are not disabled with page TS.
*
* @param integer Page id for which to create a new language (pages_language_overlay record)
* @return string <select> HTML element (if there were items for the box anyways...)
......
}
}
}
// Remove disabled languages
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($id, 'mod.SHARED');
$disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? t3lib_div::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
if (count($langSelItems) && count($disableLanguages)) {
foreach ($disableLanguages as $language) {
if ($language != 0 && isset($langSelItems[$language])) {
unset($langSelItems[$language]);
}
}
}
// If any languages are left, make selector:
if (count($langSelItems)>1) {
(2-2/2)