Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Classes/BackendModule/SeoModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SeoModule extends \TYPO3\CMS\Backend\Module\AbstractFunctionModule {
/**
* @var array
*/
protected $pathCaches = array();
protected $pathData = array();

/**
* Does some initial work for the page
Expand Down Expand Up @@ -198,7 +198,7 @@ public function main() {
$uidList = $GLOBALS['TYPO3_DB']->cleanIntList(implode(',', $pages));
$this->loadLanguageOverlays($uidList);
if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('realurl')) {
$this->loadPathCache($uidList);
$this->loadPathData($uidList);
}

// Render information table
Expand Down Expand Up @@ -272,7 +272,7 @@ protected function renderSEOTable($tree) {
}

// render main language (or specifically selected language) row
$item['pathcache'] = $this->pathCaches[$itemId][($this->langOnly ? $this->langOnly : 0)];
$item['pathdata'] = $this->pathData[$itemId][($this->langOnly ? $this->langOnly : 0)];


// row title
Expand All @@ -295,7 +295,7 @@ protected function renderSEOTable($tree) {
if ($numRows > 1) {
foreach ($translations as $langId => $item) {
$item['sys_language'] = $langId;
$item['pathcache'] = $this->pathCaches[$itemId][$langId];
$item['pathdata'] = $this->pathData[$itemId][$langId];
$tRows = $this->renderRowContent($item);
// compile row
foreach ($tRows as $singleRow) {
Expand Down Expand Up @@ -341,7 +341,7 @@ protected function renderRowContent($item, $rowTitle = NULL) {
$row2 = array();

if ($cmd != 'edit') {
$row1[] = $item['pathcache'];
$row1[] = $item['pathdata'];
$row1[] = $item['tx_seo_titletag'];
$row1[] = $item['keywords'];
$row1[] = $item['description'];
Expand Down Expand Up @@ -417,23 +417,23 @@ protected function loadLanguageOverlays($uidList) {
* @param string $uidList The Page Uids
* @return void
*/
protected function loadPathCache($uidList) {
protected function loadPathData($uidList) {

// building where clause
$where = ($this->langOnly || $this->langOnly === 0 ? ' AND language_id = ' . $this->langOnly : '');

$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'page_id, language_id, pagepath',
'tx_realurl_pathcache',
'tx_realurl_pathdata',
'page_id IN ('. $uidList .') ' . $where,
'',
'language_id ASC, expire ASC'
);

// Traverse result
$this->pathCaches = array();
$this->pathData = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$this->pathCaches[$row['page_id']][$row['language_id']] = $row['pagepath'];
$this->pathData[$row['page_id']][$row['language_id']] = $row['pagepath'];
}
}

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
}
},
"suggest": {
"realurl": "*",
"realurl": ">=2.1.5",
"cooluri": "*"
}
}
2 changes: 1 addition & 1 deletion ext_emconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
'conflicts' => array(
),
'suggests' => array(
'realurl' => '0.0.0-0.0.0',
'realurl' => '2.1.5-0.0.0',
'cooluri' => '0.0.0-0.0.0',
),
),
Expand Down