[TYPO3-dam-devel] RFC: Bugfix: 6725: No file specific icons shown in "Media Tools > Check upload index" shown
Peter Kühn
peter.kuehn at wmdb.de
Mon Feb 11 23:19:20 CET 2008
-1
@michiel: please check your suggestion from mantis against the solution
provided on the list.
yours solved the prob partly, imho the one on the list - which is
different from yours - solves the prob, although cosmetical, completely
gRTz
pekue
Michiel Roos schrieb:
> Well . . .
>
> +1
>
> because I cooked it up. It's more of a feauture than a bug, since it's
> eye candy. This patch is not perfect but does better than showing just
> the default icon.
>
> Met vriendelijke groet,
>
> Michiel Roos
>
> Netcreators BV :: creation and innovation
> www.netcreators.com
>
> Interesse in werken bij Netcreators?
> http://www.netcreators.com/bedrijf/vacatures/
>
> 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
>
More information about the TYPO3-team-dam
mailing list