[BUGFIX] Make TypoScript option config.noScaleUp work again 36/50236/7
authorJosef Glatz <josefglatz@gmail.com>
Sun, 16 Oct 2016 21:00:17 +0000 (23:00 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 17 Oct 2016 13:28:45 +0000 (15:28 +0200)
A former commit introduced a bug, which makes `config.noScaleUp`
useless. This commit fixes the regression introduced in
https://review.typo3.org/#/c/42385/ by making the option work again.

Change-Id: Ia72a605bf6f2740ca66012f84cf2723e42eaabcb
Releases: master
Resolves: #78134
Reviewed-on: https://review.typo3.org/50236
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>

index 6cb21be..d66cfd4 100644 (file)
@@ -101,7 +101,7 @@ class PageGenerator
         $tsfe->compensateFieldWidth = '' . $tsfe->config['config']['compensateFieldWidth'];
         $tsfe->lockFilePath = '' . $tsfe->config['config']['lockFilePath'];
         $tsfe->lockFilePath = $tsfe->lockFilePath ?: $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'];
-        $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'] = (bool)(isset($tsfe->config['config']['processor_allowUpscaling']) ? $tsfe->config['config']['processor_allowUpscaling'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling']);
+        $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'] = (bool)(isset($tsfe->config['config']['noScaleUp']) ? !$tsfe->config['config']['noScaleUp'] : $GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling']);
         $tsfe->ATagParams = trim($tsfe->config['config']['ATagParams']) ? ' ' . trim($tsfe->config['config']['ATagParams']) : '';
         if ($tsfe->config['config']['setJS_mouseOver']) {
index e196860..a19703c 100644 (file)
@@ -619,7 +619,7 @@ This is especially useful if you want to add RDFa or microformats to your html.
 Please take note that this tag is required for XHTML compliant output, so you should only disable this tag if you generate it manually already.]]></description>
-               <property name="processor_allowUpscaling" type="boolean">
+               <property name="noScaleUp" type="boolean">
                        <description><![CDATA[Normally images are scaled to the size specified via TypoScript. This also forces small images to be scaled to a larger size. This is not always a good thing.
 If this property is set, images are not allowed to be scaled up in size. This parameter clears the $this->mayScaleUp var of the class \TYPO3\CMS\Core\Imaging\GraphicalFunctions (often "gifbuilder").]]></description>