Fixed bug #13623 : Bug: Deprecation log for IMAGE.alttext does not work (Thanks to...
authorSteffen Gebert <steffen.gebert@typo3.org>
Mon, 23 Aug 2010 22:43:44 +0000 (22:43 +0000)
committerSteffen Gebert <steffen.gebert@typo3.org>
Mon, 23 Aug 2010 22:43:44 +0000 (22:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-4@8659 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_content.php

index d0a7bbf..04d027c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+20010-08-24  Steffen Gebert  <steffen@steffen-gebert.de>
+
+       * Fixed bug #13623: Bug: Deprecation log for IMAGE.alttext does not work (Thanks to Sebastian Michaelsen)
+
 2010-08-23 Steffen Kamper  <steffen@typo3.org>
 
        * Fixed bug #15092: Ajax loaded items of inline records are encoded twice (Thanks to Martin Borer)
index cf4d99a..1162d5c 100644 (file)
@@ -3126,13 +3126,16 @@ class tslib_cObj {
                        $info[3] = t3lib_div::png_to_gif_by_imagemagick($info[3]);
                        $GLOBALS['TSFE']->imagesOnPage[]=$info[3];              // This array is used to collect the image-refs on the page...
 
-                       if (!strlen($conf['altText']) && !is_array($conf['altText.']))  {       // Backwards compatible:
-                               if ($conf['altText'] || $conf['altText.']) {
-                                       $GLOBALS['TSFE']->logDeprecatedTyposcript('IMAGE.alttext');
+                               // Backwards compatibility if altText is not set and alttext is set
+                               // @deprecated since TYPO3 4.3, will be removed in TYPO3 4.6
+                       if (strlen($conf['alttext']) || is_array($conf['alttext.'])) {
+                               $GLOBALS['TSFE']->logDeprecatedTyposcript('Usage of deprecated IMAGE.alttext, use IMAGE.altText instead - src: ' . $info[3] . ' - original image: ' . $info['origFile']);
+                               if (!strlen($conf['altText']) && !is_array($conf['altText.'])) {
+                                       $conf['altText'] = $conf['alttext'];
+                                       $conf['altText.'] = $conf['alttext.'];
                                }
-                               $conf['altText'] = $conf['alttext'];
-                               $conf['altText.'] = $conf['alttext.'];
                        }
+                       
                        $altParam = $this->getAltParam($conf);
                        $theValue = '<img src="'.htmlspecialchars($GLOBALS['TSFE']->absRefPrefix.t3lib_div::rawUrlEncodeFP($info[3])).'" width="'.$info[0].'" height="'.$info[1].'"'.$this->getBorderAttr(' border="'.intval($conf['border']).'"').(($conf['params'] || is_array($conf['params.']))?' '.$this->stdWrap($conf['params'],$conf['params.']):'').($altParam).' />';
                        if ($conf['linkWrap'])  {