* Modified typo3/sysext/cms/tslib/class.tslib_content.php:
authorRobert Lemke <robert.lemke@typo3.org>
Mon, 5 Apr 2004 10:00:17 +0000 (10:00 +0000)
committerRobert Lemke <robert.lemke@typo3.org>
Mon, 5 Apr 2004 10:00:17 +0000 (10:00 +0000)
* fixed bug: When providing an imgList for the IMGTEXT TLO, no spaces were accepted in the comma separated list. Now using t3lib_div::trimExplode for splitting.
* fixed bug: The alt and title parameters have not been set correctly when using IMGTEXT with the imgList property. Now everything works as expected: You may specify alt/title texts for the whole IMGTEXT, or for each imgObj independently

* Added support for automatically caching image dimensions instead of executing IM identify.  Original extension provided by Michael Stucki.
* Affected files: t3lib/class.t3lib_stdgraphic.php, typo3/sysext/cms/ext_tables.sql
* Tested by Ingmar, Michael and Robert

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@190 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 77d49a5..d6ef35b 100755 (executable)
@@ -924,11 +924,11 @@ class tslib_cObj {
                                                        unset($imgConf['file.']['ext.']);
                                                }
                                        }
-                                       if (!isset ($imgConf['altText'])) $imgConf['altText'] = $conf['altText'];
-                                       if (!isset ($imgConf['titleText'])) $imgConf['titleText'] = $conf['titleText'];
+                                       if (!isset ($imgConf['alttext'])) $imgConf['alttext'] = $conf['alttext'];
+                                       if (!isset ($imgConf['titletext'])) $imgConf['titletext'] = $conf['titletext'];
                                        $imgsTag[$imgKey] = $this->IMAGE($imgConf);
                                } else {
-                                       $imgsTag[$imgKey] = $this->IMAGE(Array('altText'=>$conf['altText'], 'titleText'=>$conf['titleText'], 'file'=>$totalImagePath));         // currentValKey !!!
+                                       $imgsTag[$imgKey] = $this->IMAGE(Array('alttext'=>$conf['alttext'], 'titletext'=>$conf['titletext'], 'file'=>$totalImagePath));         // currentValKey !!!
                                }
                                        // Store the original filepath
                                $origImages[$imgKey]=$GLOBALS['TSFE']->lastImageInfo;
@@ -2497,14 +2497,14 @@ class tslib_cObj {
         * @see IMGTEXT(), cImage()
         */
        function getAltParam($conf)     {
-               $altText = $this->stdWrap($conf['altText'], $conf['altText.']);
-               $altParam = ' alt="'.htmlspecialchars(strip_tags($altText)).'"';
+               $alttext = $this->stdWrap($conf['alttext'], $conf['alttext.']);
+               $altParam = ' alt="'.htmlspecialchars(strip_tags($alttext)).'"';
 
-               $titleText = $this->stdWrap($conf['titleText'],$conf['titleText.']);
-               if ($titleText) {
-                       $altParam .= ' title="'.htmlspecialchars(strip_tags($titleText)).'"';
+               $titletext = $this->stdWrap($conf['titletext'],$conf['titletext.']);
+               if ($titletext) {
+                       $altParam .= ' title="'.htmlspecialchars(strip_tags($titletext)).'"';
                } else {
-                       $altParam .= ' title="'.htmlspecialchars(strip_tags($altText)).'"';
+                       $altParam .= ' title="'.htmlspecialchars(strip_tags($alttext)).'"';
                }
                return $altParam;
        }