Added feature #5242: IRRE - Storage page for child records
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_recordlist.php
index 3d5df90..526911e 100755 (executable)
@@ -356,50 +356,9 @@ class t3lib_recordList {
                        '',
                        'sys_language_uid'
                );
-
-                       // icons and language titles:
-               t3lib_div::loadTCA ('sys_language');
-               $flagAbsPath = t3lib_div::getFileAbsFileName($TCA['sys_language']['columns']['flag']['config']['fileFolder']);
-               $flagIconPath = $this->backPath.'../'.substr($flagAbsPath, strlen(PATH_site));
-
-               $this->modSharedTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.SHARED');
-               $this->languageIconTitles = array();
-
-                       // Set default:
-               $this->languageIconTitles[0]=array(
-                       'uid' => 0,
-                       'title' => strlen ($this->modSharedTSconfig['properties']['defaultLanguageLabel']) ? $this->modSharedTSconfig['properties']['defaultLanguageLabel'].' ('.$LANG->getLL('defaultLanguage').')' : $LANG->getLL('defaultLanguage'),
-                       'ISOcode' => 'DEF',
-                       'flagIcon' => strlen($this->modSharedTSconfig['properties']['defaultLanguageFlag']) && @is_file($flagAbsPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag']) ? $flagIconPath.$this->modSharedTSconfig['properties']['defaultLanguageFlag'] : null,
-               );
-
-                       // Set "All" language:
-               $this->languageIconTitles[-1]=array(
-                       'uid' => -1,
-                       'title' => $LANG->getLL ('multipleLanguages'),
-                       'ISOcode' => 'DEF',
-                       'flagIcon' => $flagIconPath.'multi-language.gif',
-               );
-
-                       // Find all system languages:
-               $sys_languages = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
-                       '*',
-                       'sys_language',
-                       ''
-               );
-               foreach($sys_languages as $row)         {
-                       $this->languageIconTitles[$row['uid']] = $row;
-
-                       if ($row['static_lang_isocode'])        {
-                               $staticLangRow = t3lib_BEfunc::getRecord('static_languages',$row['static_lang_isocode'],'lg_iso_2');
-                               if ($staticLangRow['lg_iso_2']) {
-                                       $this->languageIconTitles[$row['uid']]['ISOcode'] = $staticLangRow['lg_iso_2'];
-                               }
-                       }
-                       if (strlen ($row['flag'])) {
-                               $this->languageIconTitles[$row['uid']]['flagIcon'] = @is_file($flagAbsPath.$row['flag']) ? $flagIconPath.$row['flag'] : '';
-                       }
-               }
+               
+               $t8Tools = t3lib_div::makeInstance('t3lib_transl8tools');
+               $this->languageIconTitles = $t8Tools->getSystemLanguages($this->id, $this->backPath);
        }
 
        /**