Bug #21869 » 13068_v2.diff
t3lib/class.t3lib_tceforms.php (working copy) | ||
---|---|---|
'sys_language_uid'
|
||
);
|
||
}
|
||
$languages = $this->getAvailableLanguages();
|
||
$languages = $this->getAvailableLanguages(TRUE, TRUE, $row['pid']);
|
||
foreach($languages as $lInfo) {
|
||
if ($GLOBALS['BE_USER']->checkLanguageAccess($lInfo['uid']) && (!$checkPageLanguageOverlay || $lInfo['uid']<=0 || is_array($pageOverlays[$lInfo['uid']]))) {
|
||
... | ... | |
*
|
||
* @param boolean If set, only languages which are paired with a static_info_table / static_language record will be returned.
|
||
* @param boolean If set, an array entry for a default language is set.
|
||
* @param integer Optional page id to use to take page TS into account and possibly deactivate some languages.
|
||
* @return array
|
||
*/
|
||
function getAvailableLanguages($onlyIsoCoded=1,$setDefault=1) {
|
||
function getAvailableLanguages($onlyIsoCoded = 1, $setDefault = 1, $pid = 0) {
|
||
$isL = t3lib_extMgm::isLoaded('static_info_tables');
|
||
// Find all language records in the system:
|
||
... | ... | |
if ($onlyIsoCoded && !$output[$row['uid']]['ISOcode']) unset($output[$row['uid']]);
|
||
}
|
||
if ($pid > 0) {
|
||
// Remove disabled languages
|
||
$modSharedTSconfig = t3lib_BEfunc::getModTSconfig($pid, 'mod.SHARED');
|
||
$disableLanguages = isset($modSharedTSconfig['properties']['disableLanguages']) ? t3lib_div::trimExplode(',', $modSharedTSconfig['properties']['disableLanguages'], 1) : array();
|
||
if (count($output) && count($disableLanguages)) {
|
||
foreach ($disableLanguages as $language) {
|
||
if ($language != 0 && isset($output[$language])) {
|
||
unset($output[$language]);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
return $output;
|
||
}
|
||
- « Previous
- 1
- 2
- Next »