Skip to content

Commit

Permalink
[BUGFIX] Show mount point pid in tooltip
Browse files Browse the repository at this point in the history
Use either field mount_pid or display a note

Releases: master
Resolves: #86349
Change-Id: Iaed4f7ab527f02644670d980dc6f6feaef010537
Reviewed-on: https://review.typo3.org/58372
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Reviewed-by: Alexander Grein <alexander.grein@gmail.com>
Tested-by: Alexander Grein <alexander.grein@gmail.com>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Tested-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
  • Loading branch information
brandung-gs authored and liayn committed Sep 25, 2018
1 parent 4ba06d9 commit 1cd4117
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class PageTreeRepository
'perms_groupid',
'perms_group',
'perms_everybody',
'mount_pid'
];

/**
Expand Down
20 changes: 12 additions & 8 deletions typo3/sysext/backend/Classes/Utility/BackendUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -1525,15 +1525,19 @@ public static function titleAttribForPages($row, $perms_clause = '', $includeAtt
}
$parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['shortcut']['label']) . ' ' . $label;
} elseif ($row['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT) {
if ($perms_clause) {
$label = self::getRecordPath((int)$row['mount_pid'], $perms_clause, 20);
if ((int)$row['mount_pid'] > 0) {
if ($perms_clause) {
$label = self::getRecordPath((int)$row['mount_pid'], $perms_clause, 20);
} else {
$lRec = self::getRecordWSOL('pages', (int)$row['mount_pid'], 'title');
$label = $lRec['title'] . ' (id=' . $row['mount_pid'] . ')';
}
$parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid']['label']) . ' ' . $label;
if ($row['mount_pid_ol']) {
$parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid_ol']['label']);
}
} else {
$lRec = self::getRecordWSOL('pages', (int)$row['mount_pid'], 'title');
$label = $lRec['title'] . ' (id=' . $row['mount_pid'] . ')';
}
$parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid']['label']) . ' ' . $label;
if ($row['mount_pid_ol']) {
$parts[] = $lang->sL($GLOBALS['TCA']['pages']['columns']['mount_pid_ol']['label']);
$parts[] = $lang->sl('LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:no_mount_pid');
}
}
if ($row['nav_hide']) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,9 @@
<trans-unit id="backend_layout.tabs.extended">
<source>Extended</source>
</trans-unit>
<trans-unit id="no_mount_pid">
<source>No Mount Point is set</source>
</trans-unit>
</body>
</file>
</xliff>

0 comments on commit 1cd4117

Please sign in to comment.