[TYPO3-dam-devel] RFC: Bugfix: 6725: No file specific icons shown in "Media Tools > Check upload index" shown
Michiel Roos
michiel at netcreators.com
Tue Apr 8 23:20:14 CEST 2008
A big fat +1
;-)
On Feb 8, 2008, at 2:12 PM, Peter Kuehn [wmdb] wrote:
> This is a svn patch request.
>
> Type: bugfix
>
> Description:
> If you start a complete index check you'll get nice file specific
> icons. However only a default non file specific icon is shown when
> you check the upload index. I have the dam fileicons extension
> installed.
>
> Reason:
> tx_dam::file_compileInfo() does not return file_mime_type which is
> needed to be converted to media_type which is needed to get the
> right icon....
>
> Solution:
> - instantiate tx_dam_indexing as dryRun´ing
> - use the existing functions tx_dam_indexing::getFileMimeType() and
> tx_dam::convert_mediaType()
>
>
> Bugtracker reference: http://bugs.typo3.org/view.php?id=6725
>
> Index: class.tx_dam_tools_indexupdate.php
> ===================================================================
> --- class.tx_dam_tools_indexupdate.php (revision 8208)
> +++ class.tx_dam_tools_indexupdate.php (working copy)
> @@ -677,7 +677,11 @@
> }
>
> if (is_array($indexSession['data'])) {
> -
> +
> + $damIndexing = t3lib_div::makeInstance('tx_dam_indexing');
> + $damIndexing->init();
> + $damIndexing->dryRun=TRUE;
> +
> foreach ($indexSession['data'] as $key => $file) {
>
> // increase progress bar
> @@ -696,6 +700,9 @@
> );
> $GLOBALS['TYPO3_DB']->exec_INSERTquery('tx_dam_file_tracking',
> $fields_values);
>
> + $fileInfo=array_merge($fileInfo,$damIndexing-
> >getFileMimeType($file));
> +
> $
> fileInfo
> ['media_type']=tx_dam::convert_mediaType($fileInfo['file_mime_type']);
> +
> $ctable = array();
> $ctable[] = ' ';
> $ctable[] =
> tx_dam
> ::icon_getFileTypeImgTag
> ($
> fileInfo
> ,'align
> =
> "top
> "').' 
> ;'.htmlspecialchars(t3lib_div::fixed_lgd_cs($fileInfo['file_name'],
> 30));
> _______________________________________________
> TYPO3-team-dam mailing list
> TYPO3-team-dam at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-dam
Met vriendelijke groet,
Michiel Roos
Netcreators BV :: creation and innovation
www.netcreators.com
Interesse in werken bij Netcreators?
http://www.netcreators.com/bedrijf/vacatures/
More information about the TYPO3-team-dam
mailing list