[TYPO3-dam-devel] RFC: Bugfix: 7344: DAM does not preview correct files in workspaces

Michiel Roos michiel at netcreators.com
Mon Feb 11 20:50:53 CET 2008


Hi,

Patch applies. I however don't work with workspaces that much. So can  
someone please post some steps to reproduce 'broken behavior'?

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 11:42 AM, Peter Kuehn [wmdb] wrote:

> This is a svn patch request.
>
> Type: bugfix
>
> Description:
> When working inside workspaces, the DAM does not call up the correct  
> files when calling the method tx_dam_db::getReferencedFiles(). This  
> was partly due to workspaces issues, which Kasper has solved.  
> However some small changes apply to the DAM too.
>
> Please refer to bug:
> http://bugs.typo3.org/view.php?id=3531
> for a complete explanation.
>
> Bugtracker reference: http://bugs.typo3.org/view.php?id=7344
>
> Special Thnx to Francois Suter for providing the patch!
> Index: class.tx_dam_tcefunc.php
> ===================================================================
> --- class.tx_dam_tcefunc.php	(revision 8208)
> +++ class.tx_dam_tcefunc.php	(working copy)
> @@ -494,7 +494,7 @@
> 				$itemArray = array();
> 				$filesArray = array();
> 				if(intval($row['uid'])) {
> -					$filesArray = tx_dam_db::getReferencedFiles($table,  
> $row['uid'], $config['MM_match_fields'], $config['MM'], 'tx_dam.*');
> +					$filesArray = tx_dam_db::getReferencedFiles($table,  
> $row['_ORIG_uid']?$row['_ORIG_uid']:$row['uid'],  
> $config['MM_match_fields'], $config['MM'], 'tx_dam.*');
> 					foreach($filesArray['rows'] as $row)	{
> 						$itemArray[] = array('table'=>'tx_dam', 'id' => $row['uid'],  
> 'title' => ($row['title']?$row['title']:$row['file_name']));
> 					}
> Index: class.tx_dam_tsfe.php
> ===================================================================
> --- class.tx_dam_tsfe.php	(revision 8208)
> +++ class.tx_dam_tsfe.php	(working copy)
> @@ -96,7 +96,7 @@
> 		}
>
>
> -		$uid = $this->cObj->data['_LOCALIZED_UID'] ? $this->cObj- 
> >data['_LOCALIZED_UID'] : $this->cObj->data['uid'];
> +		$uid = $this->cObj->data['_LOCALIZED_UID'] ? $this->cObj- 
> >data['_LOCALIZED_UID'] : ($this->cObj->data['_ORIG_uid']?$this- 
> >cObj->data['_ORIG_uid']:$this->cObj->data['uid']);
> 		$refTable = ($conf['refTable'] && is_array($GLOBALS['TCA'] 
> [$conf['refTable']])) ? $conf['refTable'] : 'tt_content';
> 		$damFiles = tx_dam_db::getReferencedFiles($refTable, $uid,  
> $refField);
>
> _______________________________________________
> 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