[TASK] Provide a reason if set_no_cache() is called

Since #20849, we can specify a reason why we call
GLOBALS['TSFE']->set_no_cache().

Provide a reason for all calls done in core.

Resolves: #43506
Related: #20849
Releases: 6.1

Change-Id: Id786a041ef5d9f1db49d644459a593aaf54b5018
Reviewed-on: http://review.typo3.org/16925
Reviewed-by: Stefan Neufeind
Reviewed-by: Dmitry Dulepov
Tested-by: Dmitry Dulepov
This commit is contained in:
Philipp Gampe 2012-12-01 20:03:48 +01:00 committed by Dmitry Dulepov
parent 886a4d600b
commit 948dd11478

View file

@ -69,7 +69,7 @@ class FrontendEditPanel {
*/
public function editPanel($content, array $conf, $currentRecord = '', array $dataArr = array(), $table = '', $allow = '', $newUID = 0, array $hiddenFields = array()) {
// Special content is about to be shown, so the cache must be disabled.
$GLOBALS['TSFE']->set_no_cache();
$GLOBALS['TSFE']->set_no_cache('Frontend edit panel is shown');
$formName = 'TSFE_EDIT_FORM_' . substr($GLOBALS['TSFE']->uniqueHash(), 0, 4);
$formTag = '<form name="' . $formName . '" id ="' . $formName . '" action="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REQUEST_URI')) . '" method="post" enctype="' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype'] . '" onsubmit="return TBE_EDITOR.checkSubmit(1);" style="margin: 0 0 0 0;">';
$sortField = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
@ -185,7 +185,7 @@ class FrontendEditPanel {
*/
public function editIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArr = array(), $addUrlParamStr = '', $table, $editUid, $fieldList) {
// Special content is about to be shown, so the cache must be disabled.
$GLOBALS['TSFE']->set_no_cache();
$GLOBALS['TSFE']->set_no_cache('Display frontend edit icons');
$style = $conf['styleAttribute'] ? ' style="' . htmlspecialchars($conf['styleAttribute']) . '"' : '';
$iconTitle = $this->cObj->stdWrap($conf['iconTitle'], $conf['iconTitle.']);
$iconImg = $conf['iconImg'] ? $conf['iconImg'] : '<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg(TYPO3_mainDir, 'gfx/edit_fe.gif', 'width="11" height="12" border="0" align="top" ') . ' title="' . \TYPO3\CMS\Core\Utility\GeneralUtility::deHSCentities(htmlspecialchars($iconTitle)) . '"' . $style . ' class="frontEndEditIcons" alt="" />';