[TYPO3-core] RFC: language selector in alt_doc
Peter Niederlag
peter at niederlag.de
Thu Feb 16 17:45:07 CET 2006
Hi,
René Fritz schrieb:
[...]
> + /**
> + * Returns sys_language records.
> + *
> + * @param integer Page id: If zero, the query will select all sys_language records from root level which are NOT hidden. If set to another value, the query will select all sys_language records that has a pages_language_overlay record on that page (and is not hidden, unless you are admin user)
> + * @return string Return query string.
> + */
> + function getLanguages($id) {
> + global $LANG;
> +
> + $modSharedTSconfig = t3lib_BEfunc::getModTSconfig($id, 'mod.SHARED');
> +
> + $languages = array(
> + 0 => array(
> + 'uid' => 0,
> + 'pid' => 0,
> + 'hidden' => 0,
> + 'title' => strlen($modSharedTSconfig['properties']['defaultLanguageLabel']) ? $modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage').')' : $GLOBALS['LANG']->sl('LLL:EXT:lang/locallang_mod_web_list.xml:defaultLanguage'),
> + 'flag' => $modSharedTSconfig['properties']['defaultLanguageFlag'],
> + )
> + );
> +
> + $exQ = $GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0';
Haven't had time to really dig into it. ;(
But to me it seems like displaying of hidden languages maybe should
depend on the settings in BE "display hidden records" that can be
applied to PAGE-Module or rather dropped at all or turned into some
User-TSConfig? Anyway I don't quite understand see why not restricting
to sys_language.hidden=0 depends on admin-status _hardcoded_ here...
... might be its the same on other localisation-features?
Other than that the feature seems nice and patch looks good to me on
quick glance but didn't check thouroughly. If that still counts and
above is reasonable/solved: +1
Cheers,
Peter
--
Peter Niederlag * Neuer Sandberg 9 * 31535 Neustadt *
Fon (privat): 05036 / 924 100 * Fon (Büro): 05036 / 924 101
Fon (mobil): 0172 / 516 48 55 * Fax 05036 / 924 105
callto:typo3support (skype)
http://www.niekom.de * TYPO3 und EDV Dienstleistungen *
http://www.clown-goli.de * Clown-Comedy-Jonglage-Animation *
More information about the TYPO3-team-core
mailing list