Change ("a" . "b") . "c" into "a" . "b" . "c" using the lex-pass tool.
Change-Id: I42191aed03c4d78ae98d8e0e3d0468c10e11dd0c
Resolves: #40779
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14486
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
*/
public function main(&$backRef, $menuItems, $table, $uid) {
$localItems = array();
- if ((!$backRef->cmLevel && $uid > 0) && $GLOBALS['BE_USER']->check('modules', 'web_txversionM1')) {
+ if (!$backRef->cmLevel && $uid > 0 && $GLOBALS['BE_USER']->check('modules', 'web_txversionM1')) {
// Returns directly, because the clicked item was not from the pages table
- if ((in_array('versioning', $backRef->disabledItems) || !$GLOBALS['TCA'][$table]) || !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
+ if (in_array('versioning', $backRef->disabledItems) || !$GLOBALS['TCA'][$table] || !$GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
return $menuItems;
}
// Adds the regular item
$LL = $this->includeLL();
// "Versioning" element added:
- $url = (((\TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version') . 'cm1/index.php?table=') . rawurlencode($table)) . '&uid=') . $uid;
- $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $LL), $backRef->excludeIcon((('<img src="' . $backRef->backPath) . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version')) . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
+ $url = \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version') . 'cm1/index.php?table=' . rawurlencode($table) . '&uid=' . $uid;
+ $localItems[] = $backRef->linkItem($GLOBALS['LANG']->getLLL('title', $LL), $backRef->excludeIcon('<img src="' . $backRef->backPath . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version') . 'cm1/cm_icon.gif" width="15" height="12" border="0" align="top" alt="" />'), $backRef->urlRefForCM($url), 1);
// "Send to review" element added:
/*
$url = t3lib_extMgm::extRelPath('version').'cm1/index.php?id='.($table=='pages'?$uid:$backRef->rec['pid']).'&table='.rawurlencode($table).'&uid='.$uid.'&sendToReview=1';
$workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid=0' . \t3lib_BEfunc::deleteClause('sys_workspace'), '', 'title');
foreach ($workspaces as $rec) {
if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
- $this->MOD_MENU['display'][$rec['uid']] = (('[' . $rec['uid']) . '] ') . $rec['title'];
+ $this->MOD_MENU['display'][$rec['uid']] = '[' . $rec['uid'] . '] ' . $rec['title'];
}
}
}
//$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txversionM1', '', $GLOBALS['BACK_PATH']);
if ($this->recordFound && $GLOBALS['TCA'][$this->table]['ctrl']['versioningWS']) {
// View page
- $buttons['view'] = ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], \t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid'])))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+ $buttons['view'] = '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($this->pageinfo['uid'], $GLOBALS['BACK_PATH'], \t3lib_BEfunc::BEgetRootLine($this->pageinfo['uid']))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
// Shortcut
if ($GLOBALS['BE_USER']->mayMakeShortcut()) {
$buttons['shortcut'] = $this->doc->makeShortcutIcon('id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(',', array_keys($this->MOD_MENU)), $this->MCONF['name']);
$diff_2 = \t3lib_div::_POST('diff_2');
if (\t3lib_div::_POST('do_diff')) {
$content = '';
- $content .= ('<h3>' . $GLOBALS['LANG']->getLL('diffing')) . ':</h3>';
+ $content .= '<h3>' . $GLOBALS['LANG']->getLL('diffing') . ':</h3>';
if ($diff_1 && $diff_2) {
$diff_1_record = \t3lib_BEfunc::getRecord($this->table, $diff_1);
$diff_2_record = \t3lib_BEfunc::getRecord($this->table, $diff_2);
\t3lib_div::loadTCA($this->table);
$t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
$tRows = array();
- $tRows[] = ((('
+ $tRows[] = '
<tr class="bgColor5 tableheader">
- <td>' . $GLOBALS['LANG']->getLL('fieldname')) . '</td>
- <td width="98%">') . $GLOBALS['LANG']->getLL('coloredDiffView')) . ':</td>
+ <td>' . $GLOBALS['LANG']->getLL('fieldname') . '</td>
+ <td width="98%">' . $GLOBALS['LANG']->getLL('coloredDiffView') . ':</td>
</tr>
';
foreach ($diff_1_record as $fN => $fV) {
- if (($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough') && !\t3lib_div::inList('t3ver_label', $fN)) {
+ if ($GLOBALS['TCA'][$this->table]['columns'][$fN] && $GLOBALS['TCA'][$this->table]['columns'][$fN]['config']['type'] !== 'passthrough' && !\t3lib_div::inList('t3ver_label', $fN)) {
if (strcmp($diff_1_record[$fN], $diff_2_record[$fN])) {
$diffres = $t3lib_diff_Obj->makeDiffDisplay(\t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_2_record[$fN], 0, 1), \t3lib_BEfunc::getProcessedValue($this->table, $fN, $diff_1_record[$fN], 0, 1));
- $tRows[] = ((('
+ $tRows[] = '
<tr class="bgColor4">
- <td>' . $fN) . '</td>
- <td width="98%">') . $diffres) . '</td>
+ <td>' . $fN . '</td>
+ <td width="98%">' . $diffres . '</td>
</tr>
';
}
}
}
if (count($tRows) > 1) {
- $content .= ('<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows)) . '</table><br /><br />';
+ $content .= '<table border="0" cellpadding="1" cellspacing="1" width="100%">' . implode('', $tRows) . '</table><br /><br />';
} else {
$content .= $GLOBALS['LANG']->getLL('recordsMatchesCompletely');
}
$recordIcon = \t3lib_iconWorks::getSpriteIconForRecord($this->table, $record);
$recTitle = \t3lib_BEfunc::getRecordTitle($this->table, $record, TRUE);
// Display versions:
- $content .= (((('
- ' . $recordIcon) . $recTitle) . '
- <form name="theform" action="') . str_replace('&sendToReview=1', '', $this->REQUEST_URI)) . '" method="post">
+ $content .= '
+ ' . $recordIcon . $recTitle . '
+ <form name="theform" action="' . str_replace('&sendToReview=1', '', $this->REQUEST_URI) . '" method="post">
<table border="0" cellspacing="1" cellpadding="1">';
- $content .= ((((((((((((((((((((((((((((((((((((((((('
+ $content .= '
<tr class="bgColor5 tableheader">
<td> </td>
<td> </td>
- <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_title')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_title')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_uid')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_uid')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_oid')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_oid')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_id')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_id')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_wsid')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_wsid')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_state')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_state')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_stage')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_stage')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_count')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_count')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_pid')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_pid')) . '</td>
- <td title="') . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_label')) . '">') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label')) . '</td>
- <td colspan="2"><input type="submit" name="do_diff" value="') . $GLOBALS['LANG']->getLL('diff')) . '" /></td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_title') . '">' . $GLOBALS['LANG']->getLL('tblHeader_title') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_uid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_uid') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_oid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_oid') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_id') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_id') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_wsid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_wsid') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_state') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_state') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_stage') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_stage') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_count') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_count') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_pid') . '">' . $GLOBALS['LANG']->getLL('tblHeader_pid') . '</td>
+ <td title="' . $GLOBALS['LANG']->getLL('tblHeaderDesc_t3ver_label') . '">' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . '</td>
+ <td colspan="2"><input type="submit" name="do_diff" value="' . $GLOBALS['LANG']->getLL('diff') . '" /></td>
</tr>';
$versions = \t3lib_BEfunc::selectVersionsOfRecord($this->table, $this->uid, '*', $GLOBALS['BE_USER']->workspace);
foreach ($versions as $row) {
$adminLinks = $this->adminLinks($this->table, $row);
- $content .= ((((((((((((((((((((((((((((((((((((((('
- <tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader')) . '">
- <td>') . ($row['uid'] != $this->uid ? ((((('<a href="' . $this->doc->issueCommand((((((((((('&cmd[' . $this->table) . '][') . $this->uid) . '][version][swapWith]=') . $row['uid']) . '&cmd[') . $this->table) . '][') . $this->uid) . '][version][action]=swap'))) . '" title="') . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>' : \t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' => $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE))))) . '</td>
- <td nowrap="nowrap">') . $adminLinks) . '</td>
- <td nowrap="nowrap">') . \t3lib_BEfunc::getRecordTitle($this->table, $row, TRUE)) . '</td>
- <td>') . $row['uid']) . '</td>
- <td>') . $row['t3ver_oid']) . '</td>
- <td>') . $row['t3ver_id']) . '</td>
- <td>') . $row['t3ver_wsid']) . '</td>
- <td>') . $row['t3ver_state']) . '</td>
- <td>') . $row['t3ver_stage']) . '</td>
- <td>') . $row['t3ver_count']) . '</td>
- <td>') . $row['pid']) . '</td>
- <td nowrap="nowrap"><a href="#" onclick="') . htmlspecialchars(\t3lib_BEfunc::editOnClick((((('&edit[' . $this->table) . '][') . $row['uid']) . ']=edit&columnsOnly=t3ver_label'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>') . htmlspecialchars($row['t3ver_label'])) . '</td>
- <td class="version-diff-1"><input type="radio" name="diff_1" value="') . $row['uid']) . '"') . ($diff_1 == $row['uid'] ? ' checked="checked"' : '')) . '/></td>
- <td class="version-diff-2"><input type="radio" name="diff_2" value="') . $row['uid']) . '"') . ($diff_2 == $row['uid'] ? ' checked="checked"' : '')) . '/></td>
+ $content .= '
+ <tr class="' . ($row['uid'] != $this->uid ? 'bgColor4' : 'bgColor2 tableheader') . '">
+ <td>' . ($row['uid'] != $this->uid ? '<a href="' . $this->doc->issueCommand(('&cmd[' . $this->table . '][' . $this->uid . '][version][swapWith]=' . $row['uid'] . '&cmd[' . $this->table . '][' . $this->uid . '][version][action]=swap')) . '" title="' . $GLOBALS['LANG']->getLL('swapWithCurrent', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version') . '</a>' : \t3lib_iconWorks::getSpriteIcon('status-status-current', array('title' => $GLOBALS['LANG']->getLL('currentOnlineVersion', TRUE)))) . '</td>
+ <td nowrap="nowrap">' . $adminLinks . '</td>
+ <td nowrap="nowrap">' . \t3lib_BEfunc::getRecordTitle($this->table, $row, TRUE) . '</td>
+ <td>' . $row['uid'] . '</td>
+ <td>' . $row['t3ver_oid'] . '</td>
+ <td>' . $row['t3ver_id'] . '</td>
+ <td>' . $row['t3ver_wsid'] . '</td>
+ <td>' . $row['t3ver_state'] . '</td>
+ <td>' . $row['t3ver_stage'] . '</td>
+ <td>' . $row['t3ver_count'] . '</td>
+ <td>' . $row['pid'] . '</td>
+ <td nowrap="nowrap"><a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick(('&edit[' . $this->table . '][' . $row['uid'] . ']=edit&columnsOnly=t3ver_label'), $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>' . htmlspecialchars($row['t3ver_label']) . '</td>
+ <td class="version-diff-1"><input type="radio" name="diff_1" value="' . $row['uid'] . '"' . ($diff_1 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
+ <td class="version-diff-2"><input type="radio" name="diff_2" value="' . $row['uid'] . '"' . ($diff_2 == $row['uid'] ? ' checked="checked"' : '') . '/></td>
</tr>';
// Show sub-content if the table is pages AND it is not the online branch (because that will mostly render the WHOLE tree below - not smart;)
if ($this->table == 'pages' && $row['uid'] != $this->uid) {
$sub = $this->pageSubContent($row['uid']);
if ($sub) {
- $content .= ('
+ $content .= '
<tr>
<td></td>
<td></td>
- <td colspan="10">' . $sub) . '</td>
+ <td colspan="10">' . $sub . '</td>
<td colspan="2"></td>
</tr>';
}
$content .= '</table></form>';
$this->content .= $this->doc->section($GLOBALS['LANG']->getLL('title'), $content, 0, 1);
// Create new:
- $content = ((((((((((((((((('
+ $content = '
- <form action="' . $this->doc->backPath) . 'tce_db.php" method="post">
- ') . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label')) . ': <input type="text" name="cmd[') . $this->table) . '][') . $this->uid) . '][version][label]" /><br />
- <br /><input type="hidden" name="cmd[') . $this->table) . '][') . $this->uid) . '][version][action]" value="new" />
+ <form action="' . $this->doc->backPath . 'tce_db.php" method="post">
+ ' . $GLOBALS['LANG']->getLL('tblHeader_t3ver_label') . ': <input type="text" name="cmd[' . $this->table . '][' . $this->uid . '][version][label]" /><br />
+ <br /><input type="hidden" name="cmd[' . $this->table . '][' . $this->uid . '][version][action]" value="new" />
<input type="hidden" name="prErr" value="1" />
- <input type="hidden" name="redirect" value="') . htmlspecialchars($this->REQUEST_URI)) . '" />
- <input type="submit" name="_" value="') . $GLOBALS['LANG']->getLL('createNewVersion')) . '" />
- ') . \t3lib_TCEforms::getHiddenTokenField('tceAction')) . '
+ <input type="hidden" name="redirect" value="' . htmlspecialchars($this->REQUEST_URI) . '" />
+ <input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('createNewVersion') . '" />
+ ' . \t3lib_TCEforms::getHiddenTokenField('tceAction') . '
</form>
';
$tableNames[] = 'pages';
foreach ($tableNames as $tN) {
// Basically list ALL tables - not only those being copied might be found!
- $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $tN, ('pid=' . intval($pid)) . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : '');
+ $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $tN, 'pid=' . intval($pid) . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : '');
if ($GLOBALS['TYPO3_DB']->sql_num_rows($mres)) {
- $content .= ((((('
+ $content .= '
<tr>
- <td colspan="4" class="' . ($GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] ? 'bgColor6' : ($tN == 'pages' ? 'bgColor5' : 'bgColor-10'))) . '"') . (!$GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] && $tN !== 'pages' ? ' style="color: #666666; font-style:italic;"' : '')) . '>') . $tN) . '</td>
+ <td colspan="4" class="' . ($GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] ? 'bgColor6' : ($tN == 'pages' ? 'bgColor5' : 'bgColor-10')) . '"' . (!$GLOBALS['TCA'][$tN]['ctrl']['versioning_followPages'] && $tN !== 'pages' ? ' style="color: #666666; font-style:italic;"' : '') . '>' . $tN . '</td>
</tr>';
while ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
$ownVer = $this->lookForOwnVersions($tN, $subrow['uid']);
- $content .= ((((((('
+ $content .= '
<tr>
- <td>' . $this->adminLinks($tN, $subrow)) . '</td>
- <td>') . $subrow['uid']) . '</td>
- ') . ($ownVer > 1 ? ((((('<td style="font-weight: bold; background-color: yellow;"><a href="index.php?table=' . rawurlencode($tN)) . '&uid=') . $subrow['uid']) . '">') . ($ownVer - 1)) . '</a></td>' : '<td></td>')) . '
- <td width="98%">') . \t3lib_BEfunc::getRecordTitle($tN, $subrow, TRUE)) . '</td>
+ <td>' . $this->adminLinks($tN, $subrow) . '</td>
+ <td>' . $subrow['uid'] . '</td>
+ ' . ($ownVer > 1 ? '<td style="font-weight: bold; background-color: yellow;"><a href="index.php?table=' . rawurlencode($tN) . '&uid=' . $subrow['uid'] . '">' . ($ownVer - 1) . '</a></td>' : '<td></td>') . '
+ <td width="98%">' . \t3lib_BEfunc::getRecordTitle($tN, $subrow, TRUE) . '</td>
</tr>';
if ($tN == 'pages' && $c < 100) {
$sub = $this->pageSubContent($subrow['uid'], $c + 1);
if ($sub) {
- $content .= ('
+ $content .= '
<tr>
<td></td>
<td></td>
<td></td>
- <td width="98%">' . $sub) . '</td>
+ <td width="98%">' . $sub . '</td>
</tr>';
}
}
}
}
}
- return $content ? ('<table border="1" cellpadding="1" cellspacing="0" width="100%">' . $content) . '</table>' : '';
+ return $content ? '<table border="1" cellpadding="1" cellspacing="0" width="100%">' . $content . '</table>' : '';
}
/**
*/
public function adminLinks($table, $row) {
// Edit link:
- $adminLink = ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick((((('&edit[' . $table) . '][') . $row['uid']) . ']=edit'), $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+ $adminLink = '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick(('&edit[' . $table . '][' . $row['uid'] . ']=edit'), $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xml:cm.edit', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
// Delete link:
- $adminLink .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $row['uid']) . '][delete]=1')))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-edit-delete')) . '</a>';
+ $adminLink .= '<a href="' . htmlspecialchars($this->doc->issueCommand(('&cmd[' . $table . '][' . $row['uid'] . '][delete]=1'))) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:cm.delete', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-edit-delete') . '</a>';
if ($table == 'pages') {
// If another page module was specified, replace the default Page module with the new one
$newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
// Perform some acccess checks:
$a_wl = $GLOBALS['BE_USER']->check('modules', 'web_list');
$a_wp = \t3lib_extMgm::isLoaded('cms') && $GLOBALS['BE_USER']->check('modules', $pageModule);
- $adminLink .= ((((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'') . $pageModule) . '\'); return false;">') . \t3lib_iconWorks::getSpriteIcon('actions-page-open')) . '</a>';
- $adminLink .= ((('<a href="#" onclick="top.loadEditId(' . $row['uid']) . ');top.goToModule(\'web_list\'); return false;">') . \t3lib_iconWorks::getSpriteIcon('actions-system-list-open')) . '</a>';
+ $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'' . $pageModule . '\'); return false;">' . \t3lib_iconWorks::getSpriteIcon('actions-page-open') . '</a>';
+ $adminLink .= '<a href="#" onclick="top.loadEditId(' . $row['uid'] . ');top.goToModule(\'web_list\'); return false;">' . \t3lib_iconWorks::getSpriteIcon('actions-system-list-open') . '</a>';
// "View page" icon is added:
- $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['uid'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['uid'])))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+ $adminLink .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['uid'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['uid']))) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
} else {
if ($row['pid'] == -1) {
- $getVars = (('&ADMCMD_vPrev[' . rawurlencode((($table . ':') . $row['t3ver_oid']))) . ']=') . $row['uid'];
+ $getVars = '&ADMCMD_vPrev[' . rawurlencode(($table . ':' . $row['t3ver_oid'])) . ']=' . $row['uid'];
// "View page" icon is added:
- $adminLink .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['_REAL_PID'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']), '', '', $getVars))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+ $adminLink .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($row['_REAL_PID'], $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($row['_REAL_PID']), '', '', $getVars)) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
}
}
return $adminLink;
$actionLinks = '<br />';
if ($GLOBALS['BE_USER']->workspace !== 0) {
if ($this->publishAccess) {
- $actionLinks .= ((('<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage')) . '" onclick="return confirm(\'') . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), ($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : ''))) . '\');"/>';
+ $actionLinks .= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('publishPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('publishPageQuestion'), ($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '')) . '\');"/>';
if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
- $actionLinks .= ((('<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('swapPage')) . '" onclick="return confirm(\'') . sprintf($GLOBALS['LANG']->getLL('swapPageQuestion'), ($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : ''))) . '\');" />';
+ $actionLinks .= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('swapPage') . '" onclick="return confirm(\'' . sprintf($GLOBALS['LANG']->getLL('swapPageQuestion'), ($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? $GLOBALS['LANG']->getLL('publishPageQuestionStage') : '')) . '\');" />';
}
} else {
$actionLinks .= $this->doc->icons(1) . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:no_publish_permission');
}
}
- $actionLinks .= ('<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('refresh')) . '" />';
- $actionLinks .= ('<input type="submit" name="_previewLink" value="' . $GLOBALS['LANG']->getLL('previewLink')) . '" />';
- $actionLinks .= ('<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace')) . '</label>';
+ $actionLinks .= '<input type="submit" name="_" value="' . $GLOBALS['LANG']->getLL('refresh') . '" />';
+ $actionLinks .= '<input type="submit" name="_previewLink" value="' . $GLOBALS['LANG']->getLL('previewLink') . '" />';
+ $actionLinks .= '<input type="checkbox" class="checkbox" name="_previewLink_wholeWorkspace" id="_previewLink_wholeWorkspace" value="1" /><label for="_previewLink_wholeWorkspace">' . $GLOBALS['LANG']->getLL('allowPreviewOfWholeWorkspace') . '</label>';
$actionLinks .= $this->displayWorkspaceOverview_allStageCmd();
if ($actionLinks || count($errors)) {
- $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? ((('<h3>' . $GLOBALS['LANG']->getLL('errors')) . '</h3><br />') . implode('<br />', $errors)) . '<hr />' : ''), 0, 1);
+ $this->content .= $this->doc->section('', $actionLinks . (count($errors) ? '<h3>' . $GLOBALS['LANG']->getLL('errors') . '</h3><br />' . implode('<br />', $errors) . '<hr />' : ''), 0, 1);
}
if (\t3lib_div::_POST('_previewLink')) {
$ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
$ttlHours = $ttlHours ? $ttlHours : 24 * 2;
if (\t3lib_div::_POST('_previewLink_wholeWorkspace')) {
- $previewUrl = (((\t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($this->id);
+ $previewUrl = \t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=' . \t3lib_BEfunc::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($this->id);
} else {
- $params = (('id=' . $this->id) . '&ADMCMD_previewWS=') . $GLOBALS['BE_USER']->workspace;
- $previewUrl = (\t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours);
+ $params = 'id=' . $this->id . '&ADMCMD_previewWS=' . $GLOBALS['BE_USER']->workspace;
+ $previewUrl = \t3lib_BEfunc::getViewDomain($this->id) . '/index.php?ADMCMD_prev=' . \t3lib_BEfunc::compilePreviewKeyword($params, $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours);
}
- $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), ((((sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="') . htmlspecialchars($previewUrl)) . '">') . $previewUrl) . '</a>', 0, 1);
+ $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('previewUrl'), sprintf($GLOBALS['LANG']->getLL('previewInstruction'), $ttlHours) . '<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>', 0, 1);
}
// Output overview content:
$this->content .= $this->doc->spacer(15);
$menu .= \t3lib_BEfunc::getFuncMenu($this->id, 'SET[filter]', $this->MOD_SETTINGS['filter'], $this->MOD_MENU['filter']);
$menu .= \t3lib_BEfunc::getFuncMenu($this->id, 'SET[display]', $this->MOD_SETTINGS['display'], $this->MOD_MENU['display']);
}
- if ((!$this->details && $GLOBALS['BE_USER']->workspace) && !$this->diffOnly) {
- $menu .= ((\t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">') . $GLOBALS['LANG']->getLL('showDiffView')) . '</label>';
+ if (!$this->details && $GLOBALS['BE_USER']->workspace && !$this->diffOnly) {
+ $menu .= \t3lib_BEfunc::getFuncCheck($this->id, 'SET[diff]', $this->MOD_SETTINGS['diff'], '', '', 'id="checkDiff"') . ' <label for="checkDiff">' . $GLOBALS['LANG']->getLL('showDiffView') . '</label>';
}
if ($menu) {
return $menu;
// Make header of overview:
$tableRows = array();
if (count($pArray)) {
- $tableRows[] = ((((((('
+ $tableRows[] = '
<tr class="bgColor5 tableheader">
- ' . ($this->diffOnly ? '' : ('<td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('liveVersion')) . '</td>')) . '
- <td nowrap="nowrap" colspan="2">') . $GLOBALS['LANG']->getLL('wsVersions')) . '</td>
- <td nowrap="nowrap"') . ($this->diffOnly ? ' colspan="2"' : ' colspan="4"')) . '>') . $GLOBALS['LANG']->getLL('controls')) . '</td>
+ ' . ($this->diffOnly ? '' : '<td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('liveVersion') . '</td>') . '
+ <td nowrap="nowrap" colspan="2">' . $GLOBALS['LANG']->getLL('wsVersions') . '</td>
+ <td nowrap="nowrap"' . ($this->diffOnly ? ' colspan="2"' : ' colspan="4"') . '>' . $GLOBALS['LANG']->getLL('controls') . '</td>
</tr>';
// Add lines from overview:
$tableRows = array_merge($tableRows, $this->displayWorkspaceOverview_list($pArray));
- $table = ('<table border="0" cellpadding="0" cellspacing="1" class="lrPadding workspace-overview">' . implode('', $tableRows)) . '</table>';
+ $table = '<table border="0" cellpadding="0" cellspacing="1" class="lrPadding workspace-overview">' . implode('', $tableRows) . '</table>';
} else {
$table = '';
}
$returnUrl = \t3lib_div::sanitizeLocalUrl(\t3lib_div::_GP('returnUrl'));
- $linkBack = \t3lib_div::_GP('returnUrl') ? (((('<a href="' . htmlspecialchars($returnUrl)) . '" class="typo3-goBack">') . \t3lib_iconWorks::getSpriteIcon('actions-view-go-back')) . $GLOBALS['LANG']->getLL('goBack', TRUE)) . '</a><br /><br />' : '';
- $resetDiffOnly = $this->diffOnly ? ((('<a href="index.php?id=' . intval($this->id)) . '" class="typo3-goBack">') . $GLOBALS['LANG']->getLL('showAllInformation')) . '</a><br /><br />' : '';
+ $linkBack = \t3lib_div::_GP('returnUrl') ? '<a href="' . htmlspecialchars($returnUrl) . '" class="typo3-goBack">' . \t3lib_iconWorks::getSpriteIcon('actions-view-go-back') . $GLOBALS['LANG']->getLL('goBack', TRUE) . '</a><br /><br />' : '';
+ $resetDiffOnly = $this->diffOnly ? '<a href="index.php?id=' . intval($this->id) . '" class="typo3-goBack">' . $GLOBALS['LANG']->getLL('showAllInformation') . '</a><br /><br />' : '';
$versionSelector = $GLOBALS['BE_USER']->workspace ? $this->doc->getVersionSelector($this->id) : '';
- return ((($versionSelector . $linkBack) . $resetDiffOnly) . $table) . $this->markupNewOriginals();
+ return $versionSelector . $linkBack . $resetDiffOnly . $table . $this->markupNewOriginals();
}
/**
// Online version display:
// Create the main cells which will span over the number of versions there is.
$verLinkUrl = $GLOBALS['TCA'][$table]['ctrl']['versioningWS'];
- $origElement = (($icon . ($verLinkUrl ? ('<a href="' . htmlspecialchars(((('index.php?table=' . $table) . '&uid=') . $rec_on['uid']))) . '">' : '')) . \t3lib_BEfunc::getRecordTitle($table, $rec_on, TRUE)) . ($verLinkUrl ? '</a>' : '');
- $mainCell_rowSpan = count($recs) > 1 ? (' rowspan="' . count($recs)) . '"' : '';
- $mainCell = (((((((('
- <td align="center"' . $mainCell_rowSpan) . '>') . $this->formatVerId($rec_on['t3ver_id'])) . '</td>
- <td nowrap="nowrap"') . $mainCell_rowSpan) . '>') . $origElement) . '###SUB_ELEMENTS###') . '</td>';
+ $origElement = $icon . ($verLinkUrl ? '<a href="' . htmlspecialchars(('index.php?table=' . $table . '&uid=' . $rec_on['uid'])) . '">' : '') . \t3lib_BEfunc::getRecordTitle($table, $rec_on, TRUE) . ($verLinkUrl ? '</a>' : '');
+ $mainCell_rowSpan = count($recs) > 1 ? ' rowspan="' . count($recs) . '"' : '';
+ $mainCell = '
+ <td align="center"' . $mainCell_rowSpan . '>' . $this->formatVerId($rec_on['t3ver_id']) . '</td>
+ <td nowrap="nowrap"' . $mainCell_rowSpan . '>' . $origElement . '###SUB_ELEMENTS###' . '</td>';
// Offline versions display:
// Traverse the versions of the element
foreach ($recs as $rec) {
$vType = 'element';
// Get icon
$icon = \t3lib_iconWorks::getSpriteIconForRecord($table, $rec_off, array('title' => \t3lib_BEfunc::getRecordIconAltText($rec_off, $table)));
- $tempUid = ($table != 'pages' || $vType === 'branch') || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
- $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 1, '', ('+edit,' . ($table == 'pages' ? 'view,info,' : '')) . 'delete');
+ $tempUid = $table != 'pages' || $vType === 'branch' || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
+ $icon = $this->doc->wrapClickMenuOnIcon($icon, $table, $tempUid, 1, '', '+edit,' . ($table == 'pages' ? 'view,info,' : '') . 'delete');
// Prepare diff-code:
if ($this->MOD_SETTINGS['diff'] || $this->diffOnly) {
$diffCode = '';
list($diffHTML, $diffPct) = $this->createDiffView($table, $rec_off, $rec_on);
if ($rec_on['t3ver_state'] == 1) {
// New record:
- $diffCode .= ($this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement')) . '<br />';
+ $diffCode .= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('newElement') . '<br />';
$diffCode .= $diffHTML;
} elseif ($rec_off['t3ver_state'] == 2) {
- $diffCode .= ($this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement')) . '<br />';
+ $diffCode .= $this->doc->icons(2) . $GLOBALS['LANG']->getLL('deletedElement') . '<br />';
} elseif ($rec_on['t3ver_state'] == 3) {
- $diffCode .= ($this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder')) . '<br />';
+ $diffCode .= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPlaceholder') . '<br />';
} elseif ($rec_off['t3ver_state'] == 4) {
- $diffCode .= ($this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer')) . '<br />';
+ $diffCode .= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('moveToPointer') . '<br />';
} else {
- $diffCode .= $diffPct < 0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? ($diffPct . '% ') . $GLOBALS['LANG']->getLL('change') : '');
+ $diffCode .= $diffPct < 0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : '');
$diffCode .= $diffHTML;
}
} else {
$mainCell = str_replace('###SUB_ELEMENTS###', $subElements['on'], $mainCell);
// Create version element:
$versionsInOtherWS = $this->versionsInOtherWS($table, $rec_on['uid']);
- $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace !== 0 ? (('<br />' . $this->doc->icons(2)) . $GLOBALS['LANG']->getLL('otherVersions')) . $versionsInOtherWS : '';
- $multipleWarning = !$mainCell && $GLOBALS['BE_USER']->workspace !== 0 ? ((('<br />' . $this->doc->icons(3)) . '<strong>') . $GLOBALS['LANG']->getLL('multipleVersions')) . '</strong>' : '';
- $verWarning = $warnAboutVersions || $warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'] ? ((('<br />' . $this->doc->icons(3)) . '<strong>') . $GLOBALS['LANG']->getLL('versionInVersion')) . '</strong>' : '';
- $verElement = ((((($icon . (!$this->details ? ('<a href="' . htmlspecialchars(((((((($this->doc->backPath . \t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . ($table === 'pages' ? $rec_on['uid'] : $rec_on['pid'])) . '&details=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">' : '')) . \t3lib_BEfunc::getRecordTitle($table, $rec_off, TRUE)) . (!$this->details ? '</a>' : '')) . $versionsInOtherWSWarning) . $multipleWarning) . $verWarning;
- $ctrlTable = ((((((('
- <td nowrap="nowrap">' . $this->showStageChangeLog($table, $rec_off['uid'], $this->displayWorkspaceOverview_stageCmd($table, $rec_off))) . '</td>
- <td nowrap="nowrap" class="') . $swapClass) . '">') . $this->displayWorkspaceOverview_commandLinks($table, $rec_on, $rec_off, $vType)) . htmlspecialchars($swapLabel)) . ' </td>
- ') . (!$this->diffOnly ? (((('<td nowrap="nowrap"><strong>' . $GLOBALS['LANG']->getLL('lifecycle')) . ':</strong> ') . htmlspecialchars($this->formatCount($rec_off['t3ver_count']))) . '</td>') . ($this->showWorkspaceCol ? ((('
- <td nowrap="nowrap"> <strong>' . $GLOBALS['LANG']->getLL('workspace')) . ':</strong> ') . htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid']))) . '</td>' : '') : '');
+ $versionsInOtherWSWarning = $versionsInOtherWS && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(2) . $GLOBALS['LANG']->getLL('otherVersions') . $versionsInOtherWS : '';
+ $multipleWarning = !$mainCell && $GLOBALS['BE_USER']->workspace !== 0 ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('multipleVersions') . '</strong>' : '';
+ $verWarning = $warnAboutVersions || $warnAboutVersions_nonPages && $GLOBALS['TCA'][$table]['ctrl']['versioning_followPages'] ? '<br />' . $this->doc->icons(3) . '<strong>' . $GLOBALS['LANG']->getLL('versionInVersion') . '</strong>' : '';
+ $verElement = $icon . (!$this->details ? '<a href="' . htmlspecialchars(($this->doc->backPath . \t3lib_extMgm::extRelPath('version') . 'cm1/index.php?id=' . ($table === 'pages' ? $rec_on['uid'] : $rec_on['pid']) . '&details=' . rawurlencode(($table . ':' . $rec_off['uid'])) . '&returnUrl=' . rawurlencode($this->REQUEST_URI))) . '">' : '') . \t3lib_BEfunc::getRecordTitle($table, $rec_off, TRUE) . (!$this->details ? '</a>' : '') . $versionsInOtherWSWarning . $multipleWarning . $verWarning;
+ $ctrlTable = '
+ <td nowrap="nowrap">' . $this->showStageChangeLog($table, $rec_off['uid'], $this->displayWorkspaceOverview_stageCmd($table, $rec_off)) . '</td>
+ <td nowrap="nowrap" class="' . $swapClass . '">' . $this->displayWorkspaceOverview_commandLinks($table, $rec_on, $rec_off, $vType) . htmlspecialchars($swapLabel) . ' </td>
+ ' . (!$this->diffOnly ? '<td nowrap="nowrap"><strong>' . $GLOBALS['LANG']->getLL('lifecycle') . ':</strong> ' . htmlspecialchars($this->formatCount($rec_off['t3ver_count'])) . '</td>' . ($this->showWorkspaceCol ? '
+ <td nowrap="nowrap"> <strong>' . $GLOBALS['LANG']->getLL('workspace') . ':</strong> ' . htmlspecialchars($this->formatWorkspace($rec_off['t3ver_wsid'])) . '</td>' : '') : '');
if ($diffCode) {
- $verElement = (((($verElement . '
- <br /><strong>') . $GLOBALS['LANG']->getLL('diffToLiveElement')) . '</strong>
+ $verElement = $verElement . '
+ <br /><strong>' . $GLOBALS['LANG']->getLL('diffToLiveElement') . '</strong>
<table border="0" cellpadding="0" cellspacing="0" class="ver-verElement">
<tr>
- <td class="c-diffCell">') . $diffCode) . '</td>
+ <td class="c-diffCell">' . $diffCode . '</td>
</tr>
</table>';
}
// Create version cell:
- $verCell = (((('
- <td align="center">' . $this->formatVerId($rec_off['t3ver_id'])) . '</td>
- <td nowrap="nowrap">') . $verElement) . $subElements['off']) . '</td>
+ $verCell = '
+ <td align="center">' . $this->formatVerId($rec_off['t3ver_id']) . '</td>
+ <td nowrap="nowrap">' . $verElement . $subElements['off'] . '</td>
';
// Compile table row:
- $tableRows[] = ((('
+ $tableRows[] = '
<tr class="bgColor4">
- ' . ($this->diffOnly ? '' : $mainCell)) . $verCell) . $ctrlTable) . '
+ ' . ($this->diffOnly ? '' : $mainCell) . $verCell . $ctrlTable . '
</tr>';
// Reset the main cell:
$mainCell = '';
* @todo Define visibility
*/
public function displayWorkspaceOverview_setInPageArray(&$pArray, $table, $row) {
- if (!$this->details || $this->details == ($table . ':') . $row['uid']) {
+ if (!$this->details || $this->details == $table . ':' . $row['uid']) {
$pArray[$table][$row['t3ver_oid']][] = $row;
}
}
if ($sId > 0) {
$issueCmd = '';
$itemCount = 0;
- if (($table && $uid) && $this->recIndex[$table][$uid]) {
- $issueCmd .= ((('&cmd[' . $table) . '][') . $uid) . '][version][action]=setStage';
- $issueCmd .= (((('&cmd[' . $table) . '][') . $uid) . '][version][stageId]=') . $this->recIndex[$table][$uid];
+ if ($table && $uid && $this->recIndex[$table][$uid]) {
+ $issueCmd .= '&cmd[' . $table . '][' . $uid . '][version][action]=setStage';
+ $issueCmd .= '&cmd[' . $table . '][' . $uid . '][version][stageId]=' . $this->recIndex[$table][$uid];
} else {
foreach ($this->stageIndex[$sId] as $table => $uidArray) {
- $issueCmd .= ((('&cmd[' . $table) . '][') . implode(',', $uidArray)) . '][version][action]=setStage';
- $issueCmd .= (((('&cmd[' . $table) . '][') . implode(',', $uidArray)) . '][version][stageId]=') . $sId;
+ $issueCmd .= '&cmd[' . $table . '][' . implode(',', $uidArray) . '][version][action]=setStage';
+ $issueCmd .= '&cmd[' . $table . '][' . implode(',', $uidArray) . '][version][stageId]=' . $sId;
$itemCount += count($uidArray);
}
}
- $onClick = ((('var commentTxt=window.prompt("' . sprintf($label, $itemCount)) . '","");
- if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand($issueCmd, $this->REQUEST_URI)) . '&generalComment="+escape(commentTxt);}';
+ $onClick = 'var commentTxt=window.prompt("' . sprintf($label, $itemCount) . '","");
+ if (commentTxt!=null) {window.location.href="' . $this->doc->issueCommand($issueCmd, $this->REQUEST_URI) . '&generalComment="+escape(commentTxt);}';
if (\t3lib_div::_GP('sendToReview')) {
- $onClick .= (' else {window.location.href = "' . $this->REQUEST_URI) . '"}';
+ $onClick .= ' else {window.location.href = "' . $this->REQUEST_URI . '"}';
$actionLinks .= $this->doc->wrapScriptTags($onClick);
} else {
$onClick .= ' return false;';
- $actionLinks .= ((('<input type="submit" name="_" value="' . htmlspecialchars($titleAttrib)) . '" onclick="') . htmlspecialchars($onClick)) . '" />';
+ $actionLinks .= '<input type="submit" name="_" value="' . htmlspecialchars($titleAttrib) . '" onclick="' . htmlspecialchars($onClick) . '" />';
}
} elseif (\t3lib_div::_GP('sendToReview')) {
- $onClick = ('window.location.href = "' . $this->REQUEST_URI) . '";';
+ $onClick = 'window.location.href = "' . $this->REQUEST_URI . '";';
$actionLinks .= $this->doc->wrapScriptTags($onClick);
} else {
$actionLinks = '';
// Does not output anything for ONLINE because it might confuse people to think that the elemnet IS online which is not the case - only that it exists as an offline version in the online workspace...
break;
default:
- $titleRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('title', 'sys_workspace', ('uid=' . intval($wsid)) . \t3lib_BEfunc::deleteClause('sys_workspace'));
- $this->formatWorkspace_cache[$wsid] = (('[' . $wsid) . '] ') . $titleRec['title'];
+ $titleRec = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('title', 'sys_workspace', 'uid=' . intval($wsid) . \t3lib_BEfunc::deleteClause('sys_workspace'));
+ $this->formatWorkspace_cache[$wsid] = '[' . $wsid . '] ' . $titleRec['title'];
break;
}
}
public function versionsInOtherWS($table, $uid) {
// Check for duplicates:
// Select all versions of record NOT in this workspace:
- $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('t3ver_wsid', $table, (((('pid=-1
- AND t3ver_oid=' . intval($uid)) . '
- AND t3ver_wsid!=') . intval($GLOBALS['BE_USER']->workspace)) . '
- AND (t3ver_wsid=-1 OR t3ver_wsid>0)') . \t3lib_BEfunc::deleteClause($table), '', 't3ver_wsid', '', 't3ver_wsid');
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('t3ver_wsid', $table, 'pid=-1
+ AND t3ver_oid=' . intval($uid) . '
+ AND t3ver_wsid!=' . intval($GLOBALS['BE_USER']->workspace) . '
+ AND (t3ver_wsid=-1 OR t3ver_wsid>0)' . \t3lib_BEfunc::deleteClause($table), '', 't3ver_wsid', '', 't3ver_wsid');
if (count($rows)) {
return implode(',', array_keys($rows));
}
* @todo Define visibility
*/
public function showStageChangeLog($table, $id, $stageCommands) {
- $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('log_data,tstamp,userid', 'sys_log', (('action=6 and details_nr=30
- AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_log')) . '
- AND recuid=') . intval($id));
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('log_data,tstamp,userid', 'sys_log', 'action=6 and details_nr=30
+ AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_log') . '
+ AND recuid=' . intval($id));
$entry = array();
foreach ($rows as $dat) {
$data = unserialize($dat['log_data']);
- $username = $this->be_user_Array[$dat['userid']] ? $this->be_user_Array[$dat['userid']]['username'] : ('[' . $dat['userid']) . ']';
+ $username = $this->be_user_Array[$dat['userid']] ? $this->be_user_Array[$dat['userid']]['username'] : '[' . $dat['userid'] . ']';
switch ($data['stage']) {
case 1:
$text = $GLOBALS['LANG']->getLL('stage.sentToReview');
$text = $GLOBALS['LANG']->getLL('stage.undefined');
break;
}
- $text = (((\t3lib_BEfunc::dateTime($dat['tstamp']) . ': "') . $username) . '" ') . $text;
- $text .= $data['comment'] ? ((('<br />' . $GLOBALS['LANG']->getLL('userComment')) . ': <em>') . htmlspecialchars($data['comment'])) . '</em>' : '';
+ $text = \t3lib_BEfunc::dateTime($dat['tstamp']) . ': "' . $username . '" ' . $text;
+ $text .= $data['comment'] ? '<br />' . $GLOBALS['LANG']->getLL('userComment') . ': <em>' . htmlspecialchars($data['comment']) . '</em>' : '';
$entry[] = $text;
}
- return count($entry) ? ((((((((((((((('<span onmouseover="document.getElementById(\'log_' . $table) . $id) . '\').style.visibility = \'visible\';" onmouseout="document.getElementById(\'log_') . $table) . $id) . '\').style.visibility = \'hidden\';">') . $stageCommands) . ' (') . count($entry)) . ')</span>') . '<div class="t3-version-infolayer logLayer" id="log_') . $table) . $id) . '">') . implode('<hr/>', array_reverse($entry))) . '</div>' : $stageCommands;
+ return count($entry) ? '<span onmouseover="document.getElementById(\'log_' . $table . $id . '\').style.visibility = \'visible\';" onmouseout="document.getElementById(\'log_' . $table . $id . '\').style.visibility = \'hidden\';">' . $stageCommands . ' (' . count($entry) . ')</span>' . '<div class="t3-version-infolayer logLayer" id="log_' . $table . $id . '">' . implode('<hr/>', array_reverse($entry)) . '</div>' : $stageCommands;
}
/**
public function subElements($uid, $treeLevel, $origId = 0) {
// In online workspace we have a reduced view because otherwise it will bloat the listing:
if (!$this->details && ($GLOBALS['BE_USER']->workspace === 0 || !$this->MOD_SETTINGS['expandSubElements'])) {
- return (('<br />
- <img' . \t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"')) . ' align="top" alt="" title="" />') . ($origId ? (((('<a href="' . htmlspecialchars(((((((($this->doc->backPath . \t3lib_extMgm::extRelPath('version')) . 'cm1/index.php?id=') . $uid) . '&details=') . rawurlencode(('pages:' . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '">') . '<span class="typo3-dimmed"><em>') . $GLOBALS['LANG']->getLL('subElementsClick')) . '</em><span></a>' : ('<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElements')) . '</em><span>');
+ return '<br />
+ <img' . \t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/ol/joinbottom.gif', 'width="18" height="16"') . ' align="top" alt="" title="" />' . ($origId ? '<a href="' . htmlspecialchars(($this->doc->backPath . \t3lib_extMgm::extRelPath('version') . 'cm1/index.php?id=' . $uid . '&details=' . rawurlencode(('pages:' . $uid)) . '&returnUrl=' . rawurlencode($this->REQUEST_URI))) . '">' . '<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElementsClick') . '</em><span></a>' : '<span class="typo3-dimmed"><em>' . $GLOBALS['LANG']->getLL('subElements') . '</em><span>');
} else {
// For an offline workspace, show sub elements:
$tCell = array();
}
}
}
- return ('
+ return '
<!-- Sub-element tree for versions -->
<table border="0" cellpadding="0" cellspacing="1" class="ver-subtree">
- ' . implode('', $tCell)) . '
+ ' . implode('', $tCell) . '
</table>';
}
}
* @todo Define visibility
*/
public function subElements_getNonPageRecords($tN, $uid, &$recList) {
- $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $tN, (('pid=' . intval($uid)) . ($GLOBALS['TCA'][$tN]['ctrl']['versioningWS'] ? ' AND t3ver_state=0' : '')) . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA'][$tN]['ctrl']['default_sortby']));
+ $records = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', $tN, 'pid=' . intval($uid) . ($GLOBALS['TCA'][$tN]['ctrl']['versioningWS'] ? ' AND t3ver_state=0' : '') . \t3lib_BEfunc::deleteClause($tN), '', $GLOBALS['TCA'][$tN]['ctrl']['sortby'] ? $GLOBALS['TCA'][$tN]['ctrl']['sortby'] : $GLOBALS['TYPO3_DB']->stripOrderBy($GLOBALS['TCA'][$tN]['ctrl']['default_sortby']));
foreach ($records as $rec) {
$recList[] = array($tN, $rec);
}
// If there is a field for this table with original uids we will use that to connect records:
if (!$origId) {
// In case we are displaying the online originals:
- $this->targets[(((('orig_' . $uid) . '_') . $tN) . '_') . $rec['uid']] = $rec;
+ $this->targets['orig_' . $uid . '_' . $tN . '_' . $rec['uid']] = $rec;
// Build up target array (important that
- $tdParams = (((((' id="orig_' . $uid) . '_') . $tN) . '_') . $rec['uid']) . '" class="typo3-ver"';
+ $tdParams = ' id="orig_' . $uid . '_' . $tN . '_' . $rec['uid'] . '" class="typo3-ver"';
} else {
// Version branch:
- if ($this->targets[(((('orig_' . $origId) . '_') . $tN) . '_') . $rec[$origUidFields]]) {
+ if ($this->targets['orig_' . $origId . '_' . $tN . '_' . $rec[$origUidFields]]) {
// If there IS a corresponding original record...:
// Prepare Table row parameters:
- $tdParams = (((((((((((((((((((((((((((((((((((' onmouseover="hlSubelements(\'' . $origId) . '_') . $tN) . '_') . $rec[$origUidFields]) . '\', \'') . $uid) . '_') . $tN) . '_') . $rec[$origUidFields]) . '\', 1, ') . ($this->MOD_SETTINGS['diff'] == 2 ? 1 : 0)) . ');"') . ' onmouseout="hlSubelements(\'') . $origId) . '_') . $tN) . '_') . $rec[$origUidFields]) . '\', \'') . $uid) . '_') . $tN) . '_') . $rec[$origUidFields]) . '\', 0, ') . ($this->MOD_SETTINGS['diff'] == 2 ? 1 : 0)) . ');"') . ' id="ver_') . $uid) . '_') . $tN) . '_') . $rec[$origUidFields]) . '" class="typo3-ver"';
+ $tdParams = ' onmouseover="hlSubelements(\'' . $origId . '_' . $tN . '_' . $rec[$origUidFields] . '\', \'' . $uid . '_' . $tN . '_' . $rec[$origUidFields] . '\', 1, ' . ($this->MOD_SETTINGS['diff'] == 2 ? 1 : 0) . ');"' . ' onmouseout="hlSubelements(\'' . $origId . '_' . $tN . '_' . $rec[$origUidFields] . '\', \'' . $uid . '_' . $tN . '_' . $rec[$origUidFields] . '\', 0, ' . ($this->MOD_SETTINGS['diff'] == 2 ? 1 : 0) . ');"' . ' id="ver_' . $uid . '_' . $tN . '_' . $rec[$origUidFields] . '" class="typo3-ver"';
// Create diff view:
if ($this->MOD_SETTINGS['diff']) {
- list($diffHTML, $diffPct) = $this->createDiffView($tN, $rec, $this->targets[(((('orig_' . $origId) . '_') . $tN) . '_') . $rec[$origUidFields]]);
+ list($diffHTML, $diffPct) = $this->createDiffView($tN, $rec, $this->targets['orig_' . $origId . '_' . $tN . '_' . $rec[$origUidFields]]);
if ($this->MOD_SETTINGS['diff'] == 2) {
- $diffCode = ((((((((($diffPct ? ('<span class="nobr">' . $diffPct) . '% change</span>' : '-') . '<div style="visibility: hidden; position: absolute;" id="diff_') . $uid) . '_') . $tN) . '_') . $rec[$origUidFields]) . '" class="diffLayer">') . $diffHTML) . '</div>';
+ $diffCode = ($diffPct ? '<span class="nobr">' . $diffPct . '% change</span>' : '-') . '<div style="visibility: hidden; position: absolute;" id="diff_' . $uid . '_' . $tN . '_' . $rec[$origUidFields] . '" class="diffLayer">' . $diffHTML . '</div>';
} else {
- $diffCode = ($diffPct < 0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? ($diffPct . '% ') . $GLOBALS['LANG']->getLL('change') : '')) . $diffHTML;
+ $diffCode = ($diffPct < 0 ? $GLOBALS['LANG']->getLL('notAvailable') : ($diffPct ? $diffPct . '% ' . $GLOBALS['LANG']->getLL('change') : '')) . $diffHTML;
}
}
// Unsetting the target fields allows us to mark all originals without a version in the subtree (see ->markupNewOriginals())
- unset($this->targets[(((('orig_' . $origId) . '_') . $tN) . '_') . $rec[$origUidFields]]);
+ unset($this->targets['orig_' . $origId . '_' . $tN . '_' . $rec[$origUidFields]]);
} else {
// No original record, so must be new:
$tdParams = ' class="typo3-ver-new"';
$tdParams = ' class="typo3-ver-noComp"';
}
// Compile the cell:
- $tCell[] = ((((((((('
- <tr' . $tdParams) . '>
- <td class="iconTitle">') . $HTMLdata) . ($iconMode < 2 ? (('<img' . \t3lib_iconWorks::skinImg($this->doc->backPath, (('gfx/ol/join' . ($iconMode ? 'bottom' : '')) . '.gif'), 'width="18" height="16"')) . ' alt="" />') . \t3lib_iconWorks::getSpriteIconForRecord($tN, $rec) : '')) . \t3lib_BEfunc::getRecordTitle($tN, $rec, TRUE)) . '</td>
- <td class="cmdCell">') . $this->displayWorkspaceOverview_commandLinksSub($tN, $rec, $origId)) . '</td>') . ($origId ? ('<td class="diffCell">' . $diffCode) . '</td>' : '')) . '
+ $tCell[] = '
+ <tr' . $tdParams . '>
+ <td class="iconTitle">' . $HTMLdata . ($iconMode < 2 ? '<img' . \t3lib_iconWorks::skinImg($this->doc->backPath, ('gfx/ol/join' . ($iconMode ? 'bottom' : '') . '.gif'), 'width="18" height="16"') . ' alt="" />' . \t3lib_iconWorks::getSpriteIconForRecord($tN, $rec) : '') . \t3lib_BEfunc::getRecordTitle($tN, $rec, TRUE) . '</td>
+ <td class="cmdCell">' . $this->displayWorkspaceOverview_commandLinksSub($tN, $rec, $origId) . '</td>' . ($origId ? '<td class="diffCell">' . $diffCode . '</td>' : '') . '
</tr>';
}
if (count($this->targets)) {
$scriptCode = '';
foreach ($this->targets as $key => $rec) {
- $scriptCode .= ('
- document.getElementById(\'' . $key) . '\').attributes.getNamedItem("class").nodeValue = \'typo3-ver-new\';
+ $scriptCode .= '
+ document.getElementById(\'' . $key . '\').attributes.getNamedItem("class").nodeValue = \'typo3-ver-new\';
';
}
return $this->doc->wrapScriptTags($scriptCode);
$t3lib_diff_Obj = \t3lib_div::makeInstance('TYPO3\\CMS\\Core\\Utility\\DiffUtility');
// Add header row:
$tRows = array();
- $tRows[] = ((('
+ $tRows[] = '
<tr class="bgColor5 tableheader">
- <td>' . $GLOBALS['LANG']->getLL('fieldname')) . ':</td>
- <td width="98%" nowrap="nowrap">') . $GLOBALS['LANG']->getLL('coloredDiffView')) . ':</td>
+ <td>' . $GLOBALS['LANG']->getLL('fieldname') . ':</td>
+ <td width="98%" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('coloredDiffView') . ':</td>
</tr>
';
// Initialize variables to pick up string lengths in:
$diffStrLen = 0;
// Traversing the first record and process all fields which are editable:
foreach ($diff_1_record as $fN => $fV) {
- if (($GLOBALS['TCA'][$table]['columns'][$fN] && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] !== 'passthrough') && !\t3lib_div::inList('t3ver_label', $fN)) {
+ if ($GLOBALS['TCA'][$table]['columns'][$fN] && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] !== 'passthrough' && !\t3lib_div::inList('t3ver_label', $fN)) {
// Check if it is files:
$isFiles = FALSE;
- if ((strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN])) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] === 'group') && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['internal_type'] === 'file') {
+ if (strcmp(trim($diff_1_record[$fN]), trim($diff_2_record[$fN])) && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['type'] === 'group' && $GLOBALS['TCA'][$table]['columns'][$fN]['config']['internal_type'] === 'file') {
// Initialize:
$uploadFolder = $GLOBALS['TCA'][$table]['columns'][$fN]['config']['uploadfolder'];
$files1 = array_flip(\t3lib_div::trimExplode(',', $diff_1_record[$fN], 1));
$files2 = array_flip(\t3lib_div::trimExplode(',', $diff_2_record[$fN], 1));
// Traverse filenames and read their md5 sum:
foreach ($files1 as $filename => $tmp) {
- $files1[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(\t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
+ $files1[$filename] = @is_file((PATH_site . $uploadFolder . '/' . $filename)) ? md5(\t3lib_div::getUrl(PATH_site . $uploadFolder . '/' . $filename)) : $filename;
}
foreach ($files2 as $filename => $tmp) {
- $files2[$filename] = @is_file((((PATH_site . $uploadFolder) . '/') . $filename)) ? md5(\t3lib_div::getUrl(((PATH_site . $uploadFolder) . '/') . $filename)) : $filename;
+ $files2[$filename] = @is_file((PATH_site . $uploadFolder . '/' . $filename)) ? md5(\t3lib_div::getUrl(PATH_site . $uploadFolder . '/' . $filename)) : $filename;
}
// Implode MD5 sums and set flag:
$diff_1_record[$fN] = implode(' ', $files1);
}
}
// Add table row with result:
- $tRows[] = ((('
+ $tRows[] = '
<tr class="bgColor4">
- <td>' . htmlspecialchars($GLOBALS['LANG']->sL(\t3lib_BEfunc::getItemLabel($table, $fN)))) . '</td>
- <td width="98%">') . $diffres) . '</td>
+ <td>' . htmlspecialchars($GLOBALS['LANG']->sL(\t3lib_BEfunc::getItemLabel($table, $fN))) . '</td>
+ <td width="98%">' . $diffres . '</td>
</tr>
';
} else {
}
}
// Calculate final change percentage:
- $pctChange = $allStrLen ? ceil(($diffStrLen * 100) / $allStrLen) : -1;
+ $pctChange = $allStrLen ? ceil($diffStrLen * 100 / $allStrLen) : -1;
// Create visual representation of result:
if (count($tRows) > 1) {
- $content .= ('<table border="0" cellpadding="1" cellspacing="1" class="diffTable">' . implode('', $tRows)) . '</table>';
+ $content .= '<table border="0" cellpadding="1" cellspacing="1" class="diffTable">' . implode('', $tRows) . '</table>';
} else {
- $content .= (('<span class="nobr">' . $this->doc->icons(1)) . $GLOBALS['LANG']->getLL('completeMatch')) . '</span>';
+ $content .= '<span class="nobr">' . $this->doc->icons(1) . $GLOBALS['LANG']->getLL('completeMatch') . '</span>';
}
} else {
$content .= $this->doc->icons(3) . $GLOBALS['LANG']->getLL('errorRecordsNotFound');
}
$raiseOk = !$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table, $rec_off);
if ($raiseOk && $rec_off['t3ver_stage'] != -1) {
- $onClick = (((((((('var commentTxt=window.prompt("' . $GLOBALS['LANG']->getLL('rejectExplain')) . '","");
- if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand(((((((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=setStage') . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][stageId]=-1'))) . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][comment]="+escape(commentTxt);}') . ' return false;';
+ $onClick = 'var commentTxt=window.prompt("' . $GLOBALS['LANG']->getLL('rejectExplain') . '","");
+ if (commentTxt!=null) {window.location.href="' . $this->doc->issueCommand(('&cmd[' . $table . '][' . $rec_off['uid'] . '][version][action]=setStage' . '&cmd[' . $table . '][' . $rec_off['uid'] . '][version][stageId]=-1')) . '&cmd[' . $table . '][' . $rec_off['uid'] . '][version][comment]="+escape(commentTxt);}' . ' return false;';
// Reject:
- $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . $GLOBALS['LANG']->getLL('reject', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-move-down')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . $GLOBALS['LANG']->getLL('reject', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-move-down') . '</a>';
} else {
// Reject:
- $actionLinks .= ('<img src="' . $this->doc->backPath) . 'gfx/clear.gif" width="14" height="14" alt="" align="top" title="" />';
+ $actionLinks .= '<img src="' . $this->doc->backPath . 'gfx/clear.gif" width="14" height="14" alt="" align="top" title="" />';
}
- $actionLinks .= ((('<span style="background-color: ' . $color) . '; color: white;">') . $sLabel) . '</span>';
+ $actionLinks .= '<span style="background-color: ' . $color . '; color: white;">' . $sLabel . '</span>';
// Raise
if ($raiseOk) {
- $onClick = (((((((('var commentTxt=window.prompt("' . $label) . '","");
- if (commentTxt!=null) {window.location.href="') . $this->doc->issueCommand((((((((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=setStage') . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][stageId]=') . $sId))) . '&cmd[') . $table) . '][') . $rec_off['uid']) . '][version][comment]="+escape(commentTxt);}') . ' return false;';
+ $onClick = 'var commentTxt=window.prompt("' . $label . '","");
+ if (commentTxt!=null) {window.location.href="' . $this->doc->issueCommand(('&cmd[' . $table . '][' . $rec_off['uid'] . '][version][action]=setStage' . '&cmd[' . $table . '][' . $rec_off['uid'] . '][version][stageId]=' . $sId)) . '&cmd[' . $table . '][' . $rec_off['uid'] . '][version][comment]="+escape(commentTxt);}' . ' return false;';
if ($rec_off['t3ver_stage'] != 10) {
- $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars($onClick)) . '" title="') . htmlspecialchars($titleAttrib)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-move-up')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars($onClick) . '" title="' . htmlspecialchars($titleAttrib) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-move-up') . '</a>';
$this->stageIndex[$sId][$table][] = $rec_off['uid'];
$this->recIndex[$table][$rec_off['uid']] = $sId;
}
*/
public function displayWorkspaceOverview_commandLinks($table, &$rec_on, &$rec_off, $vType) {
if ($this->publishAccess && (!($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1) || (int) $rec_off['t3ver_stage'] === -10)) {
- $actionLinks = ((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid'])))) . '" title="') . $GLOBALS['LANG']->getLL('publish', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version')) . '</a>';
+ $actionLinks = '<a href="' . htmlspecialchars($this->doc->issueCommand(('&cmd[' . $table . '][' . $rec_on['uid'] . '][version][action]=swap' . '&cmd[' . $table . '][' . $rec_on['uid'] . '][version][swapWith]=' . $rec_off['uid']))) . '" title="' . $GLOBALS['LANG']->getLL('publish', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-version') . '</a>';
if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
- $actionLinks .= ((((('<a href="' . htmlspecialchars($this->doc->issueCommand(((((((((((((((('&cmd[' . $table) . '][') . $rec_on['uid']) . '][version][action]=swap') . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapWith]=') . $rec_off['uid']) . '&cmd[') . $table) . '][') . $rec_on['uid']) . '][version][swapIntoWS]=1')))) . '" title="') . $GLOBALS['LANG']->getLL('swap', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
+ $actionLinks .= '<a href="' . htmlspecialchars($this->doc->issueCommand(('&cmd[' . $table . '][' . $rec_on['uid'] . '][version][action]=swap' . '&cmd[' . $table . '][' . $rec_on['uid'] . '][version][swapWith]=' . $rec_off['uid'] . '&cmd[' . $table . '][' . $rec_on['uid'] . '][version][swapIntoWS]=1'))) . '" title="' . $GLOBALS['LANG']->getLL('swap', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-version-swap-workspace') . '</a>';
}
}
if (!$GLOBALS['BE_USER']->workspaceCannotEditOfflineVersion($table, $rec_off)) {
// Release
- $actionLinks .= ((((((('<a href="' . htmlspecialchars($this->doc->issueCommand((((('&cmd[' . $table) . '][') . $rec_off['uid']) . '][version][action]=clearWSID')))) . '" onclick="return confirm(\'') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '?\');" title="') . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-document-remove')) . '</a>';
+ $actionLinks .= '<a href="' . htmlspecialchars($this->doc->issueCommand(('&cmd[' . $table . '][' . $rec_off['uid'] . '][version][action]=clearWSID'))) . '" onclick="return confirm(\'' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '?\');" title="' . $GLOBALS['LANG']->getLL('removeFromWorkspace', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-version-document-remove') . '</a>';
// Edit
if ($table === 'pages' && $vType !== 'element') {
$tempUid = $vType === 'branch' || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
- $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $tempUid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-version-page-open')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="top.loadEditId(' . $tempUid . ');top.goToModule(\'' . $this->pageModule . '\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-version-page-open') . '</a>';
} else {
- $params = ((('&edit[' . $table) . '][') . $rec_off['uid']) . ']=edit';
- $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+ $params = '&edit[' . $table . '][' . $rec_off['uid'] . ']=edit';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
}
}
// History/Log
- $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $rec_off['uid']))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
+ $actionLinks .= '<a href="' . htmlspecialchars(($this->doc->backPath . 'show_rechis.php?element=' . rawurlencode(($table . ':' . $rec_off['uid'])) . '&returnUrl=' . rawurlencode($this->REQUEST_URI))) . '" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open') . '</a>';
// View
if ($table === 'pages') {
$tempUid = $vType === 'branch' || $GLOBALS['BE_USER']->workspace === 0 ? $rec_off['uid'] : $rec_on['uid'];
- $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($tempUid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($tempUid)))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($tempUid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($tempUid))) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
}
return $actionLinks;
}
if (!$GLOBALS['BE_USER']->workspaceCannotEditRecord($table, $rec)) {
// Edit
if ($table === 'pages') {
- $actionLinks .= ((((((('<a href="#" onclick="top.loadEditId(' . $uid) . ');top.goToModule(\'') . $this->pageModule) . '\'); return false;" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('apps-version-page-open')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="top.loadEditId(' . $uid . ');top.goToModule(\'' . $this->pageModule . '\'); return false;" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_page', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('apps-version-page-open') . '</a>';
} else {
- $params = ((('&edit[' . $table) . '][') . $uid) . ']=edit';
- $actionLinks .= ((((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath))) . '" title="') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-open')) . '</a>';
+ $params = '&edit[' . $table . '][' . $uid . ']=edit';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::editOnClick($params, $this->doc->backPath)) . '" title="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_user_ws.xml:img_title_edit_element', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-open') . '</a>';
}
}
// History/Log
- $actionLinks .= ((((('<a href="' . htmlspecialchars((((($this->doc->backPath . 'show_rechis.php?element=') . rawurlencode((($table . ':') . $uid))) . '&returnUrl=') . rawurlencode($this->REQUEST_URI)))) . '" title="') . $GLOBALS['LANG']->getLL('showLog', TRUE)) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open')) . '</a>';
+ $actionLinks .= '<a href="' . htmlspecialchars(($this->doc->backPath . 'show_rechis.php?element=' . rawurlencode(($table . ':' . $uid)) . '&returnUrl=' . rawurlencode($this->REQUEST_URI))) . '" title="' . $GLOBALS['LANG']->getLL('showLog', TRUE) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-history-open') . '</a>';
}
// View
if ($table === 'pages') {
- $actionLinks .= ((('<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($uid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($uid)))) . '">') . \t3lib_iconWorks::getSpriteIcon('actions-document-view')) . '</a>';
+ $actionLinks .= '<a href="#" onclick="' . htmlspecialchars(\t3lib_BEfunc::viewOnClick($uid, $this->doc->backPath, \t3lib_BEfunc::BEgetRootLine($uid))) . '">' . \t3lib_iconWorks::getSpriteIcon('actions-document-view') . '</a>';
}
return $actionLinks;
}
0 => $GLOBALS['LANG']->getLL('filter_all')
),
'display' => array(
- 0 => ('[' . $GLOBALS['LANG']->getLL('shortcut_onlineWS')) . ']',
+ 0 => '[' . $GLOBALS['LANG']->getLL('shortcut_onlineWS') . ']',
-98 => $GLOBALS['LANG']->getLL('label_offlineWSes'),
-99 => $GLOBALS['LANG']->getLL('label_allWSes')
),
);
// check if draft workspace was enabled, and if the user has access to it
if ($this->showDraftWorkspace === TRUE && $GLOBALS['BE_USER']->checkWorkspace(array('uid' => -1))) {
- $this->MOD_MENU['display'][-1] = ('[' . $GLOBALS['LANG']->getLL('shortcut_offlineWS')) . ']';
+ $this->MOD_MENU['display'][-1] = '[' . $GLOBALS['LANG']->getLL('shortcut_offlineWS') . ']';
}
// Add workspaces:
if ($GLOBALS['BE_USER']->workspace === 0) {
$workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,title,adminusers,members,reviewers', 'sys_workspace', 'pid = 0' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'), '', 'title');
foreach ($workspaces as $rec) {
if ($GLOBALS['BE_USER']->checkWorkspace($rec)) {
- $this->MOD_MENU['display'][$rec['uid']] = (('[' . $rec['uid']) . '] ') . htmlspecialchars($rec['title']);
+ $this->MOD_MENU['display'][$rec['uid']] = '[' . $rec['uid'] . '] ' . htmlspecialchars($rec['title']);
}
}
}
$changeWorkspace = \TYPO3\CMS\Core\Utility\GeneralUtility::_GET('changeWorkspace');
if ($changeWorkspace != '') {
$GLOBALS['BE_USER']->setWorkspace($changeWorkspace);
- $this->content .= $this->doc->wrapScriptTags((('top.location.href="' . $GLOBALS['BACK_PATH']) . \TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript()) . '";');
+ $this->content .= $this->doc->wrapScriptTags('top.location.href="' . $GLOBALS['BACK_PATH'] . \TYPO3\CMS\Backend\Utility\BackendUtility::getBackendScript() . '";');
} else {
// Starting page:
$this->content .= $this->doc->header($GLOBALS['LANG']->getLL('title'));
$newWkspUrl = 'workspaceforms.php?action=new';
// workspace creation link
if ($GLOBALS['BE_USER']->isAdmin() || 0 != ($GLOBALS['BE_USER']->groupData['workspace_perms'] & 4)) {
- $buttons['new_record'] = ((((((('<a href="' . $newWkspUrl) . '">') . '<img ') . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/add_workspaces.gif')) . ' alt="') . $GLOBALS['LANG']->getLL('img_title_create_new_workspace')) . '" id="ver-wl-new-workspace-icon" />') . '</a>';
+ $buttons['new_record'] = '<a href="' . $newWkspUrl . '">' . '<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/add_workspaces.gif') . ' alt="' . $GLOBALS['LANG']->getLL('img_title_create_new_workspace') . '" id="ver-wl-new-workspace-icon" />' . '</a>';
}
return $buttons;
}
}
$menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncMenu(0, 'SET[diff]', $this->MOD_SETTINGS['diff'], $this->MOD_MENU['diff']);
if ($GLOBALS['BE_USER']->workspace !== 0) {
- $menu .= ((\TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">') . $GLOBALS['LANG']->getLL('label_showsubelements')) . '</label> ';
+ $menu .= \TYPO3\CMS\Backend\Utility\BackendUtility::getFuncCheck(0, 'SET[expandSubElements]', $this->MOD_SETTINGS['expandSubElements'], '', '', 'id="checkExpandSubElements"') . ' <label for="checkExpandSubElements">' . $GLOBALS['LANG']->getLL('label_showsubelements') . '</label> ';
}
// Create header:
$title = '';
$description = '';
switch ($GLOBALS['BE_USER']->workspace) {
case 0:
- $title = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_onlineWS')) . ']';
+ $title = \TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[' . $GLOBALS['LANG']->getLL('shortcut_onlineWS') . ']';
$description = $GLOBALS['LANG']->getLL('workspace_description_live');
break;
case -1:
- $title = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['LANG']->getLL('shortcut_offlineWS')) . ']';
+ $title = \TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', array(), $this->doc->backPath, ' align="top"') . '[' . $GLOBALS['LANG']->getLL('shortcut_offlineWS') . ']';
$description = $GLOBALS['LANG']->getLL('workspace_description_draft');
break;
case -99:
- $title = (($this->doc->icons(3) . '[') . $GLOBALS['LANG']->getLL('shortcut_noWSfound')) . ']';
+ $title = $this->doc->icons(3) . '[' . $GLOBALS['LANG']->getLL('shortcut_noWSfound') . ']';
$description = $GLOBALS['LANG']->getLL('workspace_description_no_access');
break;
default:
- $title = (((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, $this->doc->backPath, ' align="top"') . '[') . $GLOBALS['BE_USER']->workspace) . '] ') . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, TRUE);
+ $title = \TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, $this->doc->backPath, ' align="top"') . '[' . $GLOBALS['BE_USER']->workspace . '] ' . \TYPO3\CMS\Backend\Utility\BackendUtility::getRecordTitle('sys_workspace', $GLOBALS['BE_USER']->workspaceRec, TRUE);
$description = $GLOBALS['BE_USER']->workspaceRec['description'];
break;
}
if ($GLOBALS['BE_USER']->workspace !== 0) {
if ($this->publishAccess) {
$confirmation = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? 'submit_publish_workspace_confirmation_1' : 'submit_publish_workspace_confirmation_2'));
- $actionLinks .= ((('<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('submit_publish_workspace')) . '" onclick="if (confirm(') . $confirmation) . ')) window.location.href=\'publish.php?swap=0\';return false"/>';
+ $actionLinks .= '<input type="submit" name="_publish" value="' . $GLOBALS['LANG']->getLL('submit_publish_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=0\';return false"/>';
if ($GLOBALS['BE_USER']->workspaceSwapAccess()) {
$confirmation = $GLOBALS['LANG']->JScharCode($GLOBALS['LANG']->getLL($GLOBALS['BE_USER']->workspaceRec['publish_access'] & 1 ? 'submit_swap_workspace_confirmation_1' : 'submit_swap_workspace_confirmation_2'));
- $actionLinks .= ((('<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('submit_swap_workspace')) . '" onclick="if (confirm(') . $confirmation) . ')) window.location.href=\'publish.php?swap=1\';return false ;" />';
+ $actionLinks .= '<input type="submit" name="_swap" value="' . $GLOBALS['LANG']->getLL('submit_swap_workspace') . '" onclick="if (confirm(' . $confirmation . ')) window.location.href=\'publish.php?swap=1\';return false ;" />';
}
} else {
$actionLinks .= $this->doc->icons(1) . $GLOBALS['LANG']->getLL('no_publish_permission');
if (\TYPO3\CMS\Core\Utility\GeneralUtility::_POST('_previewLink')) {
$ttlHours = intval($GLOBALS['BE_USER']->getTSConfigVal('options.workspaces.previewLinkTTLHours'));
$ttlHours = $ttlHours ? $ttlHours : 24 * 2;
- $previewUrl = (((\TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain($this->id) . '/index.php?ADMCMD_prev=') . \TYPO3\CMS\Backend\Utility\BackendUtility::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], (60 * 60) * $ttlHours, $GLOBALS['BE_USER']->workspace)) . '&id=') . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
- $actionLinks .= ((((('<br />Any user can browse the workspace frontend using this link for the next ' . $ttlHours) . ' hours (does not require backend login):<br /><br /><a target="_blank" href="') . htmlspecialchars($previewUrl)) . '">') . $previewUrl) . '</a>';
+ $previewUrl = \TYPO3\CMS\Backend\Utility\BackendUtility::getViewDomain($this->id) . '/index.php?ADMCMD_prev=' . \TYPO3\CMS\Backend\Utility\BackendUtility::compilePreviewKeyword('', $GLOBALS['BE_USER']->user['uid'], 60 * 60 * $ttlHours, $GLOBALS['BE_USER']->workspace) . '&id=' . intval($GLOBALS['BE_USER']->workspaceRec['db_mountpoints']);
+ $actionLinks .= '<br />Any user can browse the workspace frontend using this link for the next ' . $ttlHours . ' hours (does not require backend login):<br /><br /><a target="_blank" href="' . htmlspecialchars($previewUrl) . '">' . $previewUrl . '</a>';
} else {
$actionLinks .= '<input type="submit" name="_previewLink" value="Generate Workspace Preview Link" />';
}
}
$wsAccess = $GLOBALS['BE_USER']->checkWorkspace($GLOBALS['BE_USER']->workspaceRec);
// Add header to content variable:
- $content = (((((('
+ $content = '
<table border="0" cellpadding="0" cellspacing="0" id="t3-user-ws-wsinfotable" class="t3-table t3-table-info">
<tr>
- <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_workspace')) . ' </th>
- <td nowrap="nowrap">') . $title) . '</td>
+ <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_workspace') . ' </th>
+ <td nowrap="nowrap">' . $title . '</td>
</tr>
- <tr>') . ($description ? ((('
- <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_description')) . ' </td>
- <td>') . $description) . '</td>
- </tr>' : '')) . ($GLOBALS['BE_USER']->workspace != -99 && !$details ? (((((((((('
+ <tr>' . ($description ? '
+ <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_description') . ' </td>
+ <td>' . $description . '</td>
+ </tr>' : '') . ($GLOBALS['BE_USER']->workspace != -99 && !$details ? '
<tr>
- <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_options')) . ' </td>
- <td>') . $menu) . $actionLinks) . '</td>
+ <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_options') . ' </td>
+ <td>' . $menu . $actionLinks . '</td>
</tr>
<tr>
- <td class="t3-col-header" nowrap="nowrap">') . $GLOBALS['LANG']->getLL('label_status')) . ' </td>
- <td>') . $GLOBALS['LANG']->getLL('label_access_level')) . ' ') . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wsAccess['_ACCESS']))) . '</td>
- </tr>' : '')) . '
+ <td class="t3-col-header" nowrap="nowrap">' . $GLOBALS['LANG']->getLL('label_status') . ' </td>
+ <td>' . $GLOBALS['LANG']->getLL('label_access_level') . ' ' . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wsAccess['_ACCESS'])) . '</td>
+ </tr>' : '') . '
</table>
<br />
';
* @todo Define visibility
*/
public function displayVersionDetails($details) {
- return ('TODO: Show details for version "' . $details) . '"<hr/><a href="index.php">BACK</a>';
+ return 'TODO: Show details for version "' . $details . '"<hr/><a href="index.php">BACK</a>';
}
/**
// (2) Information about workspace (initially hidden)
$cssClass = $currentWksp ? 't3-row t3-row-active bgColor3' : 't3-row bgColor4';
// Start first row
- $content .= ('<tr class="' . $cssClass) . '">';
+ $content .= '<tr class="' . $cssClass . '">';
// row #1, column #1: expand icon
- $content .= (((('<td>' . '<a href="javascript:expandCollapse(') . $rowNum) . ')">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-table-expand', array(
+ $content .= '<td>' . '<a href="javascript:expandCollapse(' . $rowNum . ')">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-view-table-expand', array(
'title' => $GLOBALS['LANG']->getLL('img_title_show_more'),
'id' => ('spanw1_' . $rowNum)
- ))) . '</a></td>';
+ )) . '</a></td>';
// row #1, column #2: icon panel
$content .= '<td nowrap="nowrap">';
// Mozilla Firefox will attempt wrap due to `width="1"` on topmost column
// row #1, column #3: current workspace indicator
$content .= '<td nowrap="nowrap" style="text-align: center">';
// Mozilla Firefox will attempt wrap due to `width="1"` on topmost column
- $content .= !$currentWksp ? ' ' : ((((('<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_ok.gif', 'width="18" height="16"')) . ' id="wl_') . $rowNum) . 'i" border="0" hspace="1" alt="') . $GLOBALS['LANG']->getLL('img_title_current_workspace')) . '" />';
+ $content .= !$currentWksp ? ' ' : '<img ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/icon_ok.gif', 'width="18" height="16"') . ' id="wl_' . $rowNum . 'i" border="0" hspace="1" alt="' . $GLOBALS['LANG']->getLL('img_title_current_workspace') . '" />';
$content .= '</td>';
// row #1, column #4 and 5: title and description
- $content .= (((('<td nowrap="nowrap">' . htmlspecialchars($wksp['title'])) . '</td>') . '<td>') . nl2br(htmlspecialchars($wksp['description']))) . '</td>';
+ $content .= '<td nowrap="nowrap">' . htmlspecialchars($wksp['title']) . '</td>' . '<td>' . nl2br(htmlspecialchars($wksp['description'])) . '</td>';
$content .= '</tr>';
// row #2, column #1 and #2
- $content .= ('<tr id="wl_' . $rowNum) . '" class="bgColor" style="display: none">';
+ $content .= '<tr id="wl_' . $rowNum . '" class="bgColor" style="display: none">';
$content .= '<td colspan="2" style="border-right: none;"> </td>';
// row #2, column #3, #4 and #4
- $content .= ('<td colspan="3" style="border-left: none;">' . $this->workspaceList_formatWorkspaceData($wksp)) . '</td>';
+ $content .= '<td colspan="3" style="border-left: none;">' . $this->workspaceList_formatWorkspaceData($wksp) . '</td>';
$content .= '</tr>';
$rowNum++;
}
* @todo Define visibility
*/
public function workspaceList_formatWorkspaceData(&$wksp) {
- $content = ((((((((((('<table cellspacing="0" cellpadding="0" width="100%" class="ver-wl-details-table">' . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_file_mountpoints')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getFileMountPoints($wksp)) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_db_mountpoints')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getWebMountPoints($wksp)) . '</td></tr>';
+ $content = '<table cellspacing="0" cellpadding="0" width="100%" class="ver-wl-details-table">' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_file_mountpoints') . '</strong></td>' . '<td class="ver-wl-details">' . $this->workspaceList_getFileMountPoints($wksp) . '</td></tr>' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_db_mountpoints') . '</strong></td>' . '<td class="ver-wl-details">' . $this->workspaceList_getWebMountPoints($wksp) . '</td></tr>';
if ($wksp['uid'] > 0) {
// Displaying information below makes sence only for custom workspaces
- $content .= (((((((((((((((((((((((((((('<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_frozen')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(($wksp['freeze'] ? 'workspace_list_label_frozen_yes' : 'workspace_list_label_frozen_no'))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_publish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['publish_time'] == 0 ? ' –' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['publish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_unpublish_date')) . '</strong></td>') . '<td class="ver-wl-details">') . ($wksp['unpublish_time'] == 0 ? ' –' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['unpublish_time']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_your_access')) . '</strong></td>') . '<td class="ver-wl-details">') . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wksp['_ACCESS']))) . '</td></tr>') . '<tr><td class="ver-wl-details-label"><strong>') . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getUserList($wksp)) . '</td></tr>';
+ $content .= '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_frozen') . '</strong></td>' . '<td class="ver-wl-details">' . $GLOBALS['LANG']->getLL(($wksp['freeze'] ? 'workspace_list_label_frozen_yes' : 'workspace_list_label_frozen_no')) . '</td></tr>' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_publish_date') . '</strong></td>' . '<td class="ver-wl-details">' . ($wksp['publish_time'] == 0 ? ' –' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['publish_time'])) . '</td></tr>' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_unpublish_date') . '</strong></td>' . '<td class="ver-wl-details">' . ($wksp['unpublish_time'] == 0 ? ' –' : \TYPO3\CMS\Backend\Utility\BackendUtility::datetime($wksp['unpublish_time'])) . '</td></tr>' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_your_access') . '</strong></td>' . '<td class="ver-wl-details">' . $GLOBALS['LANG']->getLL(('workspace_list_access_' . $wksp['_ACCESS'])) . '</td></tr>' . '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users') . '</strong></td>' . '<td class="ver-wl-details">' . $this->workspaceList_getUserList($wksp) . '</td></tr>';
} elseif ($GLOBALS['BE_USER']->isAdmin()) {
// show users for draft/live workspace only to admin users
- $content .= (((('<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users')) . '</strong></td>') . '<td class="ver-wl-details">') . $this->workspaceList_getUserList($wksp)) . '</td></tr>';
+ $content .= '<tr><td class="ver-wl-details-label"><strong>' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_users') . '</strong></td>' . '<td class="ver-wl-details">' . $this->workspaceList_getUserList($wksp) . '</td></tr>';
}
$content .= '</table>';
return $content;
$filteredMountpoints = array_intersect($userMountpoints, $workspaceMountpoints);
$mountpointList = implode(',', $filteredMountpoints);
}
- $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', ('deleted = 0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($mountpointList)) . ')', '', 'title');
+ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'deleted = 0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($mountpointList) . ')', '', 'title');
$content = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
// will show UID on hover. Just convinient to user.
- $content[] = ((((\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
+ $content[] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('pages', $row) . '<span title="UID: ' . $row['uid'] . '">' . $row['title'] . '</span>';
}
if (count($content)) {
return implode('<br />', $content);
$filteredMountpoints = array_intersect($userMountpoints, $workspaceMountpoints);
$mountpointList = implode(',', $filteredMountpoints);
}
- $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', ('deleted = 0 AND hidden=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($mountpointList)) . ')', '', 'title');
+ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_filemounts', 'deleted = 0 AND hidden=0 AND uid IN (' . $GLOBALS['TYPO3_DB']->cleanIntList($mountpointList) . ')', '', 'title');
$content = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
// will show UID on hover. Just convinient to user.
- $content[] = ((((\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_filemounts', $row) . '<span title="UID: ') . $row['uid']) . '">') . $row['title']) . '</span>';
+ $content[] = \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_filemounts', $row) . '<span title="UID: ' . $row['uid'] . '">' . $row['title'] . '</span>';
}
if (count($content)) {
return implode('<br />', $content);
*/
public function workspaceList_displayUserWorkspaceListHeader() {
// TODO CSH lables?
- return ((((('<table border="0" cellpadding="0" cellspacing="0" class="workspace-overview">
+ return '<table border="0" cellpadding="0" cellspacing="0" class="workspace-overview">
<tr class="t3-row-header">
<td width="1"> </td>
<td width="1"> </td>
- <td nowrap="nowrap">' . $GLOBALS['LANG']->getLL('workspace_list_label_current_workspace')) . '</td>
- <td nowrap="nowrap">') . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_title')) . '</td>
- <td nowrap="nowrap">') . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_description')) . '</td>
+ <td nowrap="nowrap">' . $GLOBALS['LANG']->getLL('workspace_list_label_current_workspace') . '</td>
+ <td nowrap="nowrap">' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_title') . '</td>
+ <td nowrap="nowrap">' . $GLOBALS['LANG']->getLL('workspace_list_label_workspace_description') . '</td>
</tr>';
}
$content .= $this->workspaceList_getUserListWithAccess($wksp['reviewers'], $GLOBALS['LANG']->getLL('workspace_list_label_reviewers'));
// reviewers
if ($content != '') {
- $content = ('<table cellpadding="0" cellspacing="1" width="100%" class="lrPadding workspace-overview">' . $content) . '</table>';
+ $content = '<table cellpadding="0" cellspacing="1" width="100%" class="lrPadding workspace-overview">' . $content . '</table>';
} else {
$content = $GLOBALS['LANG']->getLL($wksp['uid'] > 0 ? 'workspace_list_access_admins_only' : 'workspace_list_access_anyone');
}
} else {
$tag0 = ($tag1 = '');
}
- $content_array[] = (($this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $uid, $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $uid) . '"')), 'be_users', $uid, 2) . $tag0) . htmlspecialchars($user['username'])) . $tag1;
+ $content_array[] = $this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $uid, $GLOBALS['BACK_PATH'], (' align="middle" alt="UID: ' . $uid . '"')), 'be_users', $uid, 2) . $tag0 . htmlspecialchars($user['username']) . $tag1;
}
}
return implode('<br />', $content_array);
} else {
$tag0 = ($tag1 = '');
}
- $content_array[] = (($this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $tag0) . htmlspecialchars($this->be_user_Array_full[$id]['username'])) . $tag1;
+ $content_array[] = $this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], (' align="middle" alt="UID: ' . $id . '"')), $table, $id, 2) . $tag0 . htmlspecialchars($this->be_user_Array_full[$id]['username']) . $tag1;
} else {
// group
if (FALSE === $groups) {
$groups = \TYPO3\CMS\Backend\Utility\BackendUtility::getGroupNames();
}
- $content_array[] = $this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $groups[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')), $table, $id, 2) . $groups[$id]['title'];
+ $content_array[] = $this->doc->wrapClickMenuOnIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage($table, $groups[$id], $GLOBALS['BACK_PATH'], (' align="middle" alt="UID: ' . $id . '"')), $table, $id, 2) . $groups[$id]['title'];
}
} else {
// user id
} else {
$tag0 = ($tag1 = '');
}
- $content_array[] = ((\TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], ((' align="middle" alt="UID: ' . $id) . '"')) . $tag0) . htmlspecialchars($this->be_user_Array_full[$userUID]['username'])) . $tag1;
+ $content_array[] = \TYPO3\CMS\Backend\Utility\IconUtility::getIconImage('be_users', $this->be_user_Array[$id], $GLOBALS['BACK_PATH'], (' align="middle" alt="UID: ' . $id . '"')) . $tag0 . htmlspecialchars($this->be_user_Array_full[$userUID]['username']) . $tag1;
}
}
sort($content_array);
}
$content = '<tr><td class="ver-wl-details-label ver-wl-details-user-list-label">';
// TODO CSH lable explaining access here?
- $content .= ('<strong>' . $access) . '</strong></td>';
- $content .= ('<td class="ver-wl-details">' . implode('<br />', $content_array)) . '</td></tr>';
+ $content .= '<strong>' . $access . '</strong></td>';
+ $content .= '<td class="ver-wl-details">' . implode('<br />', $content_array) . '</td></tr>';
return $content;
}
if ($this->workspaceList_hasEditAccess($wksp)) {
// User can modify workspace parameters, display corresponding link and icon
$editUrl = 'workspaceforms.php?action=edit&wkspId=' . $wksp['uid'];
- $content .= ((((('<a href="' . $editUrl) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_edit_workspace')) . '"/>') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open')) . '</a>';
+ $content .= '<a href="' . $editUrl . '" title="' . $GLOBALS['LANG']->getLL('workspace_list_icon_title_edit_workspace') . '"/>' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-open') . '</a>';
} else {
// User can NOT modify workspace parameters, display space
// Get only withdth and height from skinning API
- $content .= ('<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"', 2)) . ' border="0" alt="" hspace="1" align="middle" />';
+ $content .= '<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/edit2.gif', 'width="11" height="12"', 2) . ' border="0" alt="" hspace="1" align="middle" />';
}
// `switch workspace` button
if (!$currentWorkspace) {
// Workspace switching button
- $content .= ((((((('<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '?changeWorkspace=') . $wksp['uid']) . '" title="') . $GLOBALS['LANG']->getLL('workspace_list_icon_title_switch_workspace')) . '"/>') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-workspace')) . '</a>';
+ $content .= '<a href="' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('SCRIPT_NAME') . '?changeWorkspace=' . $wksp['uid'] . '" title="' . $GLOBALS['LANG']->getLL('workspace_list_icon_title_switch_workspace') . '"/>' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-workspace') . '</a>';
} else {
// Current workspace: empty space instead of workspace switching button
//
// Here get only width and height from skinning API
- $content .= ('<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/switch.png', 'width="18" height="16"', 2)) . ' border="0" alt="" hspace="1" align="middle" alt="" />';
+ $content .= '<img src="clear.gif" ' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/switch.png', 'width="18" height="16"', 2) . ' border="0" alt="" hspace="1" align="middle" alt="" />';
}
return $content;
}
'tstamp' => 0,
// does not really matter
'deleted' => 0,
- 'title' => $uid == 0 ? ('[' . $GLOBALS['LANG']->getLL('shortcut_onlineWS')) . ']' : ('[' . $GLOBALS['LANG']->getLL('shortcut_offlineWS')) . ']',
+ 'title' => $uid == 0 ? '[' . $GLOBALS['LANG']->getLL('shortcut_onlineWS') . ']' : '[' . $GLOBALS['LANG']->getLL('shortcut_offlineWS') . ']',
'description' => $uid == 0 ? $GLOBALS['LANG']->getLL('shortcut_onlineWS') : $GLOBALS['LANG']->getLL('shortcut_offlineWS'),
'adminusers' => '',
'members' => '',
foreach ($this->commandMap as $table => $liveIdCollection) {
foreach ($liveIdCollection as $liveId => $commandCollection) {
foreach ($commandCollection as $command => $properties) {
- if (($command === 'version' && isset($properties['action'])) && $properties['action'] === 'swap') {
+ if ($command === 'version' && isset($properties['action']) && $properties['action'] === 'swap') {
if (isset($properties['swapWith']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['swapWith'])) {
call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $liveId, $properties)));
}
foreach ($this->commandMap as $table => $liveIdCollection) {
foreach ($liveIdCollection as $liveIdList => $commandCollection) {
foreach ($commandCollection as $command => $properties) {
- if (($command === 'version' && isset($properties['action'])) && $properties['action'] === 'setStage') {
+ if ($command === 'version' && isset($properties['action']) && $properties['action'] === 'setStage') {
if (isset($properties['stageId']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($properties['stageId'])) {
call_user_func_array(array($this, $callbackMethod), array_merge($arguments, array($table, $liveIdList, $properties)));
}
foreach ($this->commandMap as $table => $liveIdCollection) {
foreach ($liveIdCollection as $liveId => $commandCollection) {
foreach ($commandCollection as $command => $properties) {
- if (($command === 'version' && isset($properties['action'])) && ($properties['action'] === 'clearWSID' || $properties['action'] === 'flush')) {
+ if ($command === 'version' && isset($properties['action']) && ($properties['action'] === 'clearWSID' || $properties['action'] === 'flush')) {
$dependency->addElement($table, $liveId, array('properties' => $properties));
}
}
if (count($liveIds) > 1) {
foreach ($liveIds as $liveId) {
if (isset($this->commandMap[$table][$liveId]['version'])) {
- throw new \RuntimeException(((('Command map for [' . $table) . '][') . $liveId) . '][version] was already set.', 1289391048);
+ throw new \RuntimeException('Command map for [' . $table . '][' . $liveId . '][version] was already set.', 1289391048);
}
$extractedCommandMap[$table][$liveId]['version'] = $properties;
}
*/
protected function getScopeData($scope, $key) {
if (!isset($this->scopes[$scope])) {
- throw new \RuntimeException(('Scope "' . $scope) . '" is not defined.', 1289342187);
+ throw new \RuntimeException('Scope "' . $scope . '" is not defined.', 1289342187);
}
return $this->scopes[$scope][$key];
}
* @return \TYPO3\CMS\Version\Dependency\ElementEntity
*/
public function getElement($table, $id, array $data = array(), \TYPO3\CMS\Version\Dependency\DependencyResolver $dependency) {
- $elementName = ($table . ':') . $id;
+ $elementName = $table . ':' . $id;
if (!isset($this->elements[$elementName])) {
$this->elements[$elementName] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Element', $table, $id, $data, $dependency);
}
* @return \TYPO3\CMS\Version\Dependency\ReferenceEntity
*/
public function getReference(\TYPO3\CMS\Version\Dependency\ElementEntity $element, $field) {
- $referenceName = ($element->__toString() . '.') . $field;
+ $referenceName = $element->__toString() . '.' . $field;
if (!isset($this->references[$referenceName][$field])) {
$this->references[$referenceName][$field] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Version\\Dependency\\DependencyResolver_Reference', $element, $field);
}
public function getNestedElements(\TYPO3\CMS\Version\Dependency\ElementEntity $outerMostParent) {
$outerMostParentName = $outerMostParent->__toString();
if (!isset($this->outerMostParents[$outerMostParentName])) {
- throw new \RuntimeException(('Element "' . $outerMostParentName) . '" was detected as outermost parent.', 1289318609);
+ throw new \RuntimeException('Element "' . $outerMostParentName . '" was detected as outermost parent.', 1289318609);
}
$nestedStructure = array_merge(array($outerMostParentName => $outerMostParent), $outerMostParent->getNestedChildren());
return $nestedStructure;
public function getChildren() {
if (!isset($this->children)) {
$this->children = array();
- $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', (('tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->table, 'sys_refindex')) . ' AND recuid=') . $this->id);
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->table, 'sys_refindex') . ' AND recuid=' . $this->id);
if (is_array($rows)) {
foreach ($rows as $row) {
$reference = $this->getDependency()->getFactory()->getReferencedElement($row['ref_table'], $row['ref_uid'], $row['field'], array(), $this->getDependency());
public function getParents() {
if (!isset($this->parents)) {
$this->parents = array();
- $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', (('ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->table, 'sys_refindex')) . ' AND deleted=0 AND ref_uid=') . $this->id);
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'sys_refindex', 'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->table, 'sys_refindex') . ' AND deleted=0 AND ref_uid=' . $this->id);
if (is_array($rows)) {
foreach ($rows as $row) {
$reference = $this->getDependency()->getFactory()->getReferencedElement($row['tablename'], $row['recuid'], $row['field'], array(), $this->getDependency());
* @return string
*/
static public function getIdentifier($table, $id) {
- return ($table . ':') . $id;
+ return $table . ':' . $id;
}
/**
* @return string
*/
public function __toString() {
- return ($this->element . '.') . $this->field;
+ return $this->element . '.' . $this->field;
}
}
$liveRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getLiveVersionOfRecord($table, $id, 'uid,t3ver_state');
// Processing can be skipped if a delete placeholder shall be swapped/published
// during the current request. Thus it will be deleted later on...
- if ((((($record['t3ver_state'] == 2 && !empty($liveRec['uid'])) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action'])) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith'])) && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action'] === 'swap') && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith'] == $id) {
+ if ($record['t3ver_state'] == 2 && !empty($liveRec['uid']) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action']) && !empty($tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith']) && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['action'] === 'swap' && $tcemainObj->cmdmap[$table][$liveRec['uid']]['version']['swapWith'] == $id) {
return NULL;
}
// Delete those in WS 0 + if their live records state was not "Placeholder".
// Get workspace version of the source record, if any:
$WSversion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
// If no version exists and versioningWS is in version 2, a new placeholder is made automatically:
- if ((!$WSversion['uid'] && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) && (int) $moveRec['t3ver_state'] != 3) {
+ if (!$WSversion['uid'] && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2 && (int) $moveRec['t3ver_state'] != 3) {
$tcemainObj->versionizeRecord($table, $uid, 'Placeholder version for moving record');
$WSversion = \TYPO3\CMS\Backend\Utility\BackendUtility::getWorkspaceVersionOfRecord($tcemainObj->BE_USER->workspace, $table, $uid, 'uid,t3ver_oid');
}
if (!$recIsNewVersion) {
$errorCode = $tcemainObj->BE_USER->workspaceCannotEditRecord($table, $WSversion['uid'] ? $WSversion['uid'] : $uid);
if ($errorCode) {
- $workspaceAccessBlocked['src1'] = ('Record could not be edited in workspace: ' . $errorCode) . ' ';
+ $workspaceAccessBlocked['src1'] = 'Record could not be edited in workspace: ' . $errorCode . ' ';
} elseif (!$canMoveRecord && $tcemainObj->BE_USER->workspaceAllowLiveRecordsInPID($moveRec['pid'], $table) <= 0) {
- $workspaceAccessBlocked['src2'] = ((('Could not remove record from table "' . $table) . '" from its page "') . $moveRec['pid']) . '" ';
+ $workspaceAccessBlocked['src2'] = 'Could not remove record from table "' . $table . '" from its page "' . $moveRec['pid'] . '" ';
}
}
// Workspace destination check:
// NO RECORDS can be inserted if $destRes is negative which indicates a stage
// not allowed for use. If "versioningWS" is version 2, moving can take place of versions.
if (!($destRes > 0 || $canMoveRecord && !$destRes)) {
- $workspaceAccessBlocked['dest1'] = ((('Could not insert record from table "' . $table) . '" in destination PID "') . $resolvedPid) . '" ';
+ $workspaceAccessBlocked['dest1'] = 'Could not insert record from table "' . $table . '" in destination PID "' . $resolvedPid . '" ';
} elseif ($destRes == 1 && $WSversion['uid']) {
$workspaceAccessBlocked['dest2'] = 'Could not insert other versions in destination PID ';
}
if (!count($workspaceAccessBlocked)) {
// If the move operation is done on a versioned record, which is
// NOT new/deleted placeholder and versioningWS is in version 2, then...
- if (($WSversion['uid'] && !$recIsNewVersion) && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
+ if ($WSversion['uid'] && !$recIsNewVersion && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
$this->moveRecord_wsPlaceholders($table, $uid, $destPid, $WSversion['uid'], $tcemainObj);
} else {
// moving not needed, just behave like in live workspace
protected function notifyStageChange(array $stat, $stageId, $table, $id, $comment, \TYPO3\CMS\Core\DataHandler\DataHandler $tcemainObj, array $notificationAlternativeRecipients = array()) {
$workspaceRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord('sys_workspace', $stat['uid']);
// So, if $id is not set, then $table is taken to be the complete element name!
- $elementName = $id ? ($table . ':') . $id : $table;
+ $elementName = $id ? $table . ':' . $id : $table;
if (is_array($workspaceRec)) {
// Get the new stage title from workspaces library, if workspaces extension is installed
if (\TYPO3\CMS\Core\Extension\ExtensionManager::isLoaded('workspaces')) {
// Traverse them, and find the history of each
foreach ($allElements as $elRef) {
list($eTable, $eUid) = explode(':', $elRef);
- $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('log_data,tstamp,userid', 'sys_log', (('action=6 and details_nr=30
- AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($eTable, 'sys_log')) . '
- AND recuid=') . intval($eUid), '', 'uid DESC');
+ $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('log_data,tstamp,userid', 'sys_log', 'action=6 and details_nr=30
+ AND tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($eTable, 'sys_log') . '
+ AND recuid=' . intval($eUid), '', 'uid DESC');
// Find all implicated since the last stage-raise from editing to review:
foreach ($rows as $dat) {
$data = unserialize($dat['log_data']);
\TYPO3\CMS\Core\Utility\GeneralUtility::plainMailEncoded($recipientData['email'], $emailSubject, $emailMessage, $emailHeaders);
}
$emailRecipients = implode(',', $emailRecipients);
- $tcemainObj->newlog2(('Notification email for stage change was sent to "' . $emailRecipients) . '"', $table, $id);
+ $tcemainObj->newlog2('Notification email for stage change was sent to "' . $emailRecipients . '"', $table, $id);
}
}
}
't3ver_stage' => $stageId
);
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid=' . intval($id), $updateData);
- $tcemainObj->newlog2(((('Stage for record was changed to ' . $stageId) . '. Comment was: "') . substr($comment, 0, 100)) . '"', $table, $id);
+ $tcemainObj->newlog2('Stage for record was changed to ' . $stageId . '. Comment was: "' . substr($comment, 0, 100) . '"', $table, $id);
// TEMPORARY, except 6-30 as action/detail number which is observed elsewhere!
$tcemainObj->log($table, $id, 6, 0, 0, 'Stage raised...', 30, array('comment' => $comment, 'stage' => $stageId));
if ((int) $stat['stagechg_notification'] > 0) {
if ($notificationEmailInfo) {
- $this->notificationEmailInfo[((($stat['uid'] . ':') . $stageId) . ':') . $comment]['shared'] = array($stat, $stageId, $comment);
- $this->notificationEmailInfo[((($stat['uid'] . ':') . $stageId) . ':') . $comment]['elements'][] = ($table . ':') . $id;
- $this->notificationEmailInfo[((($stat['uid'] . ':') . $stageId) . ':') . $comment]['alternativeRecipients'] = $notificationAlternativeRecipients;
+ $this->notificationEmailInfo[$stat['uid'] . ':' . $stageId . ':' . $comment]['shared'] = array($stat, $stageId, $comment);
+ $this->notificationEmailInfo[$stat['uid'] . ':' . $stageId . ':' . $comment]['elements'][] = $table . ':' . $id;
+ $this->notificationEmailInfo[$stat['uid'] . ':' . $stageId . ':' . $comment]['alternativeRecipients'] = $notificationAlternativeRecipients;
} else {
$this->notifyStageChange($stat, $stageId, $table, $id, $comment, $tcemainObj, $notificationAlternativeRecipients);
}
}
} else {
- $tcemainObj->newlog(('The member user tried to set a stage value "' . $stageId) . '" that was not allowed', 1);
+ $tcemainObj->newlog('The member user tried to set a stage value "' . $stageId . '" that was not allowed', 1);
}
} else {
$tcemainObj->newlog('Attempt to set stage for record failed because you do not have edit access', 1);
$tcemainObj->newlog('The root version could not be created!', 1);
}
} else {
- $tcemainObj->newlog(('Versioning type "' . $versionizeTree) . '" was not allowed in workspace', 1);
+ $tcemainObj->newlog('Versioning type "' . $versionizeTree . '" was not allowed in workspace', 1);
}
} else {
$tcemainObj->newlog('Could not read all subpages to versionize.', 1);
if (is_array($curVersion) && is_array($swapVersion)) {
if ($tcemainObj->BE_USER->workspacePublishAccess($swapVersion['t3ver_wsid'])) {
$wsAccess = $tcemainObj->BE_USER->checkWorkspace($swapVersion['t3ver_wsid']);
- if (($swapVersion['t3ver_wsid'] <= 0 || !($wsAccess['publish_access'] & 1)) || (int) $swapVersion['t3ver_stage'] === -10) {
+ if ($swapVersion['t3ver_wsid'] <= 0 || !($wsAccess['publish_access'] & 1) || (int) $swapVersion['t3ver_stage'] === -10) {
if ($tcemainObj->doesRecordExist($table, $swapWith, 'show') && $tcemainObj->checkRecordUpdateAccess($table, $swapWith)) {
if (!$swapIntoWS || $tcemainObj->BE_USER->workspaceSwapAccess()) {
// Check if the swapWith record really IS a version of the original!
if (((int) $swapVersion['pid'] == -1 && (int) $curVersion['pid'] >= 0) && !strcmp($swapVersion['t3ver_oid'], $id)) {
// Lock file name:
- $lockFileName = ((((PATH_site . 'typo3temp/swap_locking/') . $table) . ':') . $id) . '.ser';
+ $lockFileName = PATH_site . 'typo3temp/swap_locking/' . $table . ':' . $id . '.ser';
if (!@is_file($lockFileName)) {
// Write lock-file:
\TYPO3\CMS\Core\Utility\GeneralUtility::writeFileToTypo3tempDir($lockFileName, serialize(array(
// Force delete
$tcemainObj->deleteEl($table, $id, TRUE);
}
- $tcemainObj->newlog2((((((($swapIntoWS ? 'Swapping' : 'Publishing') . ' successful for table "') . $table) . '" uid ') . $id) . '=>') . $swapWith, $table, $id, $swapVersion['pid']);
+ $tcemainObj->newlog2(($swapIntoWS ? 'Swapping' : 'Publishing') . ' successful for table "' . $table . '" uid ' . $id . '=>' . $swapWith, $table, $id, $swapVersion['pid']);
// Update reference index of the live record:
$tcemainObj->addRemapStackRefIndex($table, $id);
// Set log entry for live record:
} else {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tcemain.xml:version_swap.online_record_updated');
}
- $theLogId = $tcemainObj->log($table, $id, 2, $propArr['pid'], 0, $label, 10, array($propArr['header'], ($table . ':') . $id), $propArr['event_pid']);
+ $theLogId = $tcemainObj->log($table, $id, 2, $propArr['pid'], 0, $label, 10, array($propArr['header'], $table . ':' . $id), $propArr['event_pid']);
$tcemainObj->setHistory($table, $id, $theLogId);
// Update reference index of the offline record:
$tcemainObj->addRemapStackRefIndex($table, $swapWith);
} else {
$label = $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_tcemain.xml:version_swap.online_record_updated');
}
- $theLogId = $tcemainObj->log($table, $swapWith, 2, $propArr['pid'], 0, $label, 10, array($propArr['header'], ($table . ':') . $swapWith), $propArr['event_pid']);
+ $theLogId = $tcemainObj->log($table, $swapWith, 2, $propArr['pid'], 0, $label, 10, array($propArr['header'], $table . ':' . $swapWith), $propArr['event_pid']);
$tcemainObj->setHistory($table, $swapWith, $theLogId);
// Clear cache:
$tcemainObj->clear_cache($table, $id);
$tcemainObj->newlog('In swap version, either pid was not -1 or the t3ver_oid didn\'t match the id of the online version as it must!', 2);
}
} else {
- $tcemainObj->newlog(('Workspace #' . $swapVersion['t3ver_wsid']) . ' does not support swapping.', 1);
+ $tcemainObj->newlog('Workspace #' . $swapVersion['t3ver_wsid'] . ' does not support swapping.', 1);
}
} else {
$tcemainObj->newlog('You cannot publish a record you do not have edit and show permissions for', 1);
}
} else {
- $tcemainObj->newlog(('Records in workspace #' . $swapVersion['t3ver_wsid']) . ' can only be published when in "Publish" stage.', 1);
+ $tcemainObj->newlog('Records in workspace #' . $swapVersion['t3ver_wsid'] . ' can only be published when in "Publish" stage.', 1);
}
} else {
$tcemainObj->newlog('User could not publish records from workspace #' . $swapVersion['t3ver_wsid'], 1);
if ($newPageId) {
foreach ($copyTablesArray as $table) {
// all records under the page is copied.
- if (($table && is_array($GLOBALS['TCA'][$table])) && $table !== 'pages') {
- $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, ('pid=' . intval($oldPageId)) . $tcemainObj->deleteClause($table));
+ if ($table && is_array($GLOBALS['TCA'][$table]) && $table !== 'pages') {
+ $mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'pid=' . intval($oldPageId) . $tcemainObj->deleteClause($table));
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
// Check, if this record has already been copied by a parent record as relation:
if (!$tcemainObj->copyMappingArray[$table][$row['uid']]) {
// Traversing all tables supporting versioning:
foreach ($GLOBALS['TCA'] as $table => $cfg) {
if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $table !== 'pages') {
- $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('A.uid AS offlineUid, B.uid AS uid', (($table . ' A,') . $table) . ' B', ((((('A.pid=-1 AND B.pid=' . $pageId) . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.uid=A.t3ver_oid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
+ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('A.uid AS offlineUid, B.uid AS uid', $table . ' A,' . $table . ' B', 'A.pid=-1 AND B.pid=' . $pageId . ' AND A.t3ver_wsid=' . $workspaceId . ' AND B.uid=A.t3ver_oid' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
while (FALSE != ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
$elementData[$table][] = array($row[1], $row[0]);
}
// Traversing all tables supporting versioning:
foreach ($GLOBALS['TCA'] as $table => $cfg) {
if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS'] && $table !== 'pages') {
- $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT A.uid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND B.pid IN (') . implode(',', $pageIdList)) . ') AND A.t3ver_oid=B.uid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
+ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT A.uid', $table . ' A,' . $table . ' B', 'A.pid=-1' . ' AND A.t3ver_wsid=' . $workspaceId . ' AND B.pid IN (' . implode(',', $pageIdList) . ') AND A.t3ver_oid=B.uid' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
$elementList[$table][] = $row[0];
}
*/
public function findPageIdsForVersionStateChange($table, array $idList, $workspaceId, array &$pageIdList, array &$elementList) {
if ($workspaceId != 0) {
- $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT B.pid', (($table . ' A,') . $table) . ' B', (((((('A.pid=-1' . ' AND A.t3ver_wsid=') . $workspaceId) . ' AND A.uid IN (') . implode(',', $idList)) . ') AND A.t3ver_oid=B.uid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
+ $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('DISTINCT B.pid', $table . ' A,' . $table . ' B', 'A.pid=-1' . ' AND A.t3ver_wsid=' . $workspaceId . ' AND A.uid IN (' . implode(',', $idList) . ') AND A.t3ver_oid=B.uid' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'));
while (FALSE !== ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res))) {
$pageIdList[] = $row[0];
// Find ws version
$newVersion_placeholderFieldArray['t3ver_state'] = 3;
// Setting workspace - only so display of place holders can filter out those from other workspaces.
$newVersion_placeholderFieldArray['t3ver_wsid'] = $tcemainObj->BE_USER->workspace;
- $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = ((('[MOVE-TO PLACEHOLDER for #' . $uid) . ', WS#') . $tcemainObj->BE_USER->workspace) . ']';
+ $newVersion_placeholderFieldArray[$GLOBALS['TCA'][$table]['ctrl']['label']] = '[MOVE-TO PLACEHOLDER for #' . $uid . ', WS#' . $tcemainObj->BE_USER->workspace . ']';
// moving localized records requires to keep localization-settings for the placeholder too
if (array_key_exists('languageField', $GLOBALS['TCA'][$table]['ctrl']) && array_key_exists('transOrigPointerField', $GLOBALS['TCA'][$table]['ctrl'])) {
$l10nParentRec = \TYPO3\CMS\Backend\Utility\BackendUtility::getRecord($table, $uid);
* @return void
*/
public function initializePreviewUser(&$params, &$pObj) {
- if (((is_null($params['BE_USER']) || $params['BE_USER'] === FALSE) && $this->previewConfiguration !== FALSE) && $this->previewConfiguration['BEUSER_uid'] > 0) {
+ if ((is_null($params['BE_USER']) || $params['BE_USER'] === FALSE) && $this->previewConfiguration !== FALSE && $this->previewConfiguration['BEUSER_uid'] > 0) {
// New backend user object
$BE_USER = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\FrontendBackendUserAuthentication');
$BE_USER->userTS_dontGetCached = 1;
// if there is a valid BE user, and the full workspace should be
// previewed, the workspacePreview option shouldbe set
$workspaceUid = $this->previewConfiguration['fullWorkspace'];
- if (($pObj->beUserLogin && is_object($params['BE_USER'])) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($workspaceUid)) {
+ if ($pObj->beUserLogin && is_object($params['BE_USER']) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($workspaceUid)) {
if ($workspaceUid == 0 || $workspaceUid >= -1 && $params['BE_USER']->checkWorkspace($workspaceUid)) {
// Check Access to workspace. Live (0) is OK to preview for all.
$pObj->workspacePreview = intval($workspaceUid);
if (@is_file($templateFile)) {
$message = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(PATH_site . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']);
} else {
- $message = ('<strong>ERROR!</strong><br>Template File "' . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate']) . '" configured with $TYPO3_CONF_VARS["FE"]["workspacePreviewLogoutTemplate"] not found. Please contact webmaster about this problem.';
+ $message = '<strong>ERROR!</strong><br>Template File "' . $this->tsfeObj->TYPO3_CONF_VARS['FE']['workspacePreviewLogoutTemplate'] . '" configured with $TYPO3_CONF_VARS["FE"]["workspacePreviewLogoutTemplate"] not found. Please contact webmaster about this problem.';
}
} else {
$message = 'You logged out from Workspace preview mode. Click this link to <a href="%1$s">go back to the website</a>';
}
$returnUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::sanitizeLocalUrl(\TYPO3\CMS\Core\Utility\GeneralUtility::_GET('returnUrl'));
- die(sprintf($message, htmlspecialchars(preg_replace(('/\\&?' . $this->previewKey) . '=[[:alnum:]]+/', '', $returnUrl))));
+ die(sprintf($message, htmlspecialchars(preg_replace('/\\&?' . $this->previewKey . '=[[:alnum:]]+/', '', $returnUrl))));
}
// Look for keyword configuration record:
- $previewData = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'sys_preview', (('keyword=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($inputCode, 'sys_preview')) . ' AND endtime>') . $GLOBALS['EXEC_TIME']);
+ $previewData = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('*', 'sys_preview', 'keyword=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($inputCode, 'sys_preview') . ' AND endtime>' . $GLOBALS['EXEC_TIME']);
// Get: Backend login status, Frontend login status
// - Make sure to remove fe/be cookies (temporarily);
// BE already done in ADMCMD_preview_postInit()
SetCookie($this->previewKey, \TYPO3\CMS\Core\Utility\GeneralUtility::_GP($this->previewKey), 0, \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
}
return $previewConfig;
- } elseif ((((\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?') . $this->previewKey) . '=') . $inputCode === \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) {
+ } elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?' . $this->previewKey . '=' . $inputCode === \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL')) {
// Set GET variables
$GET_VARS = '';
parse_str($previewConfig['getVars'], $GET_VARS);
} else {
// This check is to prevent people from setting additional
// GET vars via realurl or other URL path based ways of passing parameters.
- throw new \Exception(htmlspecialchars(((((('Request URL did not match "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL')) . 'index.php?') . $this->previewKey) . '=') . $inputCode) . '"', 1294585190));
+ throw new \Exception(htmlspecialchars('Request URL did not match "' . \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . 'index.php?' . $this->previewKey . '=' . $inputCode . '"', 1294585190));
}
} else {
throw new \Exception('POST requests are incompatible with keyword preview.', 1294585191);
if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
// Select all records from this table in the database from the workspace
// This joins the online version with the offline version as tables A and B
- $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('A.uid, A.t3ver_oid, B.pid AS realpid', (($table . ' A,') . $table) . ' B', ((((((('A.pid=-1' . ($pageId != -1 ? ($table === 'pages' ? ' AND B.uid=' . intval($pageId) : ' AND B.pid=' . intval($pageId)) : '')) . ($wsid > -98 ? ' AND A.t3ver_wsid=' . $wsid : ($wsid === -98 ? ' AND A.t3ver_wsid!=0' : ''))) . ($filter === 1 ? ' AND A.t3ver_count=0' : ($filter === 2 ? ' AND A.t3ver_count>0' : ''))) . ($stage != -99 ? ' AND A.t3ver_stage=' . intval($stage) : '')) . ' AND B.pid>=0') . ' AND A.t3ver_oid=B.uid') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A')) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'), '', 'B.uid');
+ $recs = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('A.uid, A.t3ver_oid, B.pid AS realpid', $table . ' A,' . $table . ' B', 'A.pid=-1' . ($pageId != -1 ? ($table === 'pages' ? ' AND B.uid=' . intval($pageId) : ' AND B.pid=' . intval($pageId)) : '') . ($wsid > -98 ? ' AND A.t3ver_wsid=' . $wsid : ($wsid === -98 ? ' AND A.t3ver_wsid!=0' : '')) . ($filter === 1 ? ' AND A.t3ver_count=0' : ($filter === 2 ? ' AND A.t3ver_count>0' : '')) . ($stage != -99 ? ' AND A.t3ver_stage=' . intval($stage) : '') . ' AND B.pid>=0' . ' AND A.t3ver_oid=B.uid' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'A') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table, 'B'), '', 'B.uid');
if (count($recs)) {
$output[$table] = $recs;
}
$currentAdminStatus = $GLOBALS['BE_USER']->user['admin'];
$GLOBALS['BE_USER']->user['admin'] = 1;
// Select all workspaces that needs to be published / unpublished:
- $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,swap_modes,publish_time,unpublish_time', 'sys_workspace', (((('pid=0
+ $workspaces = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('uid,swap_modes,publish_time,unpublish_time', 'sys_workspace', 'pid=0
AND
- ((publish_time!=0 AND publish_time<=' . intval($GLOBALS['EXEC_TIME'])) . ')
- OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=') . intval($GLOBALS['EXEC_TIME'])) . '))') . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'));
+ ((publish_time!=0 AND publish_time<=' . intval($GLOBALS['EXEC_TIME']) . ')
+ OR (publish_time=0 AND unpublish_time!=0 AND unpublish_time<=' . intval($GLOBALS['EXEC_TIME']) . '))' . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('sys_workspace'));
foreach ($workspaces as $rec) {
// First, clear start/end time so it doesn't get select once again:
$fieldArray = $rec['publish_time'] != 0 ? array('publish_time' => 0) : array('unpublish_time' => 0);
$versions = \TYPO3\CMS\Backend\Utility\BackendUtility::selectVersionsOfRecord('pages', $onlineId, 'uid,pid,t3ver_label,t3ver_oid,t3ver_wsid,t3ver_id');
// If more than one was found...:
if (count($versions) > 1) {
- $selectorLabel = ('<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.label', TRUE)) . '</strong>';
+ $selectorLabel = '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.label', TRUE) . '</strong>';
// Create selector box entries:
$opt = array();
foreach ($versions as $vRow) {
if ($vRow['uid'] == $onlineId) {
// Live version
- $label = ('[' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.live', TRUE)) . ']';
+ $label = '[' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionSelect.live', TRUE) . ']';
} else {
- $label = ((((($vRow['t3ver_label'] . ' (') . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionId', TRUE)) . ' ') . $vRow['t3ver_id']) . ($vRow['t3ver_wsid'] != 0 ? ((' ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspaceId', TRUE)) . ' ') . $vRow['t3ver_wsid'] : '')) . ')';
+ $label = $vRow['t3ver_label'] . ' (' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:versionId', TRUE) . ' ' . $vRow['t3ver_id'] . ($vRow['t3ver_wsid'] != 0 ? ' ' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspaceId', TRUE) . ' ' . $vRow['t3ver_wsid'] : '') . ')';
}
- $opt[] = ((((('<option value="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $vRow['uid'])))) . '"') . ($id == $vRow['uid'] ? ' selected="selected"' : '')) . '>') . htmlspecialchars($label)) . '</option>';
+ $opt[] = '<option value="' . htmlspecialchars(\TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $vRow['uid']))) . '"' . ($id == $vRow['uid'] ? ' selected="selected"' : '') . '>' . htmlspecialchars($label) . '</option>';
}
// Add management link:
- $management = ((('<input type="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm', TRUE)) . '" onclick="window.location.href=\'') . htmlspecialchars(((($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version')) . 'cm1/index.php?table=pages&uid=') . $onlineId))) . '\';" />';
+ $management = '<input type="button" value="' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.mgm', TRUE) . '" onclick="window.location.href=\'' . htmlspecialchars(($GLOBALS['BACK_PATH'] . \TYPO3\CMS\Core\Extension\ExtensionManager::extRelPath('version') . 'cm1/index.php?table=pages&uid=' . $onlineId)) . '\';" />';
// Create onchange handler:
$onChange = 'window.location.href=this.options[this.selectedIndex].value;';
// Controls:
if ($id == $onlineId) {
- $controls .= ((('<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"')) . ' class="absmiddle" alt="" /> <strong>') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online', TRUE)) . '</strong>';
+ $controls .= '<img' . \TYPO3\CMS\Backend\Utility\IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/blinkarrow_left.gif', 'width="5" height="9"') . ' class="absmiddle" alt="" /> <strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.online', TRUE) . '</strong>';
} elseif (!$noAction) {
- $controls .= ((((('<a href="' . $GLOBALS['TBE_TEMPLATE']->issueCommand((((((('&cmd[pages][' . $onlineId) . '][version][swapWith]=') . $id) . '&cmd[pages][') . $onlineId) . '][version][action]=swap'), \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $onlineId)))) . '" class="nobr">') . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-version', array(
+ $controls .= '<a href="' . $GLOBALS['TBE_TEMPLATE']->issueCommand(('&cmd[pages][' . $onlineId . '][version][swapWith]=' . $id . '&cmd[pages][' . $onlineId . '][version][action]=swap'), \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('id' => $onlineId))) . '" class="nobr">' . \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-version-swap-version', array(
'title' => $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swapPage', TRUE),
'style' => 'margin-left:5px;vertical-align:bottom;'
- ))) . '<strong>') . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap', TRUE)) . '</strong></a>';
+ )) . '<strong>' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:ver.swap', TRUE) . '</strong></a>';
}
// Write out HTML code:
- return ((((((((('
+ return '
<!--
Version selector:
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
<tr>
- <td>' . $selectorLabel) . '</td>
+ <td>' . $selectorLabel . '</td>
<td>
- <select onchange="') . htmlspecialchars($onChange)) . '">
- ') . implode('', $opt)) . '
+ <select onchange="' . htmlspecialchars($onChange) . '">
+ ' . implode('', $opt) . '
</select></td>
- <td>') . $controls) . '</td>
- <td>') . $management) . '</td>
+ <td>' . $controls . '</td>
+ <td>' . $management . '</td>
</tr>
</table>
';
if (!$verPage) {
if (!count(\TYPO3\CMS\Backend\Utility\BackendUtility::countVersionsOfRecordsOnPage($GLOBALS['BE_USER']->workspace, $onlineId))) {
if ($GLOBALS['BE_USER']->workspaceVersioningTypeAccess(0)) {
- $onClick = $GLOBALS['TBE_TEMPLATE']->issueCommand(((('&cmd[pages][' . $onlineId) . '][version][action]=new&cmd[pages][') . $onlineId) . '][version][treeLevels]=0', \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
+ $onClick = $GLOBALS['TBE_TEMPLATE']->issueCommand('&cmd[pages][' . $onlineId . '][version][action]=new&cmd[pages][' . $onlineId . '][version][treeLevels]=0', \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array(
'id' => $onlineId
)));
- $onClick = ('window.location.href=\'' . $onClick) . '\'; return false;';
+ $onClick = 'window.location.href=\'' . $onClick . '\'; return false;';
// Write out HTML code:
- return ((((((('
+ return '
<!--
No version yet, create one?
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-versionSelector">
<tr>
- <td>' . $selectorLabel) . '</td>
- <td>') . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspace', TRUE)) . ': "') . htmlspecialchars($wsTitle)) . '"</td>
+ <td>' . $selectorLabel . '</td>
+ <td>' . $GLOBALS['LANG']->sL('LLL:EXT:version/locallang.xml:workspace', TRUE) . ': "' . htmlspecialchars($wsTitle) . '"</td>
<td>
- <input type="button" value="New version of page" name="_" onclick="') . htmlspecialchars($onClick)) . '" /></td>
+ <input type="button" value="New version of page" name="_" onclick="' . htmlspecialchars($onClick) . '" /></td>
</tr>
</table>
';