[TASK] Deprecate TypoScript option config.noScaleUp 44/50244/4
authorJosef Glatz <josefglatz@gmail.com>
Sun, 16 Oct 2016 21:00:17 +0000 (23:00 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 18 Oct 2016 14:09:05 +0000 (16:09 +0200)
Such a configuration option should be only configurable on a
"per installation" basis via the global TYPO3 configuration:
`$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'];`

Releases: master
Resolves: #78317
Change-Id: If360924424b06c3dbb39aea7d6daf25d3081146a
Reviewed-on: https://review.typo3.org/50244
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>
typo3/sysext/core/Documentation/Changelog/master/Deprecation-78134-DeprecateTyposcriptOptionConfignoScaleUp.rst [new file with mode: 0644]
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/t3editor/Resources/Private/tsref.xml

diff --git a/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78134-DeprecateTyposcriptOptionConfignoScaleUp.rst b/typo3/sysext/core/Documentation/Changelog/master/Deprecation-78134-DeprecateTyposcriptOptionConfignoScaleUp.rst
new file mode 100644 (file)
index 0000000..81ebe98
--- /dev/null
@@ -0,0 +1,32 @@
+.. include:: ../../Includes.txt
+
+==================================================================
+Deprecation: #78134 - Deprecate TypoScript option config.noScaleUp
+==================================================================
+
+See :forge:`78317`
+
+Description
+===========
+
+The TypoScript setting `config.noScaleUp` has been marked as deprecated.
+
+
+Impact
+======
+
+Using this setting `config.noScaleUp` will trigger a deprecation log entry. It will work, until it get's removed in TYPO3 CMS 9.
+
+
+Affected Installations
+======================
+
+Instances that use this Typoscript setting.
+
+
+Migration
+=========
+
+Use the provided global TYPO3 configuration :php:`$GLOBALS['TYPO3_CONF_VARS']['GFX']['processor_allowUpscaling'];` to allow upscaling of images on a "per installation" basis.
+
+.. index:: Frontend
index d66cfd4..bfb121d 100644 (file)
@@ -101,6 +101,9 @@ class PageGenerator
         $tsfe->compensateFieldWidth = '' . $tsfe->config['config']['compensateFieldWidth'];
         $tsfe->lockFilePath = '' . $tsfe->config['config']['lockFilePath'];
         $tsfe->lockFilePath = $tsfe->lockFilePath ?: $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'];
+        if (isset($tsfe->config['config']['noScaleUp'])) {
+            GeneralUtility::deprecationLog('The TypoScript property "config.noScaleUp" is deprecated since TYPO3 v8 and will be removed in TYPO3 v9. Please use the global TYPO3 configuration setting "GFX/processor_allowUpscaling" instead.');
+        }
         $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 a19703c..576f1dc 100644 (file)
@@ -621,7 +621,7 @@ Please take note that this tag is required for XHTML compliant output, so you sh
                </property>
                <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>
+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"). Deprecated since TYPO3 CMS 8.4, will be removed in TYPO3 CMS 9.]]></description>
                        <default><![CDATA[
 ]]></default>
                </property>