Added feature #11407: Allow type="user" in user setup
authorSteffen Kamper <info@sk-typo3.de>
Sat, 5 Sep 2009 13:46:40 +0000 (13:46 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sat, 5 Sep 2009 13:46:40 +0000 (13:46 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5896 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/setup/mod/index.php

index bc89eeb..d6a8090 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-09-05  Steffen Kamper  <info@sk-typo3.de>
+
+       * Added feature #11407: Allow type="user" in user setup
+
 2009-09-04  Rupert Germann  <rupi@gmx.li>
 
        * Fixed bug #11868 (Follow-up to #11828): added forgotten file version/tca.php (thanks to Sven J├╝rgens)
index 3ce6de8..5a738e5 100755 (executable)
@@ -516,8 +516,7 @@ class SC_mod_user_setup_index {
                                        }
 
                                        if ($config['itemsProcFunc']) {
-                                               $parts = explode('->', $config['itemsProcFunc']);
-                                               $html = call_user_func(array($parts[0], $parts[1]));
+                                               $html = t3lib_div::callUserFunction($config['itemsProcFunc'], $config, $this, '');
                                        } else {
                                                $html = '<select id="field_' . $fieldName . '" name="data[' . $fieldName . ']"' . $more . '>' . chr(10);
                                                foreach ($config['items'] as $key => $value) {
@@ -529,6 +528,9 @@ class SC_mod_user_setup_index {
                                        }
 
                                break;
+                               case 'user':
+                                       $html = t3lib_div::callUserFunction($config['userFunc'], $config, $this, '');
+                               break;
                                default:
                                        $html = '';
                        }
@@ -587,7 +589,7 @@ class SC_mod_user_setup_index {
         *
        * @return       string          complete select as HTML string or warning box if something went wrong.
         */
-       protected function renderLanguageSelect() {
+       public function renderLanguageSelect($params, $pObj) {
 
                        // compile the languages dropdown
                $languageOptions = array(
@@ -636,13 +638,13 @@ class SC_mod_user_setup_index {
        *
        * @return       string          complete select as HTML string
        */
-       protected function renderStartModuleSelect() {
+       public function renderStartModuleSelect($params, $pObj) {
                        // start module select
                if (empty($GLOBALS['BE_USER']->uc['startModule']))      {
                        $GLOBALS['BE_USER']->uc['startModule'] = $GLOBALS['BE_USER']->uc_default['startModule'];
                }
                $startModuleSelect .= '<option value=""></option>';
-               foreach ($this->loadModules->modules as $mainMod => $modData) {
+               foreach ($pObj->loadModules->modules as $mainMod => $modData) {
                        if (isset($modData['sub']) && is_array($modData['sub'])) {
                                $startModuleSelect .= '<option disabled="disabled">'.$GLOBALS['LANG']->moduleLabels['tabs'][$mainMod.'_tab'].'</option>';
                                foreach ($modData['sub'] as $subKey => $subData) {
@@ -665,7 +667,7 @@ class SC_mod_user_setup_index {
         *
         * @return      void
         */
-       function simulateUser() {
+       public function simulateUser()  {
                global $BE_USER,$LANG,$BACK_PATH;
 
                // *******************************************************************************
@@ -708,8 +710,8 @@ class SC_mod_user_setup_index {
        *
        * @return       string          complete select as HTML string
        */
-       protected function renderSimulateUserSelect() {
-               return $this->simulateSelector;
+       public function renderSimulateUserSelect($params, $pObj) {
+               return $pObj->simulateSelector;
        }
 
        /**