Skip to content

Commit

Permalink
Changed metaData to metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
kozi committed Sep 25, 2014
1 parent fb7d757 commit bc9e9c0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions contao/classes/MetafieldsHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ public function injectMetaData($objRow, $strBuffer, $objElement) {
}

if ($objRow->type === 'gallery') {
$objElement->__set('metaData', $this->getMultiMetaData($objRow->multiSRC));
$objElement->__set('metadata', $this->getMultiMetaData($objRow->multiSRC));
$strBuffer = $objElement->generate();
}

if ($objRow->type === 'image') {
$objFile = \FilesModel::findByUuid($objRow->singleSRC);
$objElement->__set('singleSRC', $objFile->uuid);
$objElement->__set('metaData', $this->getMetaData($objFile->meta, $objPage->language));
$objElement->__set('metadata', $this->getMetaData($objFile->meta, $objPage->language));

$strBuffer = $objElement->generate();
}
Expand Down Expand Up @@ -134,11 +134,11 @@ private function getMultiMetaData($multiSRC) {
return $images;
}

public static function embedData(&$body, $metaData) {
public static function embedData(&$body, $metadata) {
foreach($body as $class => $row) {
foreach($row as $key => $col) {
if (array_key_exists($col->singleSRC, $metaData) && sizeof($metaData[$col->singleSRC]) > 0) {
$body[$class][$key]->metaData = $metaData[$col->singleSRC];
if (array_key_exists($col->singleSRC, $metadata) && sizeof($metadata[$col->singleSRC]) > 0) {
$body[$class][$key]->metadata = $metadata[$col->singleSRC];
}
}
}
Expand Down

0 comments on commit bc9e9c0

Please sign in to comment.