Fixed bug #11291 and #11292: buttons "save" and "save and view" do not work in wizard...
authorRupert Germann <rupi@gmx.li>
Tue, 9 Jun 2009 21:02:09 +0000 (21:02 +0000)
committerRupert Germann <rupi@gmx.li>
Tue, 9 Jun 2009 21:02:09 +0000 (21:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5577 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/wizard_rte.php

index 3d9951c..c62d857 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2009-06-09  Rupert Germann  <rupi@gmx.li>
 
        * Fixed bug #11285: functions flushByTag and flushByTags in caching framework are very unefficient
+       * Fixed bug #11291 and #11292: buttons "save" and "save and view" do not work in wizard_rte.php
 
 2009-06-09  Oliver Hader  <oliver@typo3.org>
 
index e76e5da..910f619 100644 (file)
@@ -89,6 +89,7 @@ class SC_wizard_rte {
                // Internal, static: GPvars
        var $P;                                         // Wizard parameters, coming from TCEforms linking to the wizard.
        var $popView;                           // If set, launch a new window with the current records pid.
+       var $R_URI;                                     // Set to the URL of this script including variables which is needed to re-display the form. See main()
 
 
 
@@ -102,6 +103,7 @@ class SC_wizard_rte {
                        // Setting GPvars:
                $this->P = t3lib_div::_GP('P');
                $this->popView = t3lib_div::_GP('popView');
+               $this->R_URI = t3lib_div::linkThisScript(array('popView' => ''));
 
                        // "Module name":
                $this->MCONF['name']='xMOD_wizard_rte.php';
@@ -195,7 +197,7 @@ class SC_wizard_rte {
                                </table>';
 
                                // Adding hidden fields:
-                       $formContent.= '<input type="hidden" name="redirect" value="'.htmlspecialchars($R_URI).'" />
+                       $formContent.= '<input type="hidden" name="redirect" value="'.htmlspecialchars($this->R_URI).'" />
                                                <input type="hidden" name="_serialNumber" value="'.md5(microtime()).'" />';
 
 
@@ -249,7 +251,6 @@ class SC_wizard_rte {
 
                if ($this->P['table'] && $this->P['field'] && $this->P['uid'] && $this->checkEditAccess($this->P['table'],$this->P['uid'])) {
                        $closeUrl = $this->P['returnUrl'];
-                       $R_URI=t3lib_div::linkThisScript(array('popView' => ''));
 
                        // Getting settings for the undo button:
                        $undoButton = 0;
@@ -280,7 +281,7 @@ class SC_wizard_rte {
 
                        // Undo/Revert:
                        if ($undoButton)        {
-                               $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'show_rechis.php?element=' . rawurlencode($this->P['table'] . ':' . $this->P['uid']) . '&revert=' . rawurlencode('field:' . $this->P['field']) . '&sumUp=-1&returnUrl=' . rawurlencode($R_URI) . '\'; return false;') . '">' .
+                               $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars('window.location.href=\'show_rechis.php?element=' . rawurlencode($this->P['table'] . ':' . $this->P['uid']) . '&revert=' . rawurlencode('field:' . $this->P['field']) . '&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;') . '">' .
                                        '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/undo.gif') . ' class="c-inputButton" title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('rte_undoLastChange'), t3lib_BEfunc::calcAge(time() - $undoButtonR['tstamp'], $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.php:labels.minutesHoursDaysYears')))) . '" alt="" />' .
                                        '</a>';
                        }