[TASK] Move modAccess and language include in EXT:perm 11/28311/3
authorWouter Wolters <typo3@wouterwolters.nl>
Wed, 12 Mar 2014 18:29:13 +0000 (19:29 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 13 Mar 2014 22:19:24 +0000 (23:19 +0100)
Resolves: #56834
Releases: 6.2
Change-Id: Iec646bbae646bb85479f9f19c438e6aa9283e0dd
Reviewed-on: https://review.typo3.org/28311
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
typo3/sysext/perm/Classes/Controller/PermissionModuleController.php
typo3/sysext/perm/mod1/index.php

index 73ec103..e4d8ef1 100644 (file)
@@ -160,6 +160,14 @@ class PermissionModuleController {
        public $lastEdited;
 
        /**
+        * Constructor
+        */
+       public function __construct() {
+               $GLOBALS['LANG']->includeLLFile('EXT:lang/locallang_mod_web_perm.xlf');
+               $GLOBALS['BE_USER']->modAccess($GLOBALS['MCONF'], TRUE);
+       }
+
+       /**
         * Initialization of the class
         *
         * @return void
index a9c6fed..e9efa36 100644 (file)
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Module: Permission setting
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
  */
-$LANG->includeLLFile('EXT:lang/locallang_mod_web_perm.xlf');
-$BE_USER->modAccess($MCONF, 1);
 
-// Make instance:
 $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Perm\\Controller\\PermissionModuleController');
 $SOBE->init();
 $SOBE->main();