*/ /** * Class for rendering of File>Filelist * * @author Kasper Skårhøj * @package TYPO3 * @subpackage core */ class fileList extends t3lib_recordList { // default Max items shown var $iLimit = 40; // Boolean. Thumbnails on records containing files (pictures) var $thumbs = 0; var $widthGif = ''; // Max length of strings var $fixedL = 30; var $script = 'file_list.php'; // If TRUE click menus are generated on files and folders var $clickMenus = 1; // The field to sort by... var $sort = ''; // Reverse sorting flag var $sortRev = 1; var $firstElementNumber = 0; var $clipBoard = 0; var $bigControlPanel = 0; // internal var $JScode = ''; var $HTMLcode = ''; var $totalbytes = 0; var $dirs = array(); var $files = array(); var $path = ''; /** * @var t3lib_file_Folder */ protected $folderObject; // Counting the elements no matter what... var $eCounter = 0; var $dirCounter = 0; var $totalItems = ''; var $CBnames = array(); /** * Initialization of class * * @param t3lib_file_Folder $folderObject The folder to work on * @param integer $pointer Pointer * @param boolean $sort Sorting column * @param boolean $sortRev Sorting direction * @param boolean $bigControlPanel Show clipboard flag * @return void */ function start(t3lib_file_Folder $folderObject, $pointer, $sort, $sortRev, $clipBoard = FALSE, $bigControlPanel = FALSE) { $this->script = t3lib_extMgm::extRelPath('filelist') . 'mod1/file_list.php'; $this->folderObject = $folderObject; $this->counter = 0; $this->totalbytes = 0; $this->JScode = ''; $this->HTMLcode = ''; $this->path = $folderObject->getIdentifier(); $this->sort = $sort; $this->sortRev = $sortRev; $this->firstElementNumber=$pointer; $this->clipBoard = $clipBoard; $this->bigControlPanel = $bigControlPanel; // Setting the maximum length of the filenames to the user's settings or minimum 30 (= $this->fixedL) $this->fixedL = max($this->fixedL, $GLOBALS['BE_USER']->uc['titleLen']); $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_common.xml'); } /** * Reading files and directories, counting elements and generating the list in ->HTMLcode * * @return void */ function generateList() { $this->HTMLcode .= $this->getTable('fileext,tstamp,size,rw,_REF_'); } /** * Return the buttons used by the file list to include in the top header * * @param t3lib_file_Folder $folderObject * @return array */ public function getButtonsAndOtherMarkers(t3lib_file_Folder $folderObject) { $otherMarkers = array( 'PAGE_ICON' => '', 'TITLE' => '', ); $buttons = array( 'level_up' => '', 'refresh' => '', 'title' => '', 'page_icon' => '', ); // Makes the code for the foldericon in the top if ($folderObject) { list($title,$icon,$path) = $this->dirData($folderObject); $title = htmlspecialchars($folderObject->getIdentifier()); // Start compiling the HTML // @todo: how to fix this? $title = $GLOBALS['SOBE']->basicFF->blindPath($title); // If this is some subpage under the mount root.... if ($folderObject->getStorage()->isWithinFileMountBoundaries($folderObject)) { // The icon with link $otherMarkers['PAGE_ICON'] = t3lib_iconWorks::getSpriteIcon($icon, array('title' => $title)); $buttons['level_up'] = $this->linkWrapDir(t3lib_iconWorks::getSpriteIcon('actions-view-go-up', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:labels.upOneLevel', 1))), $folderObject); // No HTML specialchars here - HTML like is allowed $otherMarkers['TITLE'] .= t3lib_div::removeXSS(t3lib_div::fixed_lgd_cs($title, -($this->fixedL+20))); } else { // This is the root page $otherMarkers['PAGE_ICON'] = t3lib_iconWorks::getSpriteIcon('apps-filetree-root'); $otherMarkers['TITLE'] .= htmlspecialchars(t3lib_div::fixed_lgd_cs($title, - ($this->fixedL + 20))); } if ($this->clickMenus) { $otherMarkers['PAGE_ICON'] = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($otherMarkers['PAGE_ICON'], $folderObject->getCombinedIdentifier()); } } $buttons['refresh'] = ''. t3lib_iconWorks::getSpriteIcon('actions-system-refresh') . ''; return array($buttons, $otherMarkers); } /** * Wrapping input string in a link with clipboard command. * * @param string $string String to be linked - must be htmlspecialchar'ed / prepared before. * @param string $table table - NOT USED * @param string $cmd "cmd" value * @param string $warning Warning for JS confirm message * @return string Linked string */ function linkClipboardHeaderIcon($string, $table, $cmd, $warning = '') { $onClickEvent = 'document.dblistForm.cmd.value=\''.$cmd.'\';document.dblistForm.submit();'; if ($warning) $onClickEvent = 'if (confirm('.$GLOBALS['LANG']->JScharCode($warning).')){'.$onClickEvent.'}'; return ''.$string.''; } /** * Returns a table with directories and files listed. * * @param array $rowlist Array of files from path * @return string HTML-table */ function getTable($rowlist) { // TODO use folder methods directly when they support filters $storage = $this->folderObject->getStorage(); $storage->resetFileAndFolderNameFiltersToDefault(); $folders = $storage->getFolderList($this->folderObject->getIdentifier()); $files = $storage->getFileList($this->folderObject->getIdentifier()); // Only render the contents of a browsable storage if ($this->folderObject->getStorage()->isBrowsable()) { $this->sort = trim($this->sort); if ($this->sort !== '') { $filesToSort = array(); foreach ($files as $file) { $fileObject = $storage->getFile($file['identifier']); switch ($this->sort) { case 'size': $sortingKey = $fileObject->getSize(); break; case 'rw': $sortingKey = $fileObject->checkActionPermission('read') ? 'R' : '' . $fileObject->checkActionPermission('write') ? 'W' : ''; break; case 'fileext': $sortingKey = $fileObject->getExtension(); break; case 'tstamp': $sortingKey = $fileObject->getModificationTime(); break; default: if($fileObject->hasProperty($this->sort)) { $sortingKey = $fileObject->getProperty($this->sort); } else { $sortingKey = $fileObject->getName(); } } $i = 0; while (isset($filesToSort[$sortingKey . $i])) { $i++; } $filesToSort[$sortingKey . $i] = $fileObject; } if (intval($this->sortRev) === 1) { krsort($filesToSort); } else { ksort($filesToSort); } $files = $filesToSort; } $this->totalItems = count($folders) + count($files); // Adds the code of files/dirs $out = ''; $titleCol = 'file'; // @todo: fix this: go up one level with FAL // $upLevelDir = dirname(substr($files['files'][0]['path'], 0, -1)) . '/'; // $levelUp = $GLOBALS['SOBE']->basicFF->checkPathAgainstMounts($upLevelDir) ? $this->linkWrapDir(t3lib_iconWorks::getSpriteIcon('actions-view-go-up', array('title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.upOneLevel', TRUE))), $upLevelDir) : ''; // Cleaning rowlist for duplicates and place the $titleCol as the first column always! $rowlist = t3lib_div::rmFromList($titleCol, $rowlist); $rowlist = t3lib_div::uniqueList($rowlist); $rowlist = $rowlist ? $titleCol.','.$rowlist : $titleCol; if ($this->bigControlPanel || $this->clipBoard) { $rowlist = str_replace('file,', 'file,_CLIPBOARD_,', $rowlist); } $this->fieldArray = explode(',', $rowlist); $folderObjects = array(); foreach ($folders as $folder) { $folderObjects[] = $storage->getFolder($folder['identifier']); } // Directories are added $iOut = $this->formatDirList($folderObjects); if ($iOut) { // Half line is drawn $theData = array( $titleCol => '' ); } // Files are added $iOut .= $this->formatFileList($files, $titleCol); // Header line is drawn $theData = array(); foreach ($this->fieldArray as $v) { if ($v == '_CLIPBOARD_' && $this->clipBoard) { $cells = array(); $table = '_FILE'; $elFromTable = $this->clipObj->elFromTable($table); if (count($elFromTable)) { $cells[] = '' . t3lib_iconWorks::getSpriteIcon('actions-document-paste-after') . ''; } if ($this->clipObj->current!='normal' && $iOut) { $cells[]=$this->linkClipboardHeaderIcon(t3lib_iconWorks::getSpriteIcon('actions-edit-copy', array('title' => $GLOBALS['LANG']->getLL('clip_selectMarked', 1))), $table,'setCB'); $cells[]=$this->linkClipboardHeaderIcon(t3lib_iconWorks::getSpriteIcon('actions-edit-delete', array('title' => $GLOBALS['LANG']->getLL('clip_deleteMarked'))), $table,'delete',$GLOBALS['LANG']->getLL('clip_deleteMarkedWarning')); $onClick = 'checkOffCB(\'' . implode(',', $this->CBnames) . '\', this); return false;'; $cells[] = '' . t3lib_iconWorks::getSpriteIcon('actions-document-select'). ''; } $theData[$v] = implode('',$cells); } else { // Normal row: $theT = $this->linkWrapSort($GLOBALS['LANG']->getLL('c_' . $v, 1), $this->folderObject->getCombinedIdentifier(), $v); $theData[$v] = $theT; } } $out .= '' . $this->addelement(1, $levelUp, $theData, ' class="t3-row-header"', '') . ''; $out .= '' . $iOut . ''; // half line is drawn // finish $out = ' '.$out.'
'; } else { /** @var $flashMessage t3lib_FlashMessage */ $flashMessage = t3lib_div::makeInstance( 't3lib_FlashMessage', $GLOBALS['LANG']->getLL('storageNotBrowsableMessage'), $GLOBALS['LANG']->getLL('storageNotBrowsableTitle'), t3lib_FlashMessage::INFO ); $out = $flashMessage->render(); } return $out; } /** * Gets the number of files and total size of a folder * * @return string **/ function getFolderInfo() { if($this->counter == 1) { $fileLabel = $GLOBALS['LANG']->getLL('file', TRUE); } else { $fileLabel = $GLOBALS['LANG']->getLL('files', TRUE); } return $this->counter . ' ' . $fileLabel . ', ' . t3lib_div::formatSize($this->totalbytes, $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE)); } /** * This returns tablerows for the directories in the array $items['sorting']. * * @param t3lib_file_Folder[] $folders Folders of t3lib_file_Folder * @return string HTML table rows. */ function formatDirList(array $folders) { $out = ''; foreach ($folders as $folderObject) { list($flag, $code) = $this->fwd_rwd_nav(); $out .= $code; if ($flag) { // Initialization $this->counter++; list($title, $icon, $path) = $this->dirData($folderObject); // The icon with link $theIcon = t3lib_iconWorks::getSpriteIconForFile('folder', array('title' => $title)); if ($this->clickMenus) { $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon, $folderObject->getCombinedIdentifier()); } // Preparing and getting the data-array $theData = array(); foreach ($this->fieldArray as $field) { switch($field) { case 'size': $numFiles = $folderObject->getFileCount(); $theData[$field] = $numFiles . ' ' . $GLOBALS['LANG']->getLL(($numFiles === 1 ? 'file' : 'files'), TRUE); break; case 'rw': $theData[$field] = (!$folderObject->checkActionPermission('read') ? ' ' : '' . $GLOBALS['LANG']->getLL('read', TRUE) . '') . (!$folderObject->checkActionPermission('write') ? '' : '' . $GLOBALS['LANG']->getLL('write', TRUE) . ''); break; case 'fileext': $theData[$field] = $GLOBALS['LANG']->getLL('folder', TRUE); break; case 'tstamp': // @todo: FAL: how to get the mtime info -- $theData[$field] = t3lib_BEfunc::date($theFile['tstamp']); $theData[$field] = '-'; break; case 'file': $theData[$field] = $this->linkWrapDir($title, $folderObject); break; case '_CLIPBOARD_': $temp = ''; if ($this->bigControlPanel) { $temp .= $this->makeEdit($folderObject); } $temp .= $this->makeClip($folderObject); $theData[$field] = $temp; break; case '_REF_': $theData[$field] = $this->makeRef($folderObject); break; default: $theData[$field] = t3lib_div::fixed_lgd_cs($theFile[$field], $this->fixedL); break; } } $out .= $this->addelement(1, $theIcon, $theData, ' class="file_list_normal"'); } $this->eCounter++; $this->dirCounter = $this->eCounter; } return $out; } /** * Wraps the directory-titles * * @param string $title String to be wrapped in links * @param t3lib_file_Folder $folderObject Folder to work on * @return string HTML */ function linkWrapDir($title, t3lib_file_Folder $folderObject) { $href = $this->backPath . $this->script . '?id=' . rawurlencode($folderObject->getCombinedIdentifier()); $onclick = ' onclick="'.htmlspecialchars('top.content.nav_frame.hilight_row("file","folder' . t3lib_div::md5int($folderObject->getCombinedIdentifier()) . '_"+top.fsMod.currentBank)') . '"'; // Sometimes $code contains plain HTML tags. In such a case the string should not be modified! if (!strcmp($title, strip_tags($title))) { return ''.t3lib_div::fixed_lgd_cs($title, $this->fixedL).''; } else { return '' . $title . ''; } } /** * Wraps filenames in links which opens them in a window IF they are in web-path. * * @param string $code String to be wrapped in links * @param t3lib_file_File $fileObject File to be linked * @return string HTML */ function linkWrapFile($code, t3lib_file_File $fileObject) { $fileUrl = $fileObject->getPublicUrl(TRUE); if ($fileUrl) { $aOnClick = "return top.openUrlInWindow('" . $fileUrl . "', 'WebFile');"; $code = ''.t3lib_div::fixed_lgd_cs($code,$this->fixedL).''; } return $code; } /** * Returns list URL; This is the URL of the current script with id and imagemode parameters, thats all. * The URL however is not relative (with the backpath), otherwise t3lib_div::sanitizeLocalUrl() would say that * the URL would be invalid * * @return string URL */ function listURL() { return t3lib_div::linkThisScript(array( 'target' => rawurlencode($this->folderObject->getCombinedIdentifier()), 'imagemode' => $this->thumbs )); } /** * Returns some data specific for the directories... * * @param t3lib_file_Folder $folderObject File information array * @return array (title, icon, path) */ function dirData(t3lib_file_Folder $folderObject) { $title = htmlspecialchars($folderObject->getName()); $icon = 'apps-filetree-folder-default'; if ($title == '_temp_') { $icon = 'apps-filetree-folder-temp'; $title = '' . $GLOBALS['LANG']->getLL('temp', TRUE) . ''; } if ($title == '_recycler_') { $icon = 'apps-filetree-folder-recycler'; $title = '' . $GLOBALS['LANG']->getLL('recycler', TRUE) . ''; } // Mark the icon as read-only icon if the folder is not writable if ($folderObject->checkActionPermission('write') === FALSE) { $icon = 'apps-filetree-folder-locked'; } return array($title, $icon, $folderObject->getIdentifier()); } /** * This returns tablerows for the files in the array $items['sorting']. * * @param t3lib_file_File[] $files File items * @return string HTML table rows. */ function formatFileList(array $files) { $out = ''; foreach ($files as $fileObject) { list($flag, $code) = $this->fwd_rwd_nav(); $out .= $code; if ($flag) { // Initialization $this->counter++; $fileInfo = $fileObject->getStorage()->getFileInfo($fileObject); $this->totalbytes += $fileObject->getSize(); $ext = $fileObject->getExtension(); $fileName = trim($fileObject->getName()); // The icon with link $theIcon = t3lib_iconWorks::getSpriteIconForFile($ext, array('title' => $fileName)); if ($this->clickMenus) { $theIcon = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon($theIcon, $fileObject->getCombinedIdentifier()); } // Preparing and getting the data-array $theData = array(); foreach ($this->fieldArray as $field) { switch ($field) { case 'size': $theData[$field] = t3lib_div::formatSize($fileObject->getSize(), $GLOBALS['LANG']->getLL('byteSizeUnits', TRUE)); break; case 'rw': $theData[$field] = '' . (!$fileObject->checkActionPermission('read') ? ' ' : '' . $GLOBALS['LANG']->getLL('read', TRUE) . '') . (!$fileObject->checkActionPermission('write') ? '' : '' . $GLOBALS['LANG']->getLL('write', TRUE) . ''); break; case 'fileext': $theData[$field] = strtoupper($ext); break; case 'tstamp': $theData[$field] = t3lib_BEfunc::date($fileInfo['mtime']); break; case '_CLIPBOARD_': $temp = ''; if ($this->bigControlPanel) { $temp .= $this->makeEdit($fileObject); } $temp .= $this->makeClip($fileObject); $theData[$field] = $temp; break; case '_REF_': $theData[$field] = $this->makeRef($fileObject); break; case 'file': $theData[$field] = $this->linkWrapFile(htmlspecialchars($fileName), $fileObject); // Thumbnails? if ($this->thumbs && $this->isImage($ext)) { $processedFile = $fileObject->process(t3lib_file_ProcessedFile::CONTEXT_IMAGEPREVIEW, array()); if ($processedFile) { $thumbUrl = $processedFile->getPublicUrl(TRUE); $theData[$field] .= '
'; } } break; default: // @todo: fix the access on the array $theData[$field]= htmlspecialchars(t3lib_div::fixed_lgd_cs($theFile[$field], $this->fixedL)); break; } } $out .= $this->addelement(1, $theIcon, $theData, ' class="file_list_normal"'); } $this->eCounter++; } return $out; } /** * Returns TRUE if $ext is an image-extension according to $GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'] * * @param string $ext File extension * @return boolean */ function isImage($ext) { return t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['GFX']['imagefile_ext'], strtolower($ext)); } /** * Wraps the directory-titles ($code) in a link to file_list.php (id=$path) and sorting commands... * * @param string $code String to be wrapped * @param string $folderIdentifier ID (path) * @param string $col Sorting column * @return string HTML */ function linkWrapSort($code, $folderIdentifier, $col) { // reverse sorting if ($this->sort == $col && !$this->sortRev) { $params='&SET[sort]=' . $col . '&SET[reverse]=1'; } else { $params='&SET[sort]=' . $col . '&SET[reverse]=0'; } $href = t3lib_div::resolveBackPath($GLOBALS['BACK_PATH'] . $this->script) . '?id=' . rawurlencode($folderIdentifier) . $params; return ''.$code.''; } /** * Creates the clipboard control pad * * @param t3lib_file_File|t3lib_file_Folder $fileOrFolderObject Array with information about the file/directory for which to make the clipboard panel for the listing. * @return string HTML-table */ function makeClip($fileOrFolderObject) { $cells = array(); $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier(); $md5 = t3lib_div::shortmd5($fullIdentifier); // For normal clipboard, add copy/cut buttons: if ($this->clipObj->current == 'normal') { $isSel = $this->clipObj->isSelected('_FILE', $md5); $cells[]='' . t3lib_iconWorks::getSpriteIcon('actions-edit-copy'.($isSel=='copy'?'-release':''),array('title'=>$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.copy',1))). ''; $cells[]='' . t3lib_iconWorks::getSpriteIcon('actions-edit-cut'.($isSel=='cut'?'-release':''),array('title'=>$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.cut',1))). ''; } else { // For numeric pads, add select checkboxes: $n = '_FILE|'.$md5; $this->CBnames[] = $n; $checked = ($this->clipObj->isSelected('_FILE',$md5)?' checked="checked"':''); $cells[] = ''. ''; } // Display PASTE button, if directory: $elFromTable = $this->clipObj->elFromTable('_FILE'); if (is_a($fileOrFolderObject, 't3lib_file_Folder') && count($elFromTable)) { $cells[] = '' . t3lib_iconWorks::getSpriteIcon('actions-document-paste-into') . ''; } // Compile items into a DIV-element: return '
'.implode(' ',$cells).'
'; } /** * Creates the edit control section * * @param t3lib_file_File|t3lib_file_Folder $fileOrFolderObject Array with information about the file/directory for which to make the edit control section for the listing. * @return string HTML-table */ function makeEdit($fileOrFolderObject) { $cells = array(); $fullIdentifier = $fileOrFolderObject->getCombinedIdentifier(); // Edit metadata of file try { if (is_a($fileOrFolderObject, 't3lib_file_File') && $fileOrFolderObject->isIndexed() && $fileOrFolderObject->checkActionPermission('edit')) { $data = array( 'sys_file' => array($fileOrFolderObject->getUid() => 'edit') ); $editOnClick = t3lib_BEfunc::editOnClick(t3lib_div::implodeArrayForUrl('edit', $data), $GLOBALS['BACK_PATH'], $this->listUrl()); $cells['editmetadata'] = '' . t3lib_iconWorks::getSpriteIcon('actions-document-open') . ''; } else{ $cells['editmetadata'] = t3lib_iconWorks::getSpriteIcon('empty-empty'); } } catch (Exception $e) { $cells['editmetadata'] = t3lib_iconWorks::getSpriteIcon('empty-empty'); } // Edit file content (if editable) if (is_a($fileOrFolderObject, 't3lib_file_File') && $fileOrFolderObject->checkActionPermission('edit') && t3lib_div::inList($GLOBALS['TYPO3_CONF_VARS']['SYS']['textfile_ext'], $fileOrFolderObject->getExtension())) { $editOnClick = 'top.content.list_frame.location.href=top.TS.PATH_typo3+\'file_edit.php?target=' . rawurlencode($fullIdentifier) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; $cells['edit'] = '' . t3lib_iconWorks::getSpriteIcon('actions-page-open') . ''; } else { $cells['edit'] = t3lib_iconWorks::getSpriteIcon('empty-empty'); } // rename the file if ($fileOrFolderObject->checkActionPermission('rename')) { $renameOnClick = 'top.content.list_frame.location.href = top.TS.PATH_typo3+\'file_rename.php?target=' . rawurlencode($fullIdentifier) . '&returnUrl=\'+top.rawurlencode(top.content.list_frame.document.location.pathname+top.content.list_frame.document.location.search);return false;'; $cells['rename'] = '' . t3lib_iconWorks::getSpriteIcon('actions-edit-rename') . ''; } else { $cells['rename'] = t3lib_iconWorks::getSpriteIcon('empty-empty'); } if (is_a($fileOrFolderObject, 't3lib_file_Folder')) { $infoOnClick = 'top.launchView( \'_FOLDER\', \'' . $fullIdentifier . '\');return false;'; } elseif (is_a($fileOrFolderObject, 't3lib_file_File')) { $infoOnClick = 'top.launchView( \'_FILE\', \'' . $fullIdentifier . '\');return false;'; } $cells['info'] = '' . t3lib_iconWorks::getSpriteIcon('status-dialog-information') . ''; // Hook for manipulating edit icons. if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'])) { foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['fileList']['editIconsHook'] as $classData) { $hookObject = t3lib_div::getUserObj($classData); if (!($hookObject instanceof fileList_editIconHook)) { throw new UnexpectedValueException('$hookObject must implement interface fileList_editIconHook', 1235225797); } $hookObject->manipulateEditIcons($cells, $this); } } // Compile items into a DIV-element: return '
' . implode(' ', $cells).'
'; } /** * Make reference count * * @param t3lib_file_File|t3lib_file_Folder $fileOrFolderObject Array with information about the file/directory for which to make the clipboard panel for the listing. * @return string HTML */ function makeRef($fileOrFolderObject) { if ($fileOrFolderObject instanceof t3lib_file_FolderInterface) { return '-'; } // Look up the path: $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows( '*', 'sys_refindex', 'ref_table = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr('sys_file', 'sys_refindex') . ' AND ref_uid = ' . $fileOrFolderObject->getUid() . ' AND deleted=0' ); // Compile information for title tag: $infoData = array(); if (is_array($rows)) { foreach ($rows as $row) { $infoData[] = $row['tablename'] . ':' . $row['recuid'] . ':' . $row['field']; } } return count($infoData) ? '' . count($infoData) . '' : '-'; } } if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/class.file_list.inc'])) { include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['typo3/class.file_list.inc']); } ?>