Fixed bug #47408: Incorrect object manager creation
authorstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Sat, 20 Apr 2013 18:16:12 +0000 (18:16 +0000)
committerstan <stan@735d13b6-9817-0410-8766-e36946ffe9aa>
Sat, 20 Apr 2013 18:16:12 +0000 (18:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/sr_freecap/trunk@74680 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
Classes/PiBaseApi.php
Classes/Utility/EidUtility.php
Classes/Utility/FontMakingUtility.php
Classes/Validation/Validator/CaptchaValidator.php
Classes/View/ImageGenerator/ShowPng.php
Classes/ViewHelpers/AudioViewHelper.php
Classes/ViewHelpers/ImageViewHelper.php

index 5459fe9..2f87724 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #47406: Cleanup in ext_autoload.php
        * Fixed bug #47407: Keep domain object font ISO-8859-2-encoded
+       * Fixed bug #47408: Incorrect object manager creation
 
 2013-02-14  Stanislas Rolland  <typo3@sjbr.ca>
 
index 35031e1..93864a6 100644 (file)
@@ -75,7 +75,7 @@ class PiBaseApi {
 
                // Get the object manager
                if ($this->objectManager === NULL) {
-                       $this->objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+                       $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                }
                
                // Get the configuration manager
index eaa3bcf..f713f83 100644 (file)
@@ -86,7 +86,7 @@ class EidUtility {
         *
         */
        public function __construct() {
-               $this->objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+               $this->objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
        }
 
        /**
index 117dfcf..b796a25 100644 (file)
@@ -76,7 +76,7 @@ class FontMakingUtility {
                        $gifObjArray[$ic . '0.']['maxWidth'] = $width;
                        $gifObjArray[$ic . '0.']['offset'] = (($ic-1) * $width + $hOffset) . ',' . $vertOffset;
                }
-               $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                $gifCreator = $objectManager->create('SJBR\\SrFreecap\\Utility\\GifBuilderUtility');
                $gifCreator->init();
                if ($GLOBALS['TYPO3_CONF_VARS']['GFX']['gdlib']) {
index 290d5fc..8f19bbb 100644 (file)
@@ -46,7 +46,7 @@ class CaptchaValidator extends \TYPO3\CMS\Extbase\Validation\Validator\AbstractV
                $isValid = FALSE;
                $this->errors = array();
                // Get session data
-               $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                $wordRepository = $objectManager->get('SJBR\\SrFreecap\\Domain\\Repository\\WordRepository');
                $wordObject = $wordRepository->getWord();
                $wordHash = $wordObject->getWordHash();
index 1a5a60e..76163bd 100644 (file)
@@ -171,7 +171,7 @@ class ShowPng implements \TYPO3\CMS\Extbase\MVC\View\ViewInterface {
                                $this->word->setWordCypher(array());
                                $this->word->setHashFunction('');
                                // Get an instance of the word repository
-                               $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+                               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                                $wordRepository = $objectManager->get('SJBR\\SrFreecap\\Domain\\Repository\\WordRepository');
                                // Reset the word
                                $wordRepository->setWord($this->word);
index 3be2686..5fa03d5 100644 (file)
@@ -61,7 +61,7 @@ class AudioViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe
                // Get the plugin configuration
                $settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->extensionName, $this->pluginName);
                // Get the translation view helper
-               $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                $translator = $objectManager->get('SJBR\\SrFreecap\\ViewHelpers\\TranslateViewHelper');
                $translator->injectConfigurationManager($this->configurationManager);
                // Get browser info (as of iOS 6, audio rendering does not work)
index c95c215..4fffe1e 100644 (file)
@@ -56,10 +56,10 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe
        }
 
        /**
-        * Render the captcha audio rendering request icon
+        * Render the captcha image html
         *
         * @param string suffix to be appended to the extenstion key when forming css class names
-        * @return string The html used to render the captcha audio rendering request icon
+        * @return string The html used to render the captcha image
         */
        public function render ($suffix = '') {
 
@@ -72,10 +72,10 @@ class ImageViewHelper extends \TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelpe
                $GLOBALS['TSFE']->no_cache = 1;
 
                // Get the plugin configuration
-               $settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManager::CONFIGURATION_TYPE_SETTINGS, $this->extensionName, $this->pluginName);
+               $settings = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, $this->extensionName);
 
                // Get the translation view helper
-               $objectManager = new \TYPO3\CMS\Extbase\Object\ObjectManager();
+               $objectManager = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
                $translator = $objectManager->get('SJBR\\SrFreecap\\ViewHelpers\\TranslateViewHelper');
                $translator->injectConfigurationManager($this->configurationManager);