[FEATURE] Use mod dispatcher for setup extension
authorSusanne Moog <typo3@susannemoog.de>
Fri, 15 Jun 2012 16:27:33 +0000 (18:27 +0200)
committerOliver Hader <oliver.hader@typo3.org>
Fri, 15 Jun 2012 16:40:44 +0000 (18:40 +0200)
Use the backend module dispatcher for the
setup (user settings) extension.

Change-Id: I3b5d3c0a2d1b331e22f6389ed147c43303364cf6
Resolves: #38096
Releases: 6.0
Reviewed-on: http://review.typo3.org/12102
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/rsaauth/hooks/class.tx_rsaauth_usersetuphook.php
typo3/sysext/setup/ext_emconf.php
typo3/sysext/setup/mod/conf.php
typo3/sysext/setup/mod/index.php

index 66f69e5..26a55cd 100644 (file)
@@ -99,7 +99,7 @@ class tx_rsaauth_usersetuphook {
                        $storage->put($keyPair->getPrivateKey());
 
                        // Add form tag
-                       $form = '<form action="index.php" method="post" name="usersetup" enctype="application/x-www-form-urlencoded" onsubmit="tx_rsaauth_encryptUserSetup();">';
+                       $form = '<form action="' . t3lib_BEfunc::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded" onsubmit="tx_rsaauth_encryptUserSetup();">';
                        // Add RSA hidden fields
                        $form .= '<input type="hidden" id="rsa_n" name="n" value="' . htmlspecialchars($keyPair->getPublicKeyModulus()) . '" />';
                        $form .= '<input type="hidden" id="rsa_e" name="e" value="' . sprintf('%x', $keyPair->getExponent()) . '" />';
index 098fa1b..15c7b59 100755 (executable)
@@ -11,7 +11,7 @@
 ***************************************************************/
 
 $EM_CONF[$_EXTKEY] = array(
-       'title' => 'User>Setup',
+       'title' => 'User>User Settings',
        'description' => 'Allows users to edit a limited set of options for their user profile, eg. preferred language and their name and email address.',
        'category' => 'module',
        'shy' => 1,
index a7ff540..4646e39 100755 (executable)
@@ -1,11 +1,9 @@
 <?php
-define('TYPO3_MOD_PATH', 'sysext/setup/mod/');
-$BACK_PATH='../../../';
+$MCONF['script'] = '_DISPATCH';
 
 $MLANG['default']['tabs_images']['tab'] = 'setup.gif';
 $MLANG['default']['ll_ref'] = 'LLL:EXT:setup/mod/locallang_mod.xml';
 
-$MCONF['script'] = 'index.php';
 $MCONF['access'] = 'group,user';
 $MCONF['name'] = 'user_setup';
 ?>
\ No newline at end of file
index 8c84f74..908c477 100755 (executable)
  * XHTML compatible.
  */
 
-unset($MCONF);
-require('conf.php');
-require($BACK_PATH.'init.php');
-
-
-
-
-
-
-
-
-
-
-
-
-
-
 /**
  * Script class for the Setup module
  *
@@ -291,7 +274,7 @@ class SC_mod_user_setup_index {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('templates/setup.html');
-               $this->doc->form = '<form action="index.php" method="post" name="usersetup" enctype="application/x-www-form-urlencoded">';
+               $this->doc->form = '<form action="' . t3lib_BEfunc::getModuleUrl('user_setup') . '" method="post" name="usersetup" enctype="application/x-www-form-urlencoded">';
                $this->doc->tableLayout = array(
                        'defRow' => array(
                                '0' => array('<td class="td-label">','</td>'),
@@ -789,7 +772,7 @@ class SC_mod_user_setup_index {
                                }
                        }
                        if (count($opt)) {
-                               $this->simulateSelector = '<select id="field_simulate" name="simulateUser" onchange="window.location.href=\'index.php?simUser=\'+this.options[this.selectedIndex].value;"><option></option>' . implode('', $opt) . '</select>';
+                               $this->simulateSelector = '<select id="field_simulate" name="simulateUser" onchange="window.location.href=\'' . t3lib_BEfunc::getModuleUrl('user_setup') . '&simUser=\'+this.options[this.selectedIndex].value;"><option></option>' . implode('', $opt) . '</select>';
                        }
                }
 
@@ -909,7 +892,6 @@ $SOBE->simulateUser();
 $SOBE->storeIncomingData();
 
 // These includes MUST be afterwards the settings are saved...!
-require ($BACK_PATH.'template.php');
 $LANG->includeLLFile('EXT:setup/mod/locallang.xml');
 
 $SOBE->init();