Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
df_tabs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
df_tabs
Merge requests
!5
Feature change language label tabs
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Feature change language label tabs
feature_ChangeLanguageLabelTabs
into
master
Overview
0
Commits
12
Pipelines
0
Changes
35
Closed
Axel Braunschweiger
requested to merge
feature_ChangeLanguageLabelTabs
into
master
6 years ago
Overview
0
Commits
12
Pipelines
0
Changes
35
Expand
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
0d5c2fc4
12 commits,
6 years ago
35 files
+
334
−
1322
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
35
Search (e.g. *.vue) (Ctrl+P)
Classes/Ajax/LoadAjax.php deleted
100644 → 0
+
0
−
178
Options
<?php
namespace
SGalinski\DfTabs\Ajax
;
/***************************************************************
* 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 2 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!
***************************************************************/
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
if
(
!
defined
(
'PATH_typo3conf'
))
{
die
(
'Could not access this script directly!'
);
}
/**
* @todo ajax anpassen
* Ajax Postloader
*/
class
LoadAjax
{
/**
* @var array
*/
protected
$content
=
array
();
/**
* Controlling method
*
* @return void
*/
public
function
main
()
{
tslib_eidtools
::
connectDB
();
tslib_eidtools
::
initLanguage
();
tslib_eidtools
::
initTCA
();
$parameters
=
GeneralUtility
::
_GP
(
'df_tabs'
);
$this
->
initTSFE
(
$parameters
[
'id'
],
$parameters
[
'languageId'
]);
/** @var $controller \tx_dftabs_plugin1 */
$controller
=
GeneralUtility
::
makeInstance
(
'tx_dftabs_plugin1'
);
$controller
->
cObj
=
$GLOBALS
[
'TSFE'
]
->
cObj
;
$controller
->
conf
=
$GLOBALS
[
'TSFE'
]
->
tmpl
->
setup
[
'plugin.'
][
'tx_dftabs_plugin1.'
];
$controller
->
conf
[
'ajax'
]
=
FALSE
;
$records
=
GeneralUtility
::
trimExplode
(
','
,
$parameters
[
'records'
]);
$this
->
content
=
$controller
->
ajax
(
$records
,
$parameters
[
'mode'
]);
if
(
t3lib_extMgm
::
isLoaded
(
'content_replacer'
))
{
$extensionPath
=
t3lib_extMgm
::
extPath
(
'content_replacer'
);
require_once
(
$extensionPath
.
'Classes/Controller/class.tx_contentreplacer_controller_main.php'
);
/** @var $contentReplacer tx_contentreplacer_controller_Main */
$contentReplacer
=
t3lib_div
::
makeInstance
(
'tx_contentreplacer_controller_Main'
);
$this
->
content
=
$contentReplacer
->
main
(
$this
->
content
);
}
}
/**
* Converts relative paths in the HTML source to absolute paths for fileadmin/, typo3conf/ext/ and media/ folders.
*
* Note: Copied from the TypoScriptFrontendController and should be removed with a force to 6.2.6.
*
* @return void
* @see pagegen.php, INTincScript()
*/
public
function
setAbsRefPrefix
()
{
if
(
!
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
)
{
return
;
}
$search
=
array
(
'"typo3temp/'
,
'"typo3conf/ext/'
,
'"'
.
TYPO3_mainDir
.
'contrib/'
,
'"'
.
TYPO3_mainDir
.
'ext/'
,
'"'
.
TYPO3_mainDir
.
'sysext/'
,
'"'
.
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'BE'
][
'fileadminDir'
],
'"'
.
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'BE'
][
'RTE_imageStorageDir'
]
);
$replace
=
array
(
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
'typo3temp/'
,
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
'typo3conf/ext/'
,
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
TYPO3_mainDir
.
'contrib/'
,
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
TYPO3_mainDir
.
'ext/'
,
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
TYPO3_mainDir
.
'sysext/'
,
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'BE'
][
'fileadminDir'
],
'"'
.
$GLOBALS
[
'TSFE'
]
->
absRefPrefix
.
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'BE'
][
'RTE_imageStorageDir'
]
);
$this
->
content
=
str_replace
(
$search
,
$replace
,
$this
->
content
);
}
/**
* Prints the content
*
* @return void
*/
public
function
printContent
()
{
header
(
'Last-Modified: '
.
gmdate
(
'D, d M Y H:i:s'
)
.
' GMT'
);
header
(
'Cache-Control: no-store, no-cache, must-revalidate'
);
header
(
'Cache-Control: post-check=0, pre-check=0'
,
FALSE
);
header
(
'Pragma: no-cache'
);
$this
->
setAbsRefPrefix
();
echo
$this
->
content
;
}
/**
* Initializes the TSFE object
*
* @param int $pageId
* @param int $languageId
* @return void
*/
protected
function
initTSFE
(
$pageId
,
$languageId
)
{
if
(
is_object
(
$GLOBALS
[
'TSFE'
]))
{
return
;
}
$pageId
=
(
int
)
$pageId
;
$language
=
(
int
)
$languageId
;
t3lib_div
::
_GETset
(
$language
,
'L'
);
t3lib_div
::
_GETset
(
$pageId
,
'pageId'
);
/** @var $typoScriptController tslib_fe */
$GLOBALS
[
'TSFE'
]
=
$typoScriptController
=
t3lib_div
::
makeInstance
(
'tslib_fe'
,
$GLOBALS
[
'TYPO3_CONF_VARS'
],
$pageId
,
0
);
// if (!is_object($GLOBALS['TT'])) {
// $GLOBALS['TT'] = new NullTimeTracker();
// }
$typoScriptController
->
initFEuser
();
$typoScriptController
->
initUserGroups
();
$typoScriptController
->
fetch_the_id
();
$typoScriptController
->
getPageAndRootline
();
$typoScriptController
->
initTemplate
();
// $typoScriptController->forceTemplateParsing = TRUE;
// $typoScriptController->getCompressedTCarray();
$typoScriptController
->
no_cache
=
TRUE
;
$typoScriptController
->
getConfigArray
();
$typoScriptController
->
settingLocale
();
$typoScriptController
->
settingLanguage
();
// $typoScriptController->no_cache = TRUE;
// $typoScriptController->tmpl->start($GLOBALS['TSFE']->rootLine);
// $typoScriptController->no_cache = FALSE;
$typoScriptController
->
newCObj
();
$typoScriptController
->
absRefPrefix
=
(
$typoScriptController
->
config
[
'config'
][
'absRefPrefix'
]
?:
''
);
}
}
/** @var $object LoadAjax */
$object
=
GeneralUtility
::
makeInstance
(
'Tx_DfTabs_Ajax_LoadAjax'
);
$object
->
main
();
$object
->
printContent
();
?>
Loading