[CLEANUP] Cleanup jumpToUrl() and unused JS in Backend
[Packages/TYPO3.CMS.git] / typo3 / sysext / func / Classes / Controller / PageFunctionsController.php
index 64c8f15..4bc82da 100644 (file)
@@ -86,19 +86,10 @@ class PageFunctionsController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
                // Main
                if ($this->id && $access) {
                        // JavaScript
-                       $this->doc->JScode = $this->doc->wrapScriptTags('
-                               script_ended = 0;
-                               function jumpToUrl(URL) {
-                                       window.location.href = URL;
-                               }
-                       ');
-                       $this->doc->postCode = $this->doc->wrapScriptTags('
-                               script_ended = 1;
-                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
-                       ');
+                       $this->doc->postCode = $this->doc->wrapScriptTags('if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';');
                        // Setting up the context sensitive menu:
                        $this->doc->getContextMenuCode();
-                       $this->doc->form = '<form action="index.php" method="post"><input type="hidden" name="id" value="' . $this->id . '" />';
+                       $this->doc->form = '<form action="' . htmlspecialchars(BackendUtility::getModuleUrl('web_func')) . '" method="post"><input type="hidden" name="id" value="' . htmlspecialchars($this->id) . '" />';
                        $vContent = $this->doc->getVersionSelector($this->id, TRUE);
                        if ($vContent) {
                                $this->content .= $this->doc->section('', $vContent);