Project

General

Profile

Bug #18673 » 8205_shortcut4_4.2.diff

Administrator Admin, 2008-10-31 19:14

View differences:

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.rawurlencode(window.location.href, 1);").'">'.$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.rawurlencode(window.location.href, 1);
}
";
} 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.rawurlencode(window.location.href, 1); ";
}
$opt[]='<option value="'.htmlspecialchars($js).'">'.$this->clLabel('delete','rm').'</option>';
}
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.rawurlencode(id, 1);
}
function changeWorkspace(workspaceId) { //
window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencode(workspaceId);
window.location.href="alt_shortcut.php?changeWorkspace="+top.rawurlencode(workspaceId, 1);
}
function changeWorkspacePreview(newstate) { //
window.location.href="alt_shortcut.php?changeWorkspacePreview="+newstate;
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.rawurlencode($F('search-query'), 1), {
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.rawurlencode(workspaceId, 1);
}
function changeWorkspacePreview(newstate) {
window.location.href = 'backend.php?changeWorkspacePreview=' + newstate;
}
}
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.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)";
}
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.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)";
}
if($subModuleData['link'] && $this->linkModules) {
......
}
if(!$GLOBALS['BE_USER']->uc['condensedMode'] && $subModuleData['parentNavigationFrameScript']) {
$additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'])";
$additionalJavascript = "+'&id='+top.rawurlencode(top.fsMod.recentIds['".$parentModuleName."'], 1)";
$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/backend.php (working copy)
$this->js .= '
/**
* Function similar to PHPs rawurlencode();
* first argument: string to rawurlencode
* second argument: boolean, if set, host information will be removed
*/
function rawurlencode(str) { //
function rawurlencode() { //
var str = arguments[0];
if (arguments[1]) {
str = removeHost(str);
}
var output = escape(str);
output = str_replace("*","%2A", output);
output = str_replace("+","%2B", output);
......
output = str_replace("@","%40", output);
return output;
}
/**
* Function to remove host information;
*/
function removeHost(str) { //
var host = "' . t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST') . '";
return str_replace(host,"",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.rawurlencode(top.fsMod.recentIds['".$moduleName."'], 1)";}
// If there is a script to link to (and linking is not disabled.
if ($link && !$dontLink) {
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.rawurlencode(".$this->frameLocation('docRef.document').', 1)':'').';'.
($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.rawurlencode('.$this->frameLocation($loc.'.document').', 1); 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.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'&edit[".$table."][".$uid."]=edit".$addParam."';}";
}
}
if (!$editOnClick) {
......
$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.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'&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.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'".
"&cmd[".$table.']['.$uid.'][delete]=1&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
return $this->linkItem(
......
* @return array Item array, element in $menuItems
*/
function DB_changeFlag($table, $rec, $flagField, $title, $name, $iconRelPath='gfx/') {
$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').")+'".
"&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
$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').", 1)+'".
"&data[".$table.']['.$uid.']['.$flagField.']='.($rec[$flagField]?0:1).'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode()."';hideCM();}";
return $this->linkItem(
$title,
$this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,$iconRelPath.'button_'.($rec[$flagField]?'un':'').$name.'.gif','width="11" height="10"').' alt="" />'),
$editOnClick.'return false;',
1
);
return $this->linkItem(
$title,
$this->excludeIcon('<img'.t3lib_iconWorks::skinImg($this->PH_backPath,$iconRelPath.'button_'.($rec[$flagField]?'un':'').$name.'.gif','width="11" height="10"').' alt="" />'),
$editOnClick.'return false;',
1
);
}
......
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.rawurlencode(".$this->frameLocation($loc.'.document').", 1)").";}";
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.rawurlencode(".$this->frameLocation($loc.'.document').", 1)+'".
"&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.rawurlencode(".$this->frameLocation($loc.'.document').', 1); 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.rawurlencode('.$this->frameLocation($loc.'.document').', 1)+"'.
'&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.rawurlencode('.$this->frameLocation($loc.'.document').', 1)+"'.
'&file['.$action.'][0][data]='.$srcPath.'&file['.$action.'][0][target]='.$dstPath.'&prErr=1&vC='.$GLOBALS['BE_USER']->veriCode().'";hideCM();}';
return $this->linkItem(
(7-7/10)