Skip to content

Commit

Permalink
Merge pull request #67 from jonathanheilmann/v1.3.2
Browse files Browse the repository at this point in the history
[RELEASE] Release of version 1.3.2
  • Loading branch information
jonathanheilmann authored Jul 2, 2018
2 parents d5e510b + 4a513c4 commit f18ebd2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions Classes/Service/OgRendererService.php
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ public function main($content, $conf)
$fileObjects = array();
if ($GLOBALS['TSFE']->page['_PAGES_OVERLAY_UID'])
{
// Get extension configuration
$extConf = isset($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jh_opengraphprotocol']) ? GeneralUtility::removeDotsFromTS(unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['jh_opengraphprotocol'])) : array();

// Get images if there is a language overlay
// This is somehow a hack, as l10n_mode 'mergeIfNotBlack' does not work in this case.
// PageRepository->shouldFieldBeOverlaid does not work for config type 'inline' with "DEFAULT '0'" database config,
Expand All @@ -112,11 +115,12 @@ public function main($content, $conf)
// $GLOBALS['TSFE']->page['tx_jhopengraphprotocol_ogtype'] is related to table 'pages' or 'pages_language_overlay'.

$overlayFileObjects = $fileRepository->findByRelation('pages_language_overlay', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->page['_PAGES_OVERLAY_UID']);
if (count($overlayFileObjects) > 0)
if (count($overlayFileObjects) > 0) {
$fileObjects = $overlayFileObjects;
else if (isset($GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode']) &&
$GLOBALS['TCA']['pages_language_overlay']['columns']['tx_jhopengraphprotocol_ogfalimages']['l10n_mode'] === 'mergeIfNotBlank')
} else if (isset($extConf['languageOverlay']['tx_jhopengraphprotocol_ogfalimages']['mergeIfNotBlank']) &&
$extConf['languageOverlay']['tx_jhopengraphprotocol_ogfalimages']['mergeIfNotBlank']) {
$fileObjects = $fileRepository->findByRelation('pages', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->id);
}
} else
$fileObjects = $fileRepository->findByRelation('pages', 'tx_jhopengraphprotocol_ogfalimages', $GLOBALS['TSFE']->id);

Expand Down
6 changes: 6 additions & 0 deletions Documentation/ChangeLog/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ ChangeLog
:Changes:
Changes

- :Version:
1.3.2

:Changes:
\* [BUG] #63 TYPO3 8 and mergeIfNotBlank Problem

- :Version:
1.3.1

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"support": {
"issues": "https://github.com/jonathanheilmann/ext-jh_opengraphprotocol/issues"
},
"version": "1.3.1",
"version": "1.3.2",
"require": {
"typo3/cms": "~7.6||~8.7"
},
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'title' => 'Open Graph protocol',
'description' => 'Adds the Open Graph protocol properties in meta-tags to the html-header supporting multilingual-websites.',
'category' => 'plugin',
'version' => '1.3.1',
'version' => '1.3.2',
'state' => 'stable',
'uploadfolder' => false,
'createDirs' => '',
Expand Down

0 comments on commit f18ebd2

Please sign in to comment.