Skip to content

Commit

Permalink
[TASK] Remove unused ADMCMD_previewWS GET parameter
Browse files Browse the repository at this point in the history
The workspace GET parameter "ADMCMD_previewWS" is not used anymore
since TYPO3 4.7 and can be removed, as it was used before
the current workspace wasn't transferred via "ADMCMD_prev" keywords before.

Resolves: #84001
Releases: master
Change-Id: If0ec7284a0e6b87185c7773637459e61f6ab2232
Reviewed-on: https://review.typo3.org/55853
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
  • Loading branch information
bmack authored and fsaris committed Feb 21, 2018
1 parent 2f715fa commit 37ada3d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion typo3/sysext/frontend/Classes/Page/CacheHashCalculator.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ protected function splitQueryStringToArray($queryString)
protected function isAdminPanelParameter($key)
{
return $key === 'ADMCMD_noBeUser' || $key === 'ADMCMD_view' || $key === 'ADMCMD_editIcons'
|| $key === 'ADMCMD_simUser' || $key === 'ADMCMD_simTime' || $key === 'ADMCMD_previewWS'
|| $key === 'ADMCMD_simUser' || $key === 'ADMCMD_simTime'
|| stripos($key, 'TSFE_ADMIN_PANEL') !== false && preg_match('/TSFE_ADMIN_PANEL\\[.*?\\]/', $key);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function indexAction($previewWS = null)
} else {
$liveUrl = $wsBaseUrl . '&ADMCMD_noBeUser=1&ADMCMD_prev=IGNORE';
}
$wsUrl = $wsBaseUrl . '&ADMCMD_prev=IGNORE&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=' . $backendUser->workspace;
$wsUrl = $wsBaseUrl . '&ADMCMD_prev=IGNORE&ADMCMD_view=1&ADMCMD_editIcons=1';
$backendDomain = GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY');
$splitPreviewTsConfig = BackendUtility::getModTSconfig($this->pageId, 'workspaces.splitPreviewModes');
$splitPreviewModes = GeneralUtility::trimExplode(',', $splitPreviewTsConfig['value']);
Expand Down
6 changes: 2 additions & 4 deletions typo3/sysext/workspaces/Classes/Hook/PreviewHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ public function getPreviewConfiguration()
// get initialized it shouldn't lead to situations where
// users can use those credentials.
if ($previewConfig['fullWorkspace']) {
// Set the workspace preview value:
GeneralUtility::_GETset($previewConfig['fullWorkspace'], 'ADMCMD_previewWS');
// If ADMCMD_prev is set the $inputCode value cannot come
// from a cookie and we set that cookie here. Next time it will
// be found from the cookie if ADMCMD_prev is not set again...
Expand Down Expand Up @@ -343,13 +341,13 @@ protected function getPreviewInputCode()

/**
* Set preview keyword, eg:
* $previewUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.$this->compilePreviewKeyword('id='.$pageId.'&L='.$language.'&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS='.$this->workspace, $GLOBALS['BE_USER']->user['uid'], 120);
* $previewUrl = GeneralUtility::getIndpEnv('TYPO3_SITE_URL').'index.php?ADMCMD_prev='.$this->compilePreviewKeyword('id='.$pageId.'&L='.$language.'&ADMCMD_view=1&ADMCMD_editIcons=1&', $GLOBALS['BE_USER']->user['uid'], 120);
*
* @todo for sys_preview:
* - Add a comment which can be shown to previewer in frontend in some way (plus maybe ability to write back, take other action?)
* - Add possibility for the preview keyword to work in the backend as well: So it becomes a quick way to a certain action of sorts?
*
* @param string $getVarsStr Get variables to preview, eg. 'id=1150&L=0&ADMCMD_view=1&ADMCMD_editIcons=1&ADMCMD_previewWS=8'
* @param string $getVarsStr Get variables to preview, eg. 'id=1150&L=0&ADMCMD_view=1&ADMCMD_editIcons=1'
* @param string $backendUserUid 32 byte MD5 hash keyword for the URL: "?ADMCMD_prev=[keyword]
* @param int $ttl Time-To-Live for keyword
* @param int|null $fullWorkspace Which workspace to preview. Workspace UID, -1 or >0. If set, the getVars is ignored in the frontend, so that string can be empty
Expand Down

0 comments on commit 37ada3d

Please sign in to comment.