Skip to content
Snippets Groups Projects
Commit 9d0a6318 authored by Torsten Oppermann's avatar Torsten Oppermann
Browse files

[TASK] Only showing root pages for all domains

parent c520693d
No related branches found
No related tags found
No related merge requests found
...@@ -47,23 +47,15 @@ class BackendService { ...@@ -47,23 +47,15 @@ class BackendService {
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public static function getPages() { public static function getPages() {
$out = [];
/** @var $databaseConnection DatabaseConnection */ /** @var $databaseConnection DatabaseConnection */
$databaseConnection = $GLOBALS['TYPO3_DB']; $databaseConnection = $GLOBALS['TYPO3_DB'];
$rows = $databaseConnection->exec_SELECTgetRows( $rows = $databaseConnection->exec_SELECTgetRows(
'distinct pid', '*',
'pages', 'pages',
'deleted = 0' 'deleted = 0 AND is_siteroot = 1'
); );
foreach ($rows as $row) { return $rows;
$pageInfo = BackendUtility::readPageAccess($row['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo) {
$out[] = $pageInfo;
}
}
return $out;
} }
/** /**
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<td nowrap="nowrap" class="col-title"> <td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}); return false;"> <a href="#" onclick="sgMailGoToPage({page.uid}); return false;">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> <sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull} {page.title}
</a> </a>
</td> </td>
</tr> </tr>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment