Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TYPO3
languagevisibility
Commits
a488a828
Commit
a488a828
authored
Jul 10, 2020
by
Fabian Galinski
😾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TASK] Removal of 2 unused fields of the sys_languages table
parent
828ab7cf
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
105 deletions
+4
-105
Classes/Service/VisibilityService.php
Classes/Service/VisibilityService.php
+4
-10
Configuration/TCA/Overrides/sys_language.php
Configuration/TCA/Overrides/sys_language.php
+0
-73
Resources/Private/Language/de.locallang_db.xlf
Resources/Private/Language/de.locallang_db.xlf
+0
-8
Resources/Private/Language/locallang_db.xlf
Resources/Private/Language/locallang_db.xlf
+0
-6
ext_tables.sql
ext_tables.sql
+0
-8
No files found.
Classes/Service/VisibilityService.php
View file @
a488a828
...
@@ -348,14 +348,12 @@ class VisibilityService implements SingletonInterface {
...
@@ -348,14 +348,12 @@ class VisibilityService implements SingletonInterface {
if
(
$this
->
cachedDefaultVisibilityForElements
===
NULL
)
{
if
(
$this
->
cachedDefaultVisibilityForElements
===
NULL
)
{
$queryBuilder
=
GeneralUtility
::
makeInstance
(
ConnectionPool
::
class
)
$queryBuilder
=
GeneralUtility
::
makeInstance
(
ConnectionPool
::
class
)
->
getConnectionForTable
(
'sys_language'
);
->
getConnectionForTable
(
'sys_language'
);
$results
=
$queryBuilder
->
prepare
(
$results
=
$queryBuilder
->
prepare
(
'SELECT uid FROM sys_language'
);
'SELECT uid, tx_languagevisibility_defaultvisibilityel FROM sys_language'
);
$this
->
cachedDefaultVisibilityForElements
[
0
]
=
'fallback'
;
$this
->
cachedDefaultVisibilityForElements
[
0
]
=
'fallback'
;
if
(
$results
->
execute
())
{
if
(
$results
->
execute
())
{
foreach
(
$results
->
fetchAll
()
as
$entry
)
{
foreach
(
$results
->
fetchAll
()
as
$entry
)
{
$this
->
cachedDefaultVisibilityForElements
[
$entry
[
'uid'
]]
=
$entry
[
'tx_languagevisibility_defaultvisibilityel'
]
;
$this
->
cachedDefaultVisibilityForElements
[
$entry
[
'uid'
]]
=
'active'
;
}
}
}
}
}
}
...
@@ -376,19 +374,15 @@ class VisibilityService implements SingletonInterface {
...
@@ -376,19 +374,15 @@ class VisibilityService implements SingletonInterface {
* @throws DBALException
* @throws DBALException
*/
*/
protected
function
getDefaultVisibilityForPagesByLanguage
(
$languageUid
):
string
{
protected
function
getDefaultVisibilityForPagesByLanguage
(
$languageUid
):
string
{
if
(
$this
->
cachedDefaultVisibilityForPages
===
NULL
)
{
if
(
$this
->
cachedDefaultVisibilityForPages
===
NULL
)
{
$queryBuilder
=
GeneralUtility
::
makeInstance
(
ConnectionPool
::
class
)
$queryBuilder
=
GeneralUtility
::
makeInstance
(
ConnectionPool
::
class
)
->
getConnectionForTable
(
'sys_language'
);
->
getConnectionForTable
(
'sys_language'
);
$results
=
$queryBuilder
->
prepare
(
$results
=
$queryBuilder
->
prepare
(
'SELECT uid FROM sys_language'
);
'SELECT uid, tx_languagevisibility_defaultvisibility FROM sys_language'
);
$this
->
cachedDefaultVisibilityForPages
[
0
]
=
'fallback'
;
$this
->
cachedDefaultVisibilityForPages
[
0
]
=
'fallback'
;
if
(
$results
->
execute
())
{
if
(
$results
->
execute
())
{
foreach
(
$results
->
fetchAll
()
as
$entry
)
{
foreach
(
$results
->
fetchAll
()
as
$entry
)
{
$this
->
cachedDefaultVisibilityForPages
[
$entry
[
'uid'
]]
=
'active'
;
$this
->
cachedDefaultVisibilityForPages
[
$entry
[
'uid'
]]
=
$entry
[
'tx_languagevisibility_defaultvisibility'
];
}
}
}
}
}
}
...
...
Configuration/TCA/Overrides/sys_language.php
deleted
100644 → 0
View file @
828ab7cf
<?php
/**
*
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
*/
call_user_func
(
static
function
(
$extKey
,
$table
)
{
$tempColumns
=
[
'tx_languagevisibility_defaultvisibility'
=>
[
'exclude'
=>
0
,
'label'
=>
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:'
.
$table
.
'.tx_languagevisibility_defaultvisibility'
,
'config'
=>
[
'type'
=>
'select'
,
'renderType'
=>
'selectSingle'
,
'items'
=>
[
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.active'
,
'active'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.translated'
,
'translated'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.fallback'
,
'fallback'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.enforce'
,
'enforce'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.inactive'
,
'inactive'
],
],
'default'
=>
'fallback'
,
'size'
=>
1
,
'maxitems'
=>
1
,
]
],
'tx_languagevisibility_defaultvisibilityel'
=>
[
'exclude'
=>
0
,
'label'
=>
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:'
.
$table
.
'.tx_languagevisibility_defaultvisibilityel'
,
'config'
=>
[
'type'
=>
'select'
,
'renderType'
=>
'selectSingle'
,
'items'
=>
[
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.active'
,
'active'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.translated'
,
'translated'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.fallback'
,
'fallback'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.enforce'
,
'enforce'
],
[
'LLL:EXT:'
.
$extKey
.
'/Resources/Private/Language/locallang_db.xlf:tx_languagevisibility_visibility.I.inactive'
,
'inactive'
],
],
'default'
=>
'fallback'
,
'size'
=>
1
,
'maxitems'
=>
1
,
]
],
];
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
addTCAcolumns
(
$table
,
$tempColumns
);
\
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
::
addToAllTCAtypes
(
$table
,
'tx_languagevisibility_defaultvisibility, tx_languagevisibility_defaultvisibilityel'
);
},
'languagevisibility'
,
'sys_language'
);
Resources/Private/Language/de.locallang_db.xlf
View file @
a488a828
...
@@ -59,14 +59,6 @@
...
@@ -59,14 +59,6 @@
<source>
OK
</source>
<source>
OK
</source>
<target>
OK
</target>
<target>
OK
</target>
</trans-unit>
</trans-unit>
<trans-unit
id=
"sys_language.tx_languagevisibility_defaultvisibility"
approved=
"yes"
>
<source>
default visibility for pages
</source>
<target>
Standard-Sichtbarkeit für Seiten
</target>
</trans-unit>
<trans-unit
id=
"sys_language.tx_languagevisibility_defaultvisibilityel"
approved=
"yes"
>
<source>
default visibility for other elements
</source>
<target>
Standard-Sichtbarkeit für Elemente
</target>
</trans-unit>
<trans-unit
id=
"tabname"
approved=
"yes"
>
<trans-unit
id=
"tabname"
approved=
"yes"
>
<source>
Language
</source>
<source>
Language
</source>
<target>
Sprache
</target>
<target>
Sprache
</target>
...
...
Resources/Private/Language/locallang_db.xlf
View file @
a488a828
...
@@ -46,12 +46,6 @@
...
@@ -46,12 +46,6 @@
<trans-unit
id=
"reports.ok.value"
>
<trans-unit
id=
"reports.ok.value"
>
<source>
OK
</source>
<source>
OK
</source>
</trans-unit>
</trans-unit>
<trans-unit
id=
"sys_language.tx_languagevisibility_defaultvisibility"
>
<source>
default visibility for pages
</source>
</trans-unit>
<trans-unit
id=
"sys_language.tx_languagevisibility_defaultvisibilityel"
>
<source>
default visibility for other elements
</source>
</trans-unit>
<trans-unit
id=
"tabname"
>
<trans-unit
id=
"tabname"
>
<source>
Language
</source>
<source>
Language
</source>
</trans-unit>
</trans-unit>
...
...
ext_tables.sql
View file @
a488a828
#
#
Table
structure
for
table
'sys_language'
#
CREATE
TABLE
sys_language
(
tx_languagevisibility_defaultvisibility
varchar
(
11
)
DEFAULT
'translated'
NOT
NULL
,
tx_languagevisibility_defaultvisibilityel
varchar
(
11
)
DEFAULT
'translated'
NOT
NULL
);
#
#
#
Table
structure
for
table
'pages'
#
Table
structure
for
table
'pages'
#
#
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment