Fixed bug #11189: Validation issue: value of attribute "method" cannot be "POST"...
[Packages/TYPO3.CMS.git] / typo3 / sysext / beuser / mod / index.php
index df89c50..b5c6209 100755 (executable)
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
  *
  */
 
-require_once (PATH_t3lib.'class.t3lib_basicfilefunc.php');
-require_once (PATH_t3lib.'class.t3lib_browsetree.php');
-require_once (PATH_t3lib.'class.t3lib_foldertree.php');
-require_once (PATH_t3lib.'class.t3lib_tstemplate.php');
-require_once (PATH_t3lib.'class.t3lib_loadmodules.php');
-require_once (PATH_t3lib.'class.t3lib_tsparser_ext.php');
 require_once (PATH_typo3.'class.alt_menu_functions.inc');
 
 $GLOBALS['LANG']->includeLLFile('EXT:beuser/mod/locallang.xml');
@@ -584,8 +578,7 @@ class local_beUserAuth extends t3lib_beUserAuth {
                        // Prepare for filemount and db-mount
                if ($printTrees)        {       // ... this is if we see the detailed view for a user:
                                // Page tree object:
-                       $className=t3lib_div::makeInstanceClassName(!$this->isAdmin() ? 'printAllPageTree_perms' : 'printAllPageTree');
-                       $pagetree = new $className($this,$this->returnWebmounts());     // Here, only readable webmounts are returned (1=1)
+                       $pagetree = t3lib_div::makeInstance(!$this->isAdmin() ? 'printAllPageTree_perms' : 'printAllPageTree', $this, $this->returnWebmounts());        // Here, only readable webmounts are returned (1=1)
                        $pagetree->addField('perms_user',1);
                        $pagetree->addField('perms_group',1);
                        $pagetree->addField('perms_everybody',1);
@@ -594,16 +587,13 @@ class local_beUserAuth extends t3lib_beUserAuth {
                        $pagetree->addField('editlock',1);
 
                                // Folder tree object:
-                       $className=t3lib_div::makeInstanceClassName('printAllFolderTree');
-                       $foldertree = new $className($this,$this->returnFilemounts());
+                       $foldertree = t3lib_div::makeInstance('printAllFolderTree', $this, $this->returnFilemounts());
                } else {
                                // Page tree object:
-                       $className=t3lib_div::makeInstanceClassName('localPageTree');
-                       $pagetree = new $className($this,$this->returnWebmounts('1=1'));        // Here, ALL webmounts are returned (1=1)
+                       $pagetree = t3lib_div::makeInstance('localPageTree', $this, $this->returnWebmounts('1=1'));     // Here, ALL webmounts are returned (1=1)
 
                                // Folder tree object:
-                       $className=t3lib_div::makeInstanceClassName('localFolderTree');
-                       $foldertree = new $className($this,$this->returnFilemounts());
+                       $foldertree = t3lib_div::makeInstance('localFolderTree', $this, $this->returnFilemounts());
                }
 
                        // Names for modules:
@@ -677,7 +667,7 @@ class local_beUserAuth extends t3lib_beUserAuth {
                                                                        $pout[]='<span class="nobr">'.t3lib_iconWorks::getIconImage($table,array(),$GLOBALS['BACK_PATH'],'align="top"').$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['ctrl']['title']).'</span>';
                                                                }
                                                                if ($GLOBALS['TCA'][$table]['columns'][$field]) {
-                                                                       $pout[]='<span class="nobr"> - '.ereg_replace(':$','',$GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label'])).'</span>';
+                                                                       $pout[]='<span class="nobr"> - '.rtrim($GLOBALS['LANG']->sL($GLOBALS['TCA'][$table]['columns'][$field]['label']), ':').'</span>';
                                                                }
                                                        }
                                                }
@@ -873,8 +863,7 @@ class local_beUserAuth extends t3lib_beUserAuth {
                                'HTML'=>t3lib_iconWorks::getIconImage('pages',$row,$GLOBALS['BACK_PATH'],'align="top" title="['.$row['uid'].']"')       // .htmlspecialchars($row['title'])
                        );
                }
-               $className=t3lib_div::makeInstanceClassName('printAllPageTree_perms');
-               $pp = new $className($this);
+               $pp = t3lib_div::makeInstance('printAllPageTree_perms', $this);
                return $pp->printTree($dat,1);
        }
 
@@ -1132,7 +1121,7 @@ class SC_mod_tools_be_user_index {
                $this->doc = t3lib_div::makeInstance('template');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
                $this->doc->setModuleTemplate('templates/beuser.html');
-               $this->doc->form='<form action="" method="POST">';
+               $this->doc->form = '<form action="" method="post">';
 
                                // JavaScript
                $this->doc->JScode = $this->doc->wrapScriptTags('
@@ -1304,8 +1293,10 @@ class SC_mod_tools_be_user_index {
                                }
                        }
 
-                       $outTable = '<table border="0" cellpadding="1" cellspacing="1"><tr class="bgColor5"><td>'.t3lib_iconWorks::getIconImage('be_users',$tempBE_USER->user,$GLOBALS['BACK_PATH'],'class="absmiddle" title="'.$tempBE_USER->user['uid'].'"').$tempBE_USER->user['username'].'</td>';
-                       $outTable.= '<td>'.$tempBE_USER->user['realName'].($tempBE_USER->user['email'] ? ', <a href="mailto:'.$tempBE_USER->user['email'].'">'.$tempBE_USER->user['email'].'</a>' : '').'</td>';
+                       $email = htmlspecialchars($tempBE_USER->user['email']);
+                       $realname = htmlspecialchars($tempBE_USER->user['realName']);
+                       $outTable = '<table border="0" cellpadding="1" cellspacing="1"><tr class="bgColor5"><td>'.t3lib_iconWorks::getIconImage('be_users',$tempBE_USER->user,$GLOBALS['BACK_PATH'],'class="absmiddle" title="'.$tempBE_USER->user['uid'].'"').htmlspecialchars($tempBE_USER->user['username']).'</td>';
+                       $outTable.= '<td>'.($realname?$realname.', ':'').($email ? '<a href="mailto:'.$email.'">'.$email.'</a>' : '').'</td>';
                        $outTable.= '<td>'.$this->elementLinks('be_users',$tempBE_USER->user).'</td></tr></table>';
                        $outTable.= '<strong><a href="'.htmlspecialchars($this->MCONF['_']).'">' . $GLOBALS['LANG']->getLL('backToOverview', true) . '</a></strong><br />';
 
@@ -1323,7 +1314,7 @@ class SC_mod_tools_be_user_index {
                                        $menu[$columnCounter] = array();
                                }
                                $rowCounter++;
-                               $menu[$columnCounter][]='<input type="checkbox" value="1" name="compareFlags['.$kk.']" id="checkCompare_'.$kk.'"'.($compareFlags[$kk]?' checked="checked"':'').'> <label for="checkCompare_'.$kk.'">'.htmlspecialchars($vv).'</label>';
+                               $menu[$columnCounter][]='<input type="checkbox" class="checkbox" value="1" name="compareFlags['.$kk.']" id="checkCompare_'.$kk.'"'.($compareFlags[$kk]?' checked="checked"':'').'> <label for="checkCompare_'.$kk.'">'.htmlspecialchars($vv).'</label>';
                        }
                        $outCode = '<p>' . $GLOBALS['LANG']->getLL('groupBy', true) . '</p>';
                        $outCode .= '<table border="0" cellpadding="3" cellspacing="1" class="compare-checklist valign-top"><tr>';
@@ -1369,7 +1360,7 @@ class SC_mod_tools_be_user_index {
                                                $comparation[$md5]=$tempBE_USER->ext_printOverview($uInfo,$compareFlags);
                                                $comparation[$md5]['users']=array();
                                        }
-                                       $comparation[$md5]['users'][]=$tempBE_USER->user;       //array('uid'=>$r['uid'],'username'=>$r['username'],'realName'=>$tempBE_USER->user['realName'],'email'=>$tempBE_USER->user['email'],'admin'=>$tempBE_USER->user['admin']);
+                                       $comparation[$md5]['users'][]=$tempBE_USER->user;
                                        unset($tempBE_USER);
                                }
                                $counter++;
@@ -1448,7 +1439,7 @@ class SC_mod_tools_be_user_index {
         * @return      string          the HTML anchor
         */
        function linkUser($str,$rec)    {
-               return '<a href="'.htmlspecialchars($this->MCONF['_']).'&be_user_uid='.$rec['uid'].'">'.$str.'</a>';
+               return '<a href="'.htmlspecialchars($this->MCONF['_']).'&be_user_uid='.$rec['uid'].'">' . htmlspecialchars($str) . '</a>';
        }
 
 
@@ -1610,26 +1601,16 @@ class SC_mod_tools_be_user_index {
 
 }
 
-// Include extension?
+
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/beuser/mod/index.php'])       {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/beuser/mod/index.php']);
 }
 
 
-
-
-
-
-
-
-
-
-
-
 // Make instance:
 $SOBE = t3lib_div::makeInstance('SC_mod_tools_be_user_index');
 $SOBE->init();
 $SOBE->main();
 $SOBE->printContent();
 
-?>
\ No newline at end of file
+?>