Hi Dmitry! "Dmitry Dulepov" <dmi...@typo3.org> schrieb im Newsbeitrag news:mailman.1.1229416481.1459.typo3-engl...@lists.netfielders.de... > Hi! > > Christopher wrote: >> unfortunatelly it does not work. >> among other things I have tried the follwing code: >> >> <?php >> function user_checkOS($os) { >> >> if (TYPO3_OS == 'WIN') { >> $os = 'Windows'; >> # That should be the way you meant it... >> return $os; >> } >> else { >> $os = 'other'; >> return $os; >> } >> } >> >> ?> > > This will not work because you always return what is considered "true". > This function must return true or false. You return $os, which will always > be treated as true.
So it should be the following? if (TYPO3_OS == 'WIN') { return $os == "Windows"; } else { return $os == "different"; } TS: includeLibs.user_checkOS = fileadmin/script/user_checkOS.php [userFunc = user_checkOS("Windows")] config.locale_all = german [ELSE] config.locale_all = de_DE [global] Regards Christopher _______________________________________________ TYPO3-english mailing list TYPO3-english@lists.netfielders.de http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english