Bug #13526 ยป v1.patch
Classes/Controller/PreviewController.php (working copy) | ||
---|---|---|
$viewDomain = t3lib_BEfunc::getViewDomain($this->pageId);
|
||
$wsBaseUrl = $viewDomain . '/index.php?id=' . $this->pageId . '&L=' . $language;
|
||
// @todo - handle new pages here
|
||
// branchpoints are not handled anymore because this feature is not supposed anymore
|
||
// branchpoints are not handled anymore because this feature is not supposed anymore
|
||
if (tx_Workspaces_Service_Workspaces::isNewPage($this->pageId)) {
|
||
$wsNewPageUri = $uriBuilder->uriFor('newPage', array(), 'Tx_Workspaces_Controller_PreviewController', 'workspaces', 'web_workspacesworkspaces');
|
||
$wsNewPageParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
|
||
$this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams);
|
||
} elseif (tx_Workspaces_Service_Workspaces::isMoveTarget($this->pageId)) {
|
||
$wsNewPageUri = $uriBuilder->uriFor('moveTarget', array(), 'Tx_Workspaces_Controller_PreviewController', 'workspaces', 'web_workspacesworkspaces');
|
||
$wsNewPageParams = '&tx_workspaces_web_workspacesworkspaces[controller]=Preview';
|
||
$this->view->assign('liveUrl', $wsSettingsPath . $wsNewPageUri . $wsNewPageParams);
|
||
} else {
|
||
$this->view->assign('liveUrl', $wsBaseUrl . '&ADMCMD_noBeUser=1');
|
||
}
|
||
... | ... | |
}
|
||
/**
|
||
* @return void
|
||
*/
|
||
public function moveTargetAction() {
|
||
$message = t3lib_div::makeInstance(
|
||
't3lib_FlashMessage',
|
||
$GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:info.movetarget.detail'),
|
||
$GLOBALS['LANG']->sL('LLL:EXT:workspaces/Resources/Private/Language/locallang.xml:info.movetarget'),
|
||
t3lib_FlashMessage::INFO
|
||
);
|
||
t3lib_FlashMessageQueue::addMessage($message);
|
||
}
|
||
/**
|
||
* Generates the JavaScript code for the backend,
|
||
* and since we're loading a backend module outside of the actual backend
|
||
* this copies parts of the backend.php
|
Classes/Service/Workspaces.php (working copy) | ||
---|---|---|
}
|
||
/**
|
||
* Determine whether a certain page was moved in the current workspace
|
||
*
|
||
* @static
|
||
* @param $id Primary key of the page to check
|
||
* @return bool
|
||
*/
|
||
public static function isMoveTarget($id) {
|
||
$isMoveTarget = FALSE;
|
||
$whereClause = 't3ver_move_id = ' . intval($id);
|
||
$whereClause .= ' AND t3ver_wsid = ' . $GLOBALS['BE_USER']->workspace;
|
||
$whereClause .= t3lib_BEfunc::deleteClause('pages');
|
||
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', $whereClause);
|
||
if (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res))) {
|
||
$isMoveTarget = (int) $row['t3ver_state'] === 3;
|
||
}
|
||
return $isMoveTarget;
|
||
}
|
||
/**
|
||
* Generates a view link for a page.
|
||
*
|
||
* @static
|
ext_tables.php (working copy) | ||
---|---|---|
array(
|
||
// An array holding the controller-action-combinations that are accessible
|
||
'Review' => 'index,fullIndex,singleIndex',
|
||
'Preview' => 'index,newPage'
|
||
'Preview' => 'index,newPage,moveTarget'
|
||
),
|
||
array(
|
||
'access' => 'user,group',
|
Resources/Private/Language/locallang.xml (working copy) | ||
---|---|---|
<label index="warning.oldStyleWorkspaceInUser">It seems that you're still using old-style workspace. Please use the update scripts in the TYPO3 Install Tool to run the necessary updates. If you continue using this module without migrating your workspace you might loose data.</label>
|
||
<label index="info.newpage">New Page!</label>
|
||
<label index="info.newpage.detail">The previewed page has been created in a workspace and has no live counterpart.</label>
|
||
<label index="info.movetarget">Move Page!</label>
|
||
<label index="info.movetarget.detail">The previewed page has been moved in the workspace, there's no live part available for this preview.</label>
|
||
<label index="preview.visualPreview">Visual preview</label>
|
||
<label index="preview.listView">List view</label>
|
||
<label index="preview.livePreview">Live</label>
|