Fixed bug #15230: Bug/Feature: Core only is able to load one specific IE6 CSS file...
[Packages/TYPO3.CMS.git] / typo3 / sysext / t3skin / pngfix / class.tx_templatehook.php
1 <?php
2
3 class tx_templatehook {
4 function registerPngFix($params,$parent) {
5 // handle stupid IE6
6 $userAgent = t3lib_div::getIndpEnv('HTTP_USER_AGENT');
7
8 if(!(strpos($userAgent, 'MSIE 6') === false)
9 && strpos($userAgent, 'Opera') === false
10 && strpos($userAgent, 'MSIE 7') === false) {
11 //make sure we match IE6 but not Opera or IE7
12 $files = t3lib_div::getFilesInDir(PATH_typo3 . 'sysext/t3skin/stylesheets/ie6', 'css', 0, 1);
13 foreach($files as $fileName) {
14 $params['pageRenderer']->addCssFile($parent->backPath . 'sysext/t3skin/stylesheets/ie6/' . $fileName);
15 }
16
17 // load files of spriteGenerator for ie6
18 $files = t3lib_div::getFilesInDir(PATH_site . t3lib_SpriteManager::$tempPath . 'ie6/', 'css', 0, 1);
19 foreach($files as $fileName) {
20 $params['pageRenderer']->addCssFile($parent->backPath . '../' . t3lib_SpriteManager::$tempPath . 'ie6/' . $fileName);
21 }
22
23 }
24 }
25 }
26
27 ?>