Issue Bug Closed

#18398The MMetusalem Bug - getReferencedFiles()

Michael Ablass 03/08/08, 17:13 updated 12/10/13, 01:10

Description

The fix for getReferencedFiles() in third party extensions is very helpful but seems to cover language issues. E.g. in tv_dam_connector (class.tx_damtvc_tsfe.php)

$damFiles = tx_dam_db::getReferencedFiles(‘tt_content’, $this->cObj->parentRecord[‘data’][‘_ORIG_uid’]?$this->cObj->parentRecord[‘data’][‘_ORIG_uid’]:$this->cObj->parentRecord[‘data’][‘uid’], $refField);

Works for default Language but not for e.g. second language.

The call needs to be changed to

$uid = $this->cObj->parentRecord[‘data’][‘_LOCALIZED_UID’] ? $this->cObj->parentRecord[‘data’][‘_LOCALIZED_UID’] : ($this->cObj->parentRecord[‘data’][‘_ORIG_uid’]?$this->cObj->parentRecord[‘data’][‘_ORIG_uid’]:$this->cObj->parentRecord[‘data’][‘uid’]);

I think this should work for other dam extending extensions too.

(issue imported from #M7791)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.