"Update" buttons of admin panel did not reload page in Firefox
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 2 Jun 2006 12:56:51 +0000 (12:56 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Fri, 2 Jun 2006 12:56:51 +0000 (12:56 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1503 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tsfebeuserauth.php

index 9a8c068..6cbaee3 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * Fix bug #3612: no c-prefix for URL fragment in menus (section index)
        * Fix bug #2493: TCE-forms don't skins icons / t3skin lacks undo.gif, csv.gif and savedoknew.gif (thanks to Clemens Riccabona for the latter)
        * Fix bugs #3326 and #3392: problems with php_uname()
+       * * "Update" buttons of admin panel did not reload page in Firefox
 
 2006-05-31  Ernesto Baschny <ernst@cron-it.de>
 
index cc96560..9c7ad1d 100755 (executable)
@@ -171,7 +171,9 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                                        <input type="hidden" name="TSFE_ADMIN_PANEL[display_top]" value="'.$this->uc['TSFE_adminConfig']['display_top'].'" />'.($this->extNeedUpdate?'<input type="submit" value="'.$this->extGetLL('update').'" />':'').'</td>
                        </tr>';
 
-               $query='';
+               $query = !t3lib_div::_GET('id') ? ('<input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />'.chr(10)) : '';
+                       // the dummy field is needed for Firefix: to force a page reload on submit with must change the form value with Javascript (see "onsubmit" attribute of the "form" element")
+               $query .= '<input type="hidden" name="TSFE_ADMIN_PANEL[DUMMY]" value="">';
                foreach(t3lib_div::_GET() as $k => $v)  {
                        if ($k != 'TSFE_ADMIN_PANEL')   {
                                if (is_array($v))       {
@@ -181,14 +183,14 @@ class t3lib_tsfeBeUserAuth extends t3lib_beUserAuth {
                                }
                        }
                }
+
                $out='
 <!--
        ADMIN PANEL
 -->
 <a name="TSFE_ADMIN"></a>
-<form name="TSFE_ADMIN_PANEL_FORM" action="'.htmlspecialchars(t3lib_div::getIndpEnv('SCRIPT_NAME')).'#TSFE_ADMIN" method="get" style="margin:0;">'.
-(!t3lib_div::_GET('id')?'<input type="hidden" name="id" value="'.$GLOBALS['TSFE']->id.'" />
-':'').$query.
+<form name="TSFE_ADMIN_PANEL_FORM" action="'.htmlspecialchars(t3lib_div::getIndpEnv('SCRIPT_NAME')).'#TSFE_ADMIN" method="get" style="margin:0;" onsubmit="document.forms.TSFE_ADMIN_PANEL_FORM[\'TSFE_ADMIN_PANEL[DUMMY]\'].value=Math.random().toString().substring(2,8)">'.
+$query.
 '      <table border="0" cellpadding="0" cellspacing="0" class="typo3-adminPanel" style="background-color:#f6f2e6; border: 1px solid black; z-index:0; position:absolute;">'.$header.$out.'
        </table>
 </form>';