Feature #20014 » disableLanguages.diff
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');
|
||
if (count($langSelItems) > 1 &&
|
||
strlen($modSharedTSconfig['properties']['disableLanguages'])) {
|
||
|
||
$disabled_languages = array_flip(explode(',', $modSharedTSconfig['properties']['disableLanguages']));
|
||
if (count($disabled_languages)) {
|
||
foreach ($disabled_languages as $key => $value) {
|
||
unset($langSelItems[$key]);
|
||
}
|
||
}
|
||
}
|
||
// If any languages are left, make selector:
|
||
if (count($langSelItems)>1) {
|