Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_mail
Commits
f68482c4
Commit
f68482c4
authored
6 years ago
by
Kevin Ditscheid
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Do not include sys_language_uid check in TYPO3 8 for pages
parent
b4822aa6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
Feature upgrade to9 lts
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/Service/BackendService.php
+24
-12
24 additions, 12 deletions
Classes/Service/BackendService.php
with
24 additions
and
12 deletions
Classes/Service/BackendService.php
+
24
−
12
View file @
f68482c4
...
...
@@ -38,6 +38,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use
TYPO3\CMS\Core\Imaging\Icon
;
use
TYPO3\CMS\Core\Imaging\IconFactory
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Core\Utility\VersionNumberUtility
;
use
TYPO3\CMS\Extbase\Mvc\Request
;
use
TYPO3\CMS\Extbase\Object\ObjectManager
;
use
TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager
;
...
...
@@ -77,20 +78,25 @@ class BackendService {
$queryBuilder
->
getRestrictions
()
->
removeAll
()
->
add
(
GeneralUtility
::
makeInstance
(
DeletedRestriction
::
class
));
$rows
=
$queryBuilder
->
select
(
'*'
)
$queryBuilder
->
select
(
'*'
)
->
from
(
'pages'
)
->
where
(
$queryBuilder
->
expr
()
->
andX
(
$queryBuilder
->
expr
()
->
eq
(
'is_siteroot'
,
1
),
$queryBuilder
->
expr
()
->
eq
(
'sys_language_uid'
,
0
)
$queryBuilder
->
expr
()
->
eq
(
'is_siteroot'
,
1
)
)
->
execute
()
->
fetchAll
();
);
if
(
!
version_compare
(
VersionNumberUtility
::
getCurrentTypo3Version
(),
'9.0.0'
,
'<'
))
{
$queryBuilder
->
andWhere
(
$queryBuilder
->
expr
()
->
eq
(
'sys_language_uid'
,
0
)
);
}
$rows
=
$queryBuilder
->
execute
()
->
fetchAll
();
foreach
(
$rows
as
$row
)
{
$pageInfo
=
BackendUtility
::
readPageAccess
(
$row
[
'uid'
],
$GLOBALS
[
'BE_USER'
]
->
getPagePermsClause
(
1
));
...
...
@@ -123,12 +129,18 @@ class BackendService {
/** @var IconFactory $iconFactory */
$iconFactory
=
GeneralUtility
::
makeInstance
(
IconFactory
::
class
);
if
(
version_compare
(
VersionNumberUtility
::
getCurrentTypo3Version
(),
'9.0.0'
,
'<'
))
{
$locallangPath
=
'LLL:EXT:lang/Resources/Private/Language/locallang_core.xlf:'
;
}
else
{
$locallangPath
=
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:'
;
}
// Refresh
$refreshButton
=
$buttonBar
->
makeLinkButton
()
->
setHref
(
GeneralUtility
::
getIndpEnv
(
'REQUEST_URI'
))
->
setTitle
(
LocalizationUtility
::
translate
(
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:
labels.reload'
$locallangPath
.
'
labels.reload'
)
)
->
setIcon
(
$iconFactory
->
getIcon
(
'actions-refresh'
,
Icon
::
SIZE_SMALL
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment