Skip to content
Snippets Groups Projects
Commit f748c3c0 authored by Paul Ilea's avatar Paul Ilea
Browse files

[BUGFIX] typo3 v8 compatibility fixes

parent 23e62c21
No related branches found
No related tags found
No related merge requests found
......@@ -166,7 +166,7 @@ class MailController extends ActionController {
$pageUid = (int) GeneralUtility::_GP('id');
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo && $pageInfo['is_siteroot'] === '1') {
if ($pageInfo && (int) $pageInfo['is_siteroot'] === 1) {
$this->view->assign('templateDescription', $templateDescription);
$this->view->assign(
......
......@@ -93,7 +93,7 @@ class QueueController extends ActionController {
// create doc header component
$pageInfo = BackendUtility::readPageAccess($pageUid, $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo && $pageInfo['is_siteroot'] === '1') {
if ($pageInfo && (int) $pageInfo['is_siteroot'] === 1) {
$this->view->assign('selectedTemplateKey', $selectedTemplate);
$this->view->assign('selectedExtensionKey', $selectedExtension);
$this->view->assign('templates', $registerArray);
......
......@@ -76,6 +76,13 @@ class BackendService {
foreach ($rows as $row) {
$pageInfo = BackendUtility::readPageAccess($row['uid'], $GLOBALS['BE_USER']->getPagePermsClause(1));
if ($pageInfo) {
$rootline = BackendUtility::BEgetRootLine($pageInfo['uid'], '', true);
ksort($rootline);
$path = '/root';
foreach($rootline as $page) {
$path .= '/p' . dechex($page['uid']);
}
$pageInfo['path'] = $path;
$out[] = $pageInfo;
}
}
......
......@@ -157,9 +157,8 @@
<f:for each="{pages}" as="page">
<tr data-uid="{page.pid}">
<td nowrap="nowrap" class="col-title">
<a href="#" onclick="sgMailGoToPage({page.uid}); return false;">
<sgm:backend.icon table="pages" row="{page}" clickMenu="0" />
{page._thePathFull}
<a href="#" onclick="sgMailGoToPage({page.uid}, '{page.path}'); return false;">
<f:format.raw><sgm:backend.icon table="pages" row="{page}" clickMenu="0" /> {page._thePathFull}</f:format.raw>
</a>
</td>
</tr>
......
......@@ -81,9 +81,24 @@ function setHighlight(id) { //
* Switches to the spefied page in the BE
*
* @param {number} uid
* @param {string} path
*/
function sgMailGoToPage(uid) {
top.nav.invokePageId(uid, gotToPageCallback);
function sgMailGoToPage(uid, path) {
if (top.nav) {
top.nav.invokePageId(uid,gotToPageCallback);
} else {
var tree = top.Ext.getCmp('typo3-pagetree');
if (tree) {
tree.activeTree.selectPath(path);
}
var separator = '?';
if (top.currentSubScript.indexOf('?') !== -1) {
separator = '&';
}
top.TYPO3.Backend.ContentContainer.setUrl(
top.currentSubScript + separator + 'id=' + uid
);
}
}
/**
......@@ -91,7 +106,7 @@ function sgMailGoToPage(uid) {
*
* @param {number} uid
*/
function gotToPageCallback(path) {
function gotToPageCallback(uid) {
var callback = top.Ext.createDelegate(top.nav.mainTree.selectPath, top.nav.mainTree);
callback.apply(this, arguments);
var node = top.nav.getSelected();
......
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