[BUGFIX] Some methods in t3lib_TSparser should be static
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_parsehtml_proc.php
index 809f425..25f7974 100644 (file)
  * @author     Kasper Skårhøj <kasperYYYY@typo3.com>
  * @internal
  */
-/**
- * [CLASS/FUNCTION INDEX of SCRIPT]
- *
- *
- *
- *  103: class t3lib_parsehtml_proc extends t3lib_parsehtml
- *  138:        function init($elRef='',$recPid=0)
- *  150:        function setRelPath($path)
- *  174:        function evalWriteFile($pArr,$currentRecord)
- *
- *                       SECTION: Main function
- *  232:        function RTE_transform($value,$specConf,$direction='rte',$thisConfig=array())
- *
- *                       SECTION: Specific RTE TRANSFORMATION functions
- *  398:        function TS_images_db($value)
- *  550:        function TS_images_rte($value)
- *  589:        function TS_reglinks($value,$direction)
- *  626:        function TS_links_db($value)
- *  675:        function TS_links_rte($value)
- *  760:        function TS_preserve_db($value)
- *  784:        function TS_preserve_rte($value)
- *  805:        function TS_transform_db($value,$css=FALSE)
- *  922:        function transformStyledATags($value)
- *  948:        function TS_transform_rte($value,$css=0)
- * 1019:        function TS_strip_db($value)
- *
- *                       SECTION: Generic RTE transformation, analysis and helper functions
- * 1050:        function getURL($url)
- * 1064:        function HTMLcleaner_db($content,$tagList='')
- * 1091:        function getKeepTags($direction='rte',$tagList='')
- * 1200:        function divideIntoLines($value,$count=5,$returnArray=FALSE)
- * 1304:        function setDivTags($value,$dT='p')
- * 1349:        function internalizeFontTags($value)
- * 1385:        function siteUrl()
- * 1395:        function rteImageStorageDir()
- * 1407:        function removeTables($value,$breakChar='<br />')
- * 1439:        function defaultTStagMapping($code,$direction='rte')
- * 1462:        function getWHFromAttribs($attribArray)
- * 1489:        function urlInfoForLinkTags($url)
- * 1548:        function TS_AtagToAbs($value,$dontSetRTEKEEP=FALSE)
- *
- * TOTAL FUNCTIONS: 28
- * (This index is automatically created/updated by the extension "extdeveval")
- *
- */
 
 
 /**
@@ -703,7 +658,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                                        $idPart = $this->recPid;
                                                } // If no id or alias is given, set it to class record pid
                                                        // Checking if the id-parameter is an alias.
-                                               if (!t3lib_div::testInt($idPart)) {
+                                               if (!t3lib_utility_Math::canBeInterpretedAsInteger($idPart)) {
                                                        list($idPartR) = t3lib_BEfunc::getRecordsByField('pages', 'alias', $idPart);
                                                        $idPart = intval($idPartR['uid']);
                                                }
@@ -929,7 +884,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                foreach ($blockSplit as $k => $v) {
                        if ($k % 2) { // If an A-tag was found:
                                $attribArray = $this->get_tag_attributes_classic($this->getFirstTag($v), 1);
-                               if ($attribArray['style']) { // If "style" attribute is set!
+                                       // If "style" attribute is set and rteerror is not set!
+                               if ($attribArray['style'] && !$attribArray['rteerror']) {
                                        $attribArray_copy['style'] = $attribArray['style'];
                                        unset($attribArray['style']);
                                        $bTag = '<span ' . t3lib_div::implodeAttributes($attribArray_copy, 1) . '><a ' . t3lib_div::implodeAttributes($attribArray, 1) . '>';
@@ -988,7 +944,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
                                        case 'typohead': // Transform typohead into Hx tags.
                                                if (!isset($this->procOptions['typohead']) || $this->procOptions['typohead']) {
                                                        $tC = $this->removeFirstAndLastTag($blockSplit[$k]);
-                                                       $typ = t3lib_div::intInRange($attribArray['type'], 0, 6);
+                                                       $typ = t3lib_utility_Math::forceIntegerInRange($attribArray['type'], 0, 6);
                                                        if (!$typ) {
                                                                $typ = 6;
                                                        }
@@ -1042,10 +998,10 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml {
         *
         * @param       string          Filepath/URL to read
         * @return      string          The content from the resource given as input.
-        * @see t3lib_div::getURL()
+        * @see t3lib_div::getUrl()
         */
-       function getURL($url) {
-               return t3lib_div::getURL($url);
+       function getUrl($url) {
+               return t3lib_div::getUrl($url);
        }
 
        /**