Bug #18673 » 8205_shortcut4_latest.diff
t3lib/class.t3lib_clipboard.php (working copy) | ||
---|---|---|
}
|
||
// Edit:
|
||
if (!$this->fileMode && $elCount) {
|
||
$opt[]='<option value="'.htmlspecialchars("window.location.href='".$this->editUrl()."&returnUrl='+top.rawurlencode(window.location.href);").'">'.$this->clLabel('edit','rm').'</option>';
|
||
$opt[]='<option value="' . htmlspecialchars("window.location.href='" . $this->editUrl() . "&returnUrl='+top.rawurlencodeAndRemoveSiteUrl(window.location.href);") . '">' . $this->clLabel('edit', 'rm') . '</option>';
|
||
}
|
||
// Delete:
|
||
if ($elCount) {
|
||
if($GLOBALS['BE_USER']->jsConfirmation(4)) {
|
||
$js = "
|
||
if(confirm(".$GLOBALS['LANG']->JScharCode(sprintf($LANG->sL('LLL:EXT:lang/locallang_core.php:mess.deleteClip'),$elCount)).")){
|
||
window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href);
|
||
window.location.href='" . $this->deleteUrl(0, $this->fileMode ? 1 : 0) . "&redirect='+top.rawurlencodeAndRemoveSiteUrl(window.location.href);
|
||
}
|
||
";
|
||
} else {
|
||
$js = " window.location.href='".$this->deleteUrl(0,$this->fileMode?1:0)."&redirect='+top.rawurlencode(window.location.href); ";
|
||
$js = " window.location.href='" . $this->deleteUrl(0, $this->fileMode ? 1 : 0) . "&redirect='+top.rawurlencodeAndRemoveSiteUrl(window.location.href); ";
|
||
}
|
||
$opt[]='<option value="'.htmlspecialchars($js).'">'.$this->clLabel('delete','rm').'</option>';
|
||
}
|
typo3/alt_clickmenu.php (working copy) | ||
---|---|---|
function urlRefForCM($url,$retUrl='',$hideCM=1,$overrideLoc='') {
|
||
$loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
|
||
$editOnClick= ($overrideLoc ? 'var docRef='.$overrideLoc : 'var docRef=(top.content.list_frame)?top.content.list_frame:'.$loc).'; docRef.location.href=top.TS.PATH_typo3+\''.$url.'\''.
|
||
($retUrl?"+'&".$retUrl."='+top.rawurlencode(".$this->frameLocation('docRef.document').')':'').';'.
|
||
($retUrl ? "+'&" . $retUrl . "='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation('docRef.document') . ')' :'') . ';' .
|
||
($hideCM?'return hideCM();':'');
|
||
return $editOnClick;
|
||
}
|
||
... | ... | |
} else {
|
||
$conf = $loc;
|
||
}
|
||
$editOnClick = 'if('.$conf.'){'.$loc.'.location.href=top.TS.PATH_typo3+\''.$this->clipObj->pasteUrl($table,$uid,0).'&redirect=\'+top.rawurlencode('.$this->frameLocation($loc.'.document').'); hideCM();}';
|
||
$editOnClick = 'if(' . $conf . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . $this->clipObj->pasteUrl($table, $uid, 0) . '&redirect=\'+top.rawurlencodeAndRemoveSiteUrl(' . $this->frameLocation($loc . '.document') . '); hideCM();}';
|
||
return $this->linkItem(
|
||
$this->label('paste'.$type),
|
||
... | ... | |
if ($BE_USER->uc['classicPageEditMode'] || !t3lib_extMgm::isLoaded('cms')) {
|
||
$addParam='&editRegularContentFromId='.intval($this->iParts[1]);
|
||
} else {
|
||
$editOnClick="top.fsMod.recentIds['web']=".intval($this->iParts[1]).";top.goToModule('".$pageModule."',1);";
|
||
$editOnClick='if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'&edit[".$table."][".$uid."]=edit".$addParam."';}";
|
||
}
|
||
}
|
||
if (!$editOnClick) {
|
||
$editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][".$uid."]=edit".$addParam."';}";
|
||
$editOnClick='if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'alt_doc.php?returnUrl='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'&edit[".$table."][".$uid."]=edit".$addParam."';}";
|
||
}
|
||
return $this->linkItem(
|
||
... | ... | |
$loc='top.content'.(!$this->alwaysContentFrame?'.list_frame':'');
|
||
$editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'".
|
||
($this->listFrame?
|
||
"alt_doc.php?returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'&edit[".$table."][-".$uid."]=new'":
|
||
"alt_doc.php?returnUrl='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'&edit[".$table."][-".$uid."]=new'":
|
||
'db_new.php?id='.intval($uid)."'").
|
||
';}';
|
||
... | ... | |
} else {
|
||
$conf = '1==1';
|
||
}
|
||
$editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
|
||
$editOnClick = 'if(' . $loc . " && " . $conf . " ){" . $loc . ".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'".
|
||
"&cmd[".$table.']['.$uid.'][delete]=1&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
|
||
return $this->linkItem(
|
||
... | ... | |
$uid = $rec['_ORIG_uid'] ? $rec['_ORIG_uid'] : $rec['uid'];
|
||
$editOnClick='';
|
||
$loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
|
||
$editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
|
||
$editOnClick = 'if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'tce_db.php?redirect='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'" .
|
||
"&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
|
||
return $this->linkItem(
|
||
... | ... | |
function FILE_launch($path,$script,$type,$image,$noReturnUrl=FALSE) {
|
||
$loc='top.content'.(!$this->alwaysContentFrame?'.list_frame':'');
|
||
$editOnClick='if('.$loc.'){'.$loc.".location.href=top.TS.PATH_typo3+'".$script.'?target='.rawurlencode($path).($noReturnUrl ? "'" : "&returnUrl='+top.rawurlencode(".$this->frameLocation($loc.'.document').")").";}";
|
||
$editOnClick = 'if(' . $loc . '){' . $loc . ".location.href=top.TS.PATH_typo3+'".$script.'?target=' . rawurlencode($path) . ($noReturnUrl ? "'" : "&returnUrl='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")") . ";}";
|
||
return $this->linkItem(
|
||
$this->label($type),
|
||
... | ... | |
} else {
|
||
$conf = '1==1';
|
||
}
|
||
$editOnClick='if('.$loc." && ".$conf." ){".$loc.".location.href=top.TS.PATH_typo3+'tce_file.php?redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').")+'".
|
||
$editOnClick = 'if(' . $loc . " && " . $conf . " ){" . $loc . ".location.href=top.TS.PATH_typo3+'tce_file.php?redirect='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') . ")+'" .
|
||
"&file[delete][0][data]=".rawurlencode($path).'&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
|
||
return $this->linkItem(
|
||
... | ... | |
}
|
||
$editOnClick='if('.$conf.'){'.$loc.".location.href=top.TS.PATH_typo3+'".$this->clipObj->pasteUrl('_FILE',$path,0).
|
||
"&redirect='+top.rawurlencode(".$this->frameLocation($loc.'.document').'); hideCM();}';
|
||
"&redirect='+top.rawurlencodeAndRemoveSiteUrl(" . $this->frameLocation($loc . '.document') .'); hideCM();}';
|
||
return $this->linkItem(
|
||
$this->label('pasteinto'),
|
||
... | ... | |
$negativeSign = ($into == 'into') ? '' : '-';
|
||
$editOnClick='';
|
||
$loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
|
||
$editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').')+"'.
|
||
$editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_db.php?redirect="+top.rawurlencodeAndRemoveSiteUrl(' . $this->frameLocation($loc . '.document') . ')+"' .
|
||
'&cmd[pages]['.$srcUid.']['.$action.']='.$negativeSign.$dstUid.'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode().'";hideCM();}';
|
||
return $this->linkItem(
|
||
... | ... | |
function dragDrop_copymovefolder($srcPath,$dstPath,$action) {
|
||
$editOnClick='';
|
||
$loc='top.content'.($this->listFrame && !$this->alwaysContentFrame ?'.list_frame':'');
|
||
$editOnClick='if('.$loc.'){'.$loc.'.document.location=top.TS.PATH_typo3+"tce_file.php?redirect="+top.rawurlencode('.$this->frameLocation($loc.'.document').')+"'.
|
||
$editOnClick = 'if(' . $loc . '){' . $loc . '.document.location=top.TS.PATH_typo3+"tce_file.php?redirect="+top.rawurlencodeAndRemoveSiteUrl(' . $this->frameLocation($loc . '.document') .')+"' .
|
||
'&file['.$action.'][0][data]='.$srcPath.'&file['.$action.'][0][target]='.$dstPath.'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode().'";hideCM();}';
|
||
return $this->linkItem(
|
typo3/alt_shortcut.php (working copy) | ||
---|---|---|
window.location.href="alt_shortcut.php?editShortcut="+uid;
|
||
}
|
||
function submitEditPage(id) { //
|
||
window.location.href="alt_shortcut.php?editPage="+top.rawurlencode(id);
|
||
window.location.href="alt_shortcut.php?editPage="+top.rawurlencodeAndRemoveSiteUrl(id);
|
||
}
|
||
function changeWorkspace(workspaceId) { //
|
||
window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencode(workspaceId);
|
||
window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencodeAndRemoveSiteUrl(workspaceId);
|
||
}
|
||
function changeWorkspacePreview(newstate) { //
|
||
window.location.href="alt_shortcut.php?changeWorkspacePreview="+newstate;
|
typo3/backend.php (working copy) | ||
---|---|---|
/**
|
||
* Function similar to PHPs rawurlencode();
|
||
*/
|
||
function rawurlencode(str) { //
|
||
function rawurlencode(str) {
|
||
var output = escape(str);
|
||
output = str_replace("*","%2A", output);
|
||
output = str_replace("+","%2B", output);
|
||
... | ... | |
output = str_replace("@","%40", output);
|
||
return output;
|
||
}
|
||
|
||
/**
|
||
* Function to similar to PHPs rawurlencode() which removes TYPO3_SITE_URL;
|
||
*/
|
||
function rawurlencodeAndRemoveSiteUrl(str) { //
|
||
var siteUrl = "' . t3lib_div::getIndpEnv('TYPO3_SITE_URL') . '";
|
||
return rawurlencode(str_replace(siteUrl, \'\', str));
|
||
}
|
||
|
||
/**
|
||
* String-replace function
|
||
*/
|
||
function str_replace(match,replace,string) { //
|
typo3/class.alt_menu_functions.inc (working copy) | ||
---|---|---|
// Setting additional JavaScript if frameset script:
|
||
$addJS = '';
|
||
if ($moduleInfo['navFrameScript']) {$addJS="+'&id='+top.rawurlencode(top.fsMod.recentIds['".$moduleName."'])";}
|
||
if ($moduleInfo['navFrameScript']) {$addJS = "+'&id='+top.rawurlencodeAndRemoveSiteUrl(top.fsMod.recentIds['" . $moduleName . "'])";}
|
||
// If there is a script to link to (and linking is not disabled.
|
||
if ($link && !$dontLink) {
|
typo3/classes/class.modulemenu.php (working copy) | ||
---|---|---|
$additionalJavascript = '';
|
||
if($moduleData['parentNavigationFrameScript']) {
|
||
$parentModuleName = substr($moduleData['name'], 0, strpos($moduleData['name'], '_'));
|
||
$additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])";
|
||
$additionalJavascript = "+'&id='+top.rawurlencodeAndRemoveSiteUrl(top.fsMod.recentIds['" . $parentModuleName . "'])";
|
||
}
|
||
if($moduleData['link'] && $this->linkModules) {
|
||
... | ... | |
// Setting additional JavaScript if frameset script:
|
||
$additionalJavascript = '';
|
||
if($subModuleData['parentNavigationFrameScript']) {
|
||
$additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])";
|
||
$additionalJavascript = "+'&id='+top.rawurlencodeAndRemoveSiteUrl(top.fsMod.recentIds['" . $parentModuleName . "'])";
|
||
}
|
||
if($subModuleData['link'] && $this->linkModules) {
|
||
... | ... | |
}
|
||
if(!$GLOBALS['BE_USER']->uc['condensedMode'] && $subModuleData['parentNavigationFrameScript']) {
|
||
$additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])";
|
||
$additionalJavascript = "+'&id='+top.rawurlencodeAndRemoveSiteUrl(top.fsMod.recentIds['" . $parentModuleName . "'])";
|
||
$submoduleNavigationFrameScript = $subModuleData['navigationFrameScript'] ? $subModuleData['navigationFrameScript'] : $subModuleData['parentNavigationFrameScript'];
|
||
$submoduleNavigationFrameScript = t3lib_div::resolveBackPath($submoduleNavigationFrameScript);
|
typo3/classes/class.shortcutmenu.php (working copy) | ||
---|---|---|
$shortcutName = 'Shortcut'; // default name
|
||
$shortcutNamePrepend = '';
|
||
$url = urldecode(t3lib_div::_POST('url'));
|
||
$url = t3lib_div::_POST('url');
|
||
$module = t3lib_div::_POST('module');
|
||
$motherModule = t3lib_div::_POST('motherModName');
|
||
... | ... | |
}
|
||
// Lookup the title of this page and use it as default description
|
||
$pageId = $this->getLinkedPageId($url);
|
||
$pageId = $shortcut['recordid'] ? $shortcut['recordid'] : $this->getLinkedPageId($url);
|
||
if(t3lib_div::testInt($pageId)) {
|
||
$page = t3lib_BEfunc::getRecord('pages', $pageId);
|
typo3/js/backendsearch.js (working copy) | ||
---|---|---|
* calls the actual clear cache URL using an asynchronious HTTP request
|
||
*/
|
||
invokeSearch: function() {
|
||
new Ajax.Request('alt_shortcut.php?ajax=1&editPage=' + top.rawurlencode($F('search-query')), {
|
||
new Ajax.Request('alt_shortcut.php?ajax=1&editPage=' + top.rawurlencodeAndRemoveSiteUrl($F('search-query')), {
|
||
method: 'get',
|
||
requestHeaders: {Accept: 'application/json'},
|
||
onSuccess: function(transport) {
|
typo3/js/workspaces.js (working copy) | ||
---|---|---|
function changeWorkspace(workspaceId) {
|
||
window.location.href = 'backend.php?changeWorkspace=' + top.rawurlencode(workspaceId);
|
||
window.location.href = 'backend.php?changeWorkspace=' + top.rawurlencodeAndRemoveSiteUrl(workspaceId);
|
||
}
|
||
function changeWorkspacePreview(newstate) {
|
||
window.location.href = 'backend.php?changeWorkspacePreview=' + newstate;
|
||
}
|
||
}
|