[TASK] Remove second argument from calls to GeneralUtility::getUserObj() 85/41585/2
authorPatrick Kollodzik <patrick.kollodzik@gmail.com>
Fri, 17 Jul 2015 17:09:04 +0000 (19:09 +0200)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Fri, 17 Jul 2015 17:46:50 +0000 (19:46 +0200)
In the past GeneralUtility::getUserObj() had a second argument.
There are still calls using this. PHP doesn't mind (because
it supports dynamic number of function arguments),
but it's more correct to remove them.

Resolves: #68286
Related: #68286
Releases: master
Change-Id: Ic05b9b6ba56b7e6181e9757894d75adb7de1a9e0
Reviewed-on: http://review.typo3.org/41585
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php [changed mode: 0644->0755]
typo3/sysext/backend/Classes/Utility/BackendUtility.php [changed mode: 0644->0755]
typo3/sysext/core/Classes/ExtDirect/ExtDirectApi.php [changed mode: 0644->0755]
typo3/sysext/core/Classes/ExtDirect/ExtDirectRouter.php [changed mode: 0644->0755]
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php [changed mode: 0644->0755]
typo3/sysext/saltedpasswords/Classes/Utility/ExtensionManagerConfigurationUtility.php [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index e4aaed4..d7c106c
@@ -119,7 +119,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
                                        }
                                        $controllerClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['frontendEditingController'][$controllerKey];
                                        if ($controllerClass) {
-                                               $this->frontendEdit = GeneralUtility::getUserObj($controllerClass, FALSE);
+                                               $this->frontendEdit = GeneralUtility::getUserObj($controllerClass);
                                        }
                                        break;
                                }
old mode 100644 (file)
new mode 100755 (executable)
index 213c78a..bc4873f
@@ -3802,7 +3802,7 @@ class BackendUtility {
                                $objRef = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['softRefParser_GL'][$spKey];
                        }
                        if ($objRef) {
-                               $softRefParserObj = GeneralUtility::getUserObj($objRef, '');
+                               $softRefParserObj = GeneralUtility::getUserObj($objRef);
                                if (is_object($softRefParserObj)) {
                                        $GLOBALS['T3_VAR']['softRefParser'][$spKey] = $softRefParserObj;
                                }
old mode 100644 (file)
new mode 100755 (executable)
index 174a07e..88e32cf
@@ -104,7 +104,7 @@ class ExtDirectApi {
                                }
                                if (is_array($configuration)) {
                                        $className = $configuration['callbackClass'];
-                                       $serverObject = GeneralUtility::getUserObj($className, FALSE);
+                                       $serverObject = GeneralUtility::getUserObj($className);
                                        $javascriptNamespaces[$javascriptNamespace]['actions'][$javascriptObjectName] = array();
                                        foreach (get_class_methods($serverObject) as $methodName) {
                                                $reflectionMethod = new \ReflectionMethod($serverObject, $methodName);
old mode 100644 (file)
new mode 100755 (executable)
index bf817db..e42fe06
@@ -131,7 +131,7 @@ class ExtDirectRouter {
                                ), TRUE);
                        }
                }
-               $endpointObject = GeneralUtility::getUserObj($callbackClass, FALSE);
+               $endpointObject = GeneralUtility::getUserObj($callbackClass);
                return call_user_func_array(array($endpointObject, $singleRequest->method), is_array($singleRequest->data) ? $singleRequest->data : array());
        }
 
old mode 100644 (file)
new mode 100755 (executable)
index b36d35a..5aba46b
@@ -89,7 +89,7 @@ class FrontendEditingController {
                if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf, $checkEditAccessInternals) && $this->allowedToEditLanguage($table, $dataArray)) {
                        $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
                        if ($editClass) {
-                               $edit = GeneralUtility::getUserObj($editClass, FALSE);
+                               $edit = GeneralUtility::getUserObj($editClass);
                                if (is_object($edit)) {
                                        $allowedActions = $this->getAllowedEditActions($table, $conf, $dataArray['pid']);
                                        $content = $edit->editPanel($content, $conf, $currentRecord, $dataArray, $table, $allowedActions, $newUid, $this->getHiddenFields($dataArray));
old mode 100644 (file)
new mode 100755 (executable)
index 5e55924..27c2e5d
@@ -391,7 +391,7 @@ class ExtensionManagerConfigurationUtility {
                $pField = '';
                $registeredMethods = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getRegisteredSaltedHashingMethods();
                foreach ($registeredMethods as $class => $reference) {
-                       $classInstance = GeneralUtility::getUserObj($reference, 'tx_');
+                       $classInstance = GeneralUtility::getUserObj($reference);
                        if ($classInstance instanceof \TYPO3\CMS\Saltedpasswords\Salt\SaltInterface && $classInstance->isAvailable()) {
                                $sel = $this->extConf[$disposal]['saltedPWHashingMethod'] == $class ? ' selected="selected" ' : '';
                                $label = 'ext.saltedpasswords.title.' . strtolower(end(explode('\\', $class)));