Bug #23100 » 14998.diff
t3lib/class.t3lib_tcemain.php (Arbeitskopie) | ||
---|---|---|
}
|
||
}
|
||
$overrideValues = t3lib_div::_GP('overrideValues');
|
||
|
||
// Init copyMapping array:
|
||
$this->copyMappingArray = Array(); // Must clear this array before call from here to those functions: Contains mapping information between new and old id numbers.
|
||
// Branch, based on command
|
||
switch ($command) {
|
||
case 'move':
|
||
$this->moveRecord($table,$id,$value);
|
||
$this->moveRecord($table, $id, $value, $overrideValues);
|
||
break;
|
||
case 'copy':
|
||
if ($table === 'pages') {
|
||
$this->copyPages($id,$value);
|
||
} else {
|
||
$this->copyRecord($table,$id,$value,1);
|
||
$this->copyRecord($table, $id, $value, 1, $overrideValues);
|
||
}
|
||
break;
|
||
case 'localize':
|
||
... | ... | |
* @param string Table name to move
|
||
* @param integer Record uid to move
|
||
* @param integer Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
|
||
* @param array Optional: Array of values to override before inserting the record
|
||
* @return void
|
||
*/
|
||
function moveRecord($table,$uid,$destPid) {
|
||
function moveRecord($table, $uid, $destPid, $overrideValues = array()) {
|
||
global $TCA;
|
||
if ($TCA[$table]) {
|
||
... | ... | |
if (!count($workspaceAccessBlocked)) {
|
||
if ($WSversion['uid'] && !$recIsNewVersion && (int)$TCA[$table]['ctrl']['versioningWS']>=2) { // If the move operation is done on a versioned record, which is NOT new/deletd placeholder and versioningWS is in version 2, then...
|
||
$this->moveRecord_wsPlaceholders($table,$uid,$destPid,$WSversion['uid']);
|
||
$this->moveRecord_wsPlaceholders($table, $uid, $destPid, $WSversion['uid'], $overrideValues);
|
||
} else {
|
||
$this->moveRecord_raw($table,$uid,$destPid);
|
||
$this->moveRecord_raw($table, $uid, $destPid, $overrideValues);
|
||
}
|
||
} else {
|
||
$this->newlog("Move attempt failed due to workspace restrictions: ".implode(' // ',$workspaceAccessBlocked),1);
|
||
}
|
||
} else { // Live workspace - move it!
|
||
$this->moveRecord_raw($table,$uid,$destPid);
|
||
$this->moveRecord_raw($table, $uid, $destPid, $overrideValues);
|
||
}
|
||
} else {
|
||
$this->log($table,$uid,4,0,1,"Attempt to move record '%s' (%s) without having permissions to insert.",14,array($propArr['header'],$table.':'.$uid),$propArr['event_pid']);
|
||
... | ... | |
* @return void
|
||
* @see moveRecord()
|
||
*/
|
||
function moveRecord_wsPlaceholders($table,$uid,$destPid,$wsUid) {
|
||
function moveRecord_wsPlaceholders($table, $uid, $destPid, $wsUid, $overrideValues) {
|
||
global $TCA;
|
||
if ($plh = t3lib_BEfunc::getMovePlaceholder($table,$uid,'uid')) {
|
||
// If already a placeholder exists, move it:
|
||
$this->moveRecord_raw($table,$plh['uid'],$destPid);
|
||
$this->moveRecord_raw($table, $plh['uid'], $destPid, $overrideValues);
|
||
} else {
|
||
// First, we create a placeholder record in the Live workspace that represents the position to where the record is eventually moved to.
|
||
$newVersion_placeholderFieldArray = array();
|
||
... | ... | |
$this->insertDB($table,$id,$newVersion_placeholderFieldArray,FALSE); // Saving placeholder as 'original'
|
||
// Move the new placeholder from temporary root-level to location:
|
||
$this->moveRecord_raw($table,$this->substNEWwithIDs[$id],$destPid);
|
||
$this->moveRecord_raw($table, $this->substNEWwithIDs[$id], $destPid, $overrideValues);
|
||
// Move the workspace-version of the original to be the version of the move-to-placeholder:
|
||
$updateFields = array();
|
||
... | ... | |
* @param string Table name to move
|
||
* @param integer Record uid to move
|
||
* @param integer Position to move to: $destPid: >=0 then it points to a page-id on which to insert the record (as the first element). <0 then it points to a uid from its own table after which to insert it (works if
|
||
* @param array Optional: Array of values to override before inserting the record
|
||
* @return void
|
||
* @see moveRecord()
|
||
*/
|
||
function moveRecord_raw($table,$uid,$destPid) {
|
||
function moveRecord_raw($table, $uid, $destPid, $overrideValues = array()) {
|
||
global $TCA, $TYPO3_CONF_VARS;
|
||
$sortRow = $TCA[$table]['ctrl']['sortby'];
|
||
... | ... | |
if ($TCA[$table]['ctrl']['tstamp']) {
|
||
$updateFields[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
|
||
}
|
||
|
||
if(is_array($overrideValues)) {
|
||
$updateFields = array_merge($updateFields, $overrideValues);
|
||
}
|
||
if ($destPid>=0) { // insert as first element on page (where uid = $destPid)
|
||
if ($table!='pages' || $this->destNotInsideSelf($destPid,$uid)) {
|
typo3/sysext/t3skin/stylesheets/structure/module_web_page.css (Arbeitskopie) | ||
---|---|---|
padding-left: 20px;
|
||
padding-right: 20px;
|
||
position: relative;
|
||
min-width: 150px;
|
||
}
|
||
.t3-page-colHeader a {
|
typo3/sysext/cms/layout/class.tx_cms_layout.php (Arbeitskopie) | ||
---|---|---|
);
|
||
var $CType_labels=array(); // Used to store labels for CTypes for tt_content elements
|
||
var $itemLabels=array(); // Used to store labels for the various fields in tt_content elements
|
||
|
||
/**
|
||
* Loaded with the parent object
|
||
*
|
||
* @var SC_db_layout
|
||
*/
|
||
protected $parentObject;
|
||
/**
|
||
* Initializes the clipboard object
|
||
*
|
||
*/
|
||
function __construct() {
|
||
|
||
// Start clipboard
|
||
$this->clipObj = t3lib_div::makeInstance('t3lib_clipboard');
|
||
|
||
// Initialize - reads the clipboard content from the user session
|
||
$this->clipObj->initializeClipboard();
|
||
// Clipboard actions are handled:
|
||
$CB = t3lib_div::_GET('CB');
|
||
if ($this->cmd == 'setCB') {
|
||
|
||
// CBH is all the fields selected for the clipboard, CBC is the checkbox fields which were checked. By merging we get a full array of checked/unchecked elements
|
||
// This is set to the 'el' array of the CB after being parsed so only the table in question is registered.
|
||
$CB['el'] = $this->clipObj->cleanUpCBC(array_merge((array)t3lib_div::_POST('CBH'), (array)t3lib_div::_POST('CBC')), $this->cmd_table);
|
||
}
|
||
|
||
// If the clipboard is NOT shown, set the pad to 'normal'.
|
||
$CB['setP'] = 'normal';
|
||
|
||
// Execute commands.
|
||
$this->clipObj->setCmd($CB);
|
||
|
||
$this->clipObj->cleanCurrent();
|
||
$this->clipObj->endClipboard();
|
||
}
|
||
/*****************************************
|
||
... | ... | |
// Add new-icon link, header:
|
||
$newP = $this->newContentElementOnClick($id,$key,$lP);
|
||
$head[$key].= $this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP);
|
||
$head[$key] .= $this->tt_content_drawColHeader(
|
||
t3lib_BEfunc::getProcessedValue('tt_content', 'colPos', $key),
|
||
($this->doEdit && count($rowArr) ? '&edit[tt_content][' . $editUidList . ']=edit' . $pageTitleParamForAltDoc : ''),
|
||
$newP,
|
||
$key
|
||
);
|
||
$editUidList = '';
|
||
}
|
||
... | ... | |
<tr>
|
||
<td></td>
|
||
<td valign="top" colspan="3">'.
|
||
$this->tt_content_drawColHeader(t3lib_BEfunc::getProcessedValue('tt_content','colPos',$key), ($this->doEdit&&count($rowArr)?'&edit[tt_content]['.$editUidList.']=edit'.$pageTitleParamForAltDoc:''), $newP).
|
||
$this->tt_content_drawColHeader(
|
||
t3lib_BEfunc::getProcessedValue('tt_content', 'colPos', $key),
|
||
($this->doEdit && count($rowArr) ? '&edit[tt_content][' . $editUidList . ']=edit' . $pageTitleParamForAltDoc : ''),
|
||
$newP,
|
||
$key
|
||
) .
|
||
$theNewButton.
|
||
'<br /></td>
|
||
</tr>';
|
||
... | ... | |
* @param string New element params (Syntax: &edit[...] for alt_doc.php)
|
||
* @return string HTML table
|
||
*/
|
||
function tt_content_drawColHeader($colName,$editParams,$newParams) {
|
||
function tt_content_drawColHeader($colName, $editParams, $newParams, $colKey) {
|
||
$icons = '';
|
||
// Create command links:
|
||
... | ... | |
t3lib_iconWorks::getSpriteIcon('actions-document-open') .
|
||
'</a>';
|
||
}
|
||
$icons .= $this->getPasteLink($colKey);
|
||
}
|
||
if (strlen($icons)) {
|
||
$icons = '<div class="t3-page-colHeader-icons">' . $icons . '</div>';
|
||
... | ... | |
$out .= '</span>';
|
||
}
|
||
}
|
||
|
||
// Add copy/cut icons
|
||
$out .= $this->getCopyCutIcons($row);
|
||
|
||
// Add paste link
|
||
$out .= $this->getPasteLink($row['colPos'], $row['uid']);
|
||
|
||
// Display info from records fields:
|
||
$infoOutput = '';
|
||
if (count($info)) {
|
||
... | ... | |
return strip_tags($content);
|
||
}
|
||
|
||
/**
|
||
* Returns links to copy/cut a record
|
||
*
|
||
* @param array The current record data
|
||
* @return string The generated links
|
||
*/
|
||
protected function getCopyCutIcons($row) {
|
||
global $LANG;
|
||
|
||
$links = '';
|
||
if ($this->clipObj->current === 'normal') {
|
||
$isSel = (string)$this->clipObj->isSelected('tt_content', $row['uid']);
|
||
$url = htmlspecialchars(
|
||
$this->clipObj->selUrlDB(
|
||
'tt_content',
|
||
$row['uid'],
|
||
1,
|
||
($isSel == 'copy'),
|
||
array('returnUrl' => '')
|
||
)
|
||
);
|
||
$links .= '<a href="' . $url . '"
|
||
title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:cm.copy', TRUE) . '">' .
|
||
((!($isSel == 'copy')) ? t3lib_iconWorks::getSpriteIcon('actions-edit-copy') : t3lib_iconWorks::getSpriteIcon('actions-edit-copy-release')) .
|
||
'</a>';
|
||
|
||
$url = htmlspecialchars(
|
||
$this->clipObj->selUrlDB(
|
||
'tt_content',
|
||
$row['uid'],
|
||
0,
|
||
($isSel == 'cut'),
|
||
array('returnUrl' => '')
|
||
)
|
||
);
|
||
$links .= '<a href="' . $url . '"
|
||
title="' . $LANG->sL('LLL:EXT:lang/locallang_core.php:cm.cut', TRUE) . '">'.
|
||
((!($isSel == 'cut')) ? t3lib_iconWorks::getSpriteIcon('actions-edit-cut') : t3lib_iconWorks::getSpriteIcon('actions-edit-cut-release')) .
|
||
'</a>';
|
||
}
|
||
return $links;
|
||
}
|
||
|
||
/**
|
||
* Returns a link to paste elements from clipboard into a page or
|
||
* after a content element if the second parameter is set
|
||
*
|
||
* @param int The ID of the column the elements in clipboard should get pasted into
|
||
* @param int Optional: The ID of an element the elements in clipboard should get pasted after
|
||
* @return string The generated link
|
||
*/
|
||
protected function getPasteLink($colPos, $insertAfterUid = FALSE) {
|
||
global $LANG, $BACK_PATH;
|
||
//http://dev.rf.office.typoheads.org/typo3/tce_db.php?redirect=%2Ftypo3%2Fdb_list.php%3Fid%3D1&vC=ae80ad0906&prErr=1&uPT=1&CB[paste]=tt_content%7C-1543&CB[pad]=normal
|
||
$elFromTable = $this->clipObj->elFromTable('tt_content');
|
||
if (count($elFromTable)) {
|
||
$pasteUrl = $BACK_PATH . 'tce_db.php?&vC=' . $GLOBALS['BE_USER']->veriCode() . '&prErr=1&uPT=1&';
|
||
$redirectUrl = 'sysext/cms/layout/db_layout.php?&id=' . $this->id . '&SET[function]=' . $this->parentObject->MOD_SETTINGS['function'];
|
||
foreach ($elFromTable as $info=>$val) {
|
||
$id = $this->id;
|
||
if($insertAfterUid) {
|
||
$id = '-' . $insertAfterUid;
|
||
}
|
||
list($table, $uid) = explode('|', $info);
|
||
$pasteUrl .= '&CB[paste]=' . $table . '|' . $id . '&CB[pad]=normal';
|
||
|
||
}
|
||
$pasteUrl .= '&overrideValues[colPos]=' . $colPos;
|
||
$pasteUrl .= '&redirect=' . urlencode($redirectUrl);
|
||
if($insertAfterUid) {
|
||
$title = $LANG->sL('LLL:EXT:lang/locallang_core.php:cm.pasteafter', TRUE);
|
||
} else {
|
||
$title = $LANG->sL('LLL:EXT:lang/locallang_core.php:cm.pasteinto', TRUE);
|
||
}
|
||
return '<a
|
||
href="' . htmlspecialchars($pasteUrl) . '"
|
||
title="' . $title . '"
|
||
>'. t3lib_iconWorks::getSpriteIcon('actions-document-paste-after') . '</a>';
|
||
}
|
||
}
|
||
|
||
/**
|
||
* Sets the parent object of this tx_cms_layout instance
|
||
*
|
||
* @param SC_db_layout The parent object
|
||
* @return void
|
||
*/
|
||
public function setParentObject(SC_db_layout $parentObject) {
|
||
$this->parentObject = $parentObject;
|
||
}
|
||
}
|
||
typo3/sysext/cms/layout/db_layout.php (Arbeitskopie) | ||
---|---|---|
// Initialize list object (see "class.db_layout.inc"):
|
||
$dblist = t3lib_div::makeInstance('tx_cms_layout');
|
||
$dblist->backPath = $BACK_PATH;
|
||
$dblist->setParentObject($this);
|
||
$dblist->thumbs = $this->imagemode;
|
||
$dblist->no_noWrap = 1;
|
||
$dblist->descrTable = $this->descrTable;
|
typo3/sysext/install/updates/class.tx_coreupdates_compressionlevel.php (Arbeitskopie) | ||
---|---|---|
* @return boolean whether an update is needed (true) or not (false)
|
||
*/
|
||
public function checkForUpdate(&$description) {
|
||
$description = '<strong>TYPO3_CONF_VARS[BE][compressionLevel] is enabled.</strong><br />
|
||
$description = '<p><strong>TYPO3_CONF_VARS[BE][compressionLevel] is enabled.</strong><br />
|
||
In TYPO3 4.4, compressionLevel was expanded to include automatic gzip compression of JavaScript and CSS stylessheet files.
|
||
<strong>To prevent the TYPO3 backend from being unusable, you must include the relevant lines from misc/advanced.htaccess.</strong>';
|
||
<strong>To prevent the TYPO3 backend from being unusable, you must include the relevant lines from misc/advanced.htaccess.</strong></p>';
|
||
if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']) > 0) {
|
||
return TRUE;
|
||
}
|
||
... | ... | |
* @return string HTML output
|
||
*/
|
||
public function getUserInput($inputPrefix) {
|
||
$content = '<strong>This configuration cannot be fixed automatically and requires a manual update.</strong> Please include the following lines from misc/advanced.htaccess on top of your .htacess file.
|
||
$content = '<p><strong>This configuration cannot be fixed automatically and requires a manual update.</strong> Please include the following lines from misc/advanced.htaccess on top of your .htacess file.
|
||
<br /><br />
|
||
<pre>
|
||
<FilesMatch "\.js\.gzip$">
|
||
... | ... | |
AddType "text/css" .gzip
|
||
</FilesMatch>
|
||
AddEncoding gzip .gzip
|
||
</pre>';
|
||
</pre></p>';
|
||
return $content;
|
||
}
|
typo3/sysext/install/Resources/Private/Templates/UpdateWizardParts.html (Arbeitskopie) | ||
---|---|---|
</ol>
|
||
</fieldset>
|
||
<!-- ###SINGLEUPDATEWIZARDBOX### begin -->
|
||
<h3>###IDENTIFIER###</h3>
|
||
<h4>###IDENTIFIER###</h4>
|
||
###EXPLANATION###
|
||
<fieldset class="t3-install-form-submit">
|
||
<ol>
|
||
... | ... | |
<!-- ###SINGLEUPDATEWIZARDBOX### end -->
|
||
</form>
|
||
<!-- ###UPDATEWIZARDBOXES### end -->
|
||
<h3>###FINALSTEP###</h3>
|
||
<h4>###FINALSTEP###</h4>
|
||
###FINALSTEPEXPLANATION###
|
||
<a href="index.php?TYPO3_INSTALL[type]=database&TYPO3_INSTALL[database_type]=cmpFile|CURRENT_TABLES#t3-install-bottom">###COMPAREDATABASE###<span class="t3-install-form-button-icon-positive"> </span></a>
|
||
<!-- ###UPDATESAVAILABLE### end -->
|
||
... | ... | |
</ol>
|
||
</fieldset>
|
||
<p>
|
||
<strong>
|
||
<h4>
|
||
###IDENTIFIER###
|
||
</strong>
|
||
</h4>
|
||
</p>
|
||
###IDENTIFIERMETHOD###
|
||
<!-- ###UPDATESAVAILABLE### end -->
|
typo3/sysext/install/Resources/Public/Stylesheets/general.css (Arbeitskopie) | ||
---|---|---|
margin: 0.7em 0 1.5em
|
||
}
|
||
h4 {
|
||
font-size: 110%;
|
||
margin: 0;
|
||
}
|
||
.clearfix:after {
|
||
content: ".";
|
||
display: block;
|