Fixed bug #13611: Replace calls to t3lib_div:: within t3lib_div to self:: du to perfo...
authorBenni Mack <benni.mack@typo3.org>
Fri, 26 Feb 2010 09:07:31 +0000 (09:07 +0000)
committerBenni Mack <benni.mack@typo3.org>
Fri, 26 Feb 2010 09:07:31 +0000 (09:07 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7043 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php

index a015c81..831fff1 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-02-26  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #13611: Replace calls to t3lib_div:: within t3lib_div to self:: du to performance reasons (Thanks to Georg Ringer)
+
 2010-02-25  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #13651: htmlArea RTE: Table insertion is broken in IE8
index b7d7417..55ddca5 100644 (file)
@@ -266,7 +266,7 @@ final class t3lib_div {
                if(empty($var)) return;
                $value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var];
                if (isset($value))      {
-                       if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
+                       if (is_array($value))   { self::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
                return $value;
        }
@@ -281,8 +281,8 @@ final class t3lib_div {
                $postParameter = is_array($_POST[$parameter]) ? $_POST[$parameter] : array();
                $getParameter  = is_array($_GET[$parameter])  ? $_GET[$parameter]  : array();
 
-               $mergedParameters = t3lib_div::array_merge_recursive_overrule($getParameter, $postParameter);
-               t3lib_div::stripSlashesOnArray($mergedParameters);
+               $mergedParameters = self::array_merge_recursive_overrule($getParameter, $postParameter);
+               self::stripSlashesOnArray($mergedParameters);
 
                return $mergedParameters;
        }
@@ -299,7 +299,7 @@ final class t3lib_div {
        public static function _GET($var=NULL)  {
                $value = ($var === NULL) ? $_GET : (empty($var) ? NULL : $_GET[$var]);
                if (isset($value))      {       // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
-                       if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
+                       if (is_array($value))   { self::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
                return $value;
        }
@@ -316,7 +316,7 @@ final class t3lib_div {
        public static function _POST($var=NULL) {
                $value = ($var === NULL) ? $_POST : (empty($var) ? NULL : $_POST[$var]);
                if (isset($value))      {       // Removes slashes since TYPO3 has added them regardless of magic_quotes setting.
-                       if (is_array($value))   { t3lib_div::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
+                       if (is_array($value))   { self::stripSlashesOnArray($value); } else { $value = stripslashes($value); }
                }
                return $value;
        }
@@ -333,13 +333,13 @@ final class t3lib_div {
                        // ADDS slashes since TYPO3 standard currently is that slashes MUST be applied (regardless of magic_quotes setting).
                if (strcmp($key,''))    {
                        if (is_array($inputGet)) {
-                               t3lib_div::addSlashesOnArray($inputGet);
+                               self::addSlashesOnArray($inputGet);
                        } else {
                                $inputGet = addslashes($inputGet);
                        }
                        $GLOBALS['HTTP_GET_VARS'][$key] = $_GET[$key] = $inputGet;
                } elseif (is_array($inputGet)) {
-                       t3lib_div::addSlashesOnArray($inputGet);
+                       self::addSlashesOnArray($inputGet);
                        $GLOBALS['HTTP_GET_VARS'] = $_GET = $inputGet;
                }
        }
@@ -361,7 +361,7 @@ final class t3lib_div {
                if(empty($var)) return;
                $value = isset($_POST[$var]) ? $_POST[$var] : $_GET[$var];
                if (isset($value) && is_string($value)) { $value = stripslashes($value); }      // Originally check '&& get_magic_quotes_gpc() ' but the values of $_GET are always slashed regardless of get_magic_quotes_gpc() because HTTP_POST/GET_VARS are run through addSlashesOnArray in the very beginning of index_ts.php eg.
-               if ($strip && isset($value) && is_array($value)) { t3lib_div::stripSlashesOnArray($value); }
+               if ($strip && isset($value) && is_array($value)) { self::stripSlashesOnArray($value); }
                return $value;
        }
 
@@ -435,7 +435,7 @@ final class t3lib_div {
                $returnCode='';
                if ($gfxConf['gif_compress'] && strtolower(substr($theFile,-4,4))=='.gif')      {       // GIF...
                        if (($type=='IM' || !$type) && $gfxConf['im'] && $gfxConf['im_path_lzw'])       {       // IM
-                               $cmd = t3lib_div::imageMagickCommand('convert', '"'.$theFile.'" "'.$theFile.'"', $gfxConf['im_path_lzw']);
+                               $cmd = self::imageMagickCommand('convert', '"'.$theFile.'" "'.$theFile.'"', $gfxConf['im_path_lzw']);
                                exec($cmd);
 
                                $returnCode='IM';
@@ -464,7 +464,7 @@ final class t3lib_div {
                        && strtolower(substr($theFile,-4,4))=='.png'
                        && @is_file($theFile))  {       // IM
                                $newFile = substr($theFile,0,-4).'.gif';
-                               $cmd = t3lib_div::imageMagickCommand('convert', '"'.$theFile.'" "'.$newFile.'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
+                               $cmd = self::imageMagickCommand('convert', '"'.$theFile.'" "'.$newFile.'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path_lzw']);
                                exec($cmd);
                                $theFile = $newFile;
                                        // unlink old file?? May be bad idea bacause TYPO3 would then recreate the file every time as TYPO3 thinks the file is not generated because it's missing!! So do not unlink $theFile here!!
@@ -491,7 +491,7 @@ final class t3lib_div {
                                return $theFile;
                        } else {
                                $newFile = PATH_site.'typo3temp/readPG_'.md5($theFile.'|'.filemtime($theFile)).($output_png?'.png':'.gif');
-                               $cmd = t3lib_div::imageMagickCommand('convert', '"'.$theFile.'" "'.$newFile.'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']);
+                               $cmd = self::imageMagickCommand('convert', '"'.$theFile.'" "'.$newFile.'"', $GLOBALS['TYPO3_CONF_VARS']['GFX']['im_path']);
                                exec($cmd);
                                if (@is_file($newFile)) return $newFile;
                        }
@@ -561,7 +561,7 @@ final class t3lib_div {
        public static function fixed_lgd_pre($string,$chars)    {
                self::logDeprecatedFunction();
 
-               return strrev(t3lib_div::fixed_lgd(strrev($string),$chars));
+               return strrev(self::fixed_lgd(strrev($string),$chars));
        }
 
        /**
@@ -581,7 +581,7 @@ final class t3lib_div {
                        return $GLOBALS['TSFE']->csConvObj->crop($charSet, $string, $chars, $appendString);
                } else {
                                // this case should not happen
-                       $csConvObj = t3lib_div::makeInstance('t3lib_cs');
+                       $csConvObj = self::makeInstance('t3lib_cs');
                        return $csConvObj->crop('iso-8859-1', $string, $chars, $appendString);
                }
        }
@@ -602,7 +602,7 @@ final class t3lib_div {
                $lines = explode(chr(10),$str);
                $outArr=array();
                foreach ($lines as $lStr) {
-                       $outArr[] = t3lib_div::breakLinesForEmail($lStr,$implChar,$charWidth);
+                       $outArr[] = self::breakLinesForEmail($lStr,$implChar,$charWidth);
                }
                return implode(chr(10),$outArr);
        }
@@ -660,10 +660,10 @@ final class t3lib_div {
                } elseif ($list === '*')        {
                        return true;
                }
-               if (strpos($baseIP, ':') !== false && t3lib_div::validIPv6($baseIP))    {
-                       return t3lib_div::cmpIPv6($baseIP, $list);
+               if (strpos($baseIP, ':') !== false && self::validIPv6($baseIP)) {
+                       return self::cmpIPv6($baseIP, $list);
                } else {
-                       return t3lib_div::cmpIPv4($baseIP, $list);
+                       return self::cmpIPv4($baseIP, $list);
                }
        }
 
@@ -677,7 +677,7 @@ final class t3lib_div {
        public static function cmpIPv4($baseIP, $list)  {
                $IPpartsReq = explode('.',$baseIP);
                if (count($IPpartsReq)==4)      {
-                       $values = t3lib_div::trimExplode(',',$list,1);
+                       $values = self::trimExplode(',',$list,1);
 
                        foreach($values as $test)       {
                                list($test,$mask) = explode('/',$test);
@@ -717,32 +717,32 @@ final class t3lib_div {
         */
        public static function cmpIPv6($baseIP, $list)  {
                $success = false;       // Policy default: Deny connection
-               $baseIP = t3lib_div::normalizeIPv6($baseIP);
+               $baseIP = self::normalizeIPv6($baseIP);
 
-               $values = t3lib_div::trimExplode(',',$list,1);
+               $values = self::trimExplode(',',$list,1);
                foreach ($values as $test)      {
                        list($test,$mask) = explode('/',$test);
-                       if (t3lib_div::validIPv6($test))        {
-                               $test = t3lib_div::normalizeIPv6($test);
+                       if (self::validIPv6($test))     {
+                               $test = self::normalizeIPv6($test);
                                if (intval($mask))      {
                                        switch ($mask) {        // test on /48 /64
                                                case '48':
-                                                       $testBin = substr(t3lib_div::IPv6Hex2Bin($test), 0, 48);
-                                                       $baseIPBin = substr(t3lib_div::IPv6Hex2Bin($baseIP), 0, 48);
+                                                       $testBin = substr(self::IPv6Hex2Bin($test), 0, 48);
+                                                       $baseIPBin = substr(self::IPv6Hex2Bin($baseIP), 0, 48);
                                                        $success = strcmp($testBin, $baseIPBin)==0 ? true : false;
                                                break;
                                                case '64':
-                                                       $testBin = substr(t3lib_div::IPv6Hex2Bin($test), 0, 64);
-                                                       $baseIPBin = substr(t3lib_div::IPv6Hex2Bin($baseIP), 0, 64);
+                                                       $testBin = substr(self::IPv6Hex2Bin($test), 0, 64);
+                                                       $baseIPBin = substr(self::IPv6Hex2Bin($baseIP), 0, 64);
                                                        $success = strcmp($testBin, $baseIPBin)==0 ? true : false;
                                                break;
                                                default:
                                                        $success = false;
                                        }
                                } else {
-                                       if (t3lib_div::validIPv6($test))        {       // test on full ip address 128 bits
-                                               $testBin = t3lib_div::IPv6Hex2Bin($test);
-                                               $baseIPBin = t3lib_div::IPv6Hex2Bin($baseIP);
+                                       if (self::validIPv6($test))     {       // test on full ip address 128 bits
+                                               $testBin = self::IPv6Hex2Bin($test);
+                                               $baseIPBin = self::IPv6Hex2Bin($baseIP);
                                                $success = strcmp($testBin, $baseIPBin)==0 ? true : false;
                                        }
                                }
@@ -867,7 +867,7 @@ final class t3lib_div {
        public static function cmpFQDN($baseIP, $list)        {
                if (count(explode('.',$baseIP))==4)     {
                        $resolvedHostName = explode('.', gethostbyaddr($baseIP));
-                       $values = t3lib_div::trimExplode(',',$list,1);
+                       $values = self::trimExplode(',',$list,1);
 
                        foreach($values as $test)       {
                                $hostNameParts = explode('.',$test);
@@ -1011,7 +1011,7 @@ final class t3lib_div {
                global $TYPO3_CONF_VARS;
                $currVersionStr = $TYPO3_CONF_VARS['SYS']['compat_version'] ? $TYPO3_CONF_VARS['SYS']['compat_version'] : TYPO3_branch;
 
-               if (t3lib_div::int_from_ver($currVersionStr) < t3lib_div::int_from_ver($verNumberStr))  {
+               if (self::int_from_ver($currVersionStr) < self::int_from_ver($verNumberStr))    {
                        return FALSE;
                } else {
                        return TRUE;
@@ -1055,7 +1055,7 @@ final class t3lib_div {
                if (is_array($in_list)) die('t3lib_div::uniqueList() does NOT support array arguments anymore! Only string comma lists!');
                if (isset($secondParameter))    die('t3lib_div::uniqueList() does NOT support more than a single argument value anymore. You have specified more than one.');
 
-               return implode(',',array_unique(t3lib_div::trimExplode(',',$in_list,1)));
+               return implode(',',array_unique(self::trimExplode(',',$in_list,1)));
        }
 
        /**
@@ -1104,7 +1104,7 @@ final class t3lib_div {
         * @return      string          Processed input value. See function description.
         */
        public static function dirname($path)   {
-               $p = t3lib_div::revExplode('/',$path,2);
+               $p = self::revExplode('/',$path,2);
                return count($p)==2 ? $p[0] : '';
        }
 
@@ -1121,9 +1121,9 @@ final class t3lib_div {
         */
        public static function modifyHTMLColor($color,$R,$G,$B) {
                // This takes a hex-color (# included!) and adds $R, $G and $B to the HTML-color (format: #xxxxxx) and returns the new color
-               $nR = t3lib_div::intInRange(hexdec(substr($color,1,2))+$R,0,255);
-               $nG = t3lib_div::intInRange(hexdec(substr($color,3,2))+$G,0,255);
-               $nB = t3lib_div::intInRange(hexdec(substr($color,5,2))+$B,0,255);
+               $nR = self::intInRange(hexdec(substr($color,1,2))+$R,0,255);
+               $nG = self::intInRange(hexdec(substr($color,3,2))+$G,0,255);
+               $nB = self::intInRange(hexdec(substr($color,5,2))+$B,0,255);
                return '#'.
                        substr('0'.dechex($nR),-2).
                        substr('0'.dechex($nG),-2).
@@ -1140,7 +1140,7 @@ final class t3lib_div {
         * @see modifyHTMLColor()
         */
        public static function modifyHTMLColorAll($color,$all)  {
-               return t3lib_div::modifyHTMLColor($color,$all,$all,$all);
+               return self::modifyHTMLColor($color,$all,$all,$all);
        }
 
        /**
@@ -1342,11 +1342,11 @@ final class t3lib_div {
                        $valueLenO=strcspn($string,'(');
                        $valueLenC=strcspn($string,')');
                        if ($valueLenC==strlen($string) || $valueLenC < $valueLenO)     {
-                               $value = t3lib_div::calcPriority(substr($string,0,$valueLenC));
+                               $value = self::calcPriority(substr($string,0,$valueLenC));
                                $string = $value.substr($string,$valueLenC+1);
                                return $string;
                        } else {
-                               $string = substr($string,0,$valueLenO).t3lib_div::calcParenthesis(substr($string,$valueLenO+1));
+                               $string = substr($string,0,$valueLenO).self::calcParenthesis(substr($string,$valueLenO+1));
                        }
                                // Security:
                        $securC--;
@@ -1747,7 +1747,7 @@ final class t3lib_div {
        public static function removeArrayEntryByValue(array $array, $cmpValue) {
                foreach ($array as $k => $v) {
                        if (is_array($v)) {
-                               $array[$k] = t3lib_div::removeArrayEntryByValue($v, $cmpValue);
+                               $array[$k] = self::removeArrayEntryByValue($v, $cmpValue);
                        } elseif (!strcmp($v, $cmpValue)) {
                                unset($array[$k]);
                        }
@@ -1783,7 +1783,7 @@ final class t3lib_div {
                if ($array) {
                                // Convert strings to arrays:
                        if (is_string($keepItems)) {
-                               $keepItems = t3lib_div::trimExplode(',', $keepItems);
+                               $keepItems = self::trimExplode(',', $keepItems);
                        }
                                // create_function() returns a string:
                        if (!is_string($getValueFunc)) {
@@ -1819,7 +1819,7 @@ final class t3lib_div {
                foreach($theArray as $Akey => $AVal)    {
                        $thisKeyName = $name ? $name.'['.$Akey.']' : $Akey;
                        if (is_array($AVal))    {
-                               $str = t3lib_div::implodeArrayForUrl($thisKeyName,$AVal,$str,$skipBlank,$rawurlencodeParamName);
+                               $str = self::implodeArrayForUrl($thisKeyName,$AVal,$str,$skipBlank,$rawurlencodeParamName);
                        } else {
                                if (!$skipBlank || strcmp($AVal,''))    {
                                        $str.='&'.($rawurlencodeParamName ? rawurlencode($thisKeyName) : $thisKeyName).
@@ -1865,13 +1865,13 @@ final class t3lib_div {
         * @return      array           Output array with selected variables.
         */
        public static function compileSelectedGetVarsFromArray($varList,array $getArray,$GPvarAlt=1)    {
-               $keys = t3lib_div::trimExplode(',',$varList,1);
+               $keys = self::trimExplode(',',$varList,1);
                $outArr = array();
                foreach($keys as $v)    {
                        if (isset($getArray[$v]))       {
                                $outArr[$v] = $getArray[$v];
                        } elseif ($GPvarAlt) {
-                               $outArr[$v] = t3lib_div::_GP($v);
+                               $outArr[$v] = self::_GP($v);
                        }
                }
                return $outArr;
@@ -1890,7 +1890,7 @@ final class t3lib_div {
        public static function addSlashesOnArray(array &$theArray)      {
                foreach ($theArray as &$value) {
                        if (is_array($value)) {
-                               t3lib_div::addSlashesOnArray($value);
+                               self::addSlashesOnArray($value);
                        } else {
                                $value = addslashes($value);
                        }
@@ -1912,7 +1912,7 @@ final class t3lib_div {
        public static function stripSlashesOnArray(array &$theArray)    {
                foreach ($theArray as &$value) {
                        if (is_array($value)) {
-                               t3lib_div::stripSlashesOnArray($value);
+                               self::stripSlashesOnArray($value);
                        } else {
                                $value = stripslashes($value);
                        }
@@ -1930,8 +1930,8 @@ final class t3lib_div {
         * @return      array
         */
        public static function slashArray(array $arr,$cmd)      {
-               if ($cmd=='strip')      t3lib_div::stripSlashesOnArray($arr);
-               if ($cmd=='add')        t3lib_div::addSlashesOnArray($arr);
+               if ($cmd=='strip')      self::stripSlashesOnArray($arr);
+               if ($cmd=='add')        self::addSlashesOnArray($arr);
                return $arr;
        }
 
@@ -1969,7 +1969,7 @@ final class t3lib_div {
                foreach ($arr1 as $key => $val) {
                        if(is_array($arr0[$key])) {
                                if (is_array($arr1[$key]))      {
-                                       $arr0[$key] = t3lib_div::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys,$includeEmtpyValues);
+                                       $arr0[$key] = self::array_merge_recursive_overrule($arr0[$key],$arr1[$key],$notAddKeys,$includeEmtpyValues);
                                }
                        } else {
                                if ($notAddKeys) {
@@ -2046,7 +2046,7 @@ final class t3lib_div {
                foreach ($ts as $key => $value) {
                        if (is_array($value)) {
                                $key = rtrim($key, '.');
-                               $out[$key] = t3lib_div::removeDotsFromTS($value);
+                               $out[$key] = self::removeDotsFromTS($value);
                        } else {
                                $out[$key] = $value;
                        }
@@ -2085,7 +2085,7 @@ final class t3lib_div {
         * @return      array           Array with the attribute values.
         */
        public static function get_tag_attributes($tag) {
-               $components = t3lib_div::split_tag_attributes($tag);
+               $components = self::split_tag_attributes($tag);
                $name = '';      // attribute name is stored here
                $valuemode = false;
                $attributes = array();
@@ -2181,7 +2181,7 @@ final class t3lib_div {
        public static function implodeParams(array $arr,$xhtmlSafe=FALSE,$dontOmitBlankAttribs=FALSE)   {
                self::logDeprecatedFunction();
 
-               return t3lib_div::implodeAttributes($arr,$xhtmlSafe,$dontOmitBlankAttribs);
+               return self::implodeAttributes($arr,$xhtmlSafe,$dontOmitBlankAttribs);
        }
 
        /**
@@ -2274,8 +2274,8 @@ final class t3lib_div {
                                                        $startPoint+1,
                                                        $key-$startPoint-1
                                                );
-                                               #$oldtagi=array('XMLvalue'=>t3lib_div::xmlRecompileFromStructValArray($partArray));
-                                               $oldtagi['XMLvalue']=t3lib_div::xmlRecompileFromStructValArray($partArray);
+                                               #$oldtagi=array('XMLvalue'=>self::xmlRecompileFromStructValArray($partArray));
+                                               $oldtagi['XMLvalue']=self::xmlRecompileFromStructValArray($partArray);
                                        } else {
                                                $oldtagi['XMLvalue']=$oldtagi['values'][0];
                                        }
@@ -2317,7 +2317,7 @@ final class t3lib_div {
 
                        // Return XML:
                return '<?xml version="1.0" encoding="'.htmlspecialchars($charset).'" standalone="yes" ?>'.chr(10).
-                               t3lib_div::array2xml($array,'',0,$docTag,0, $options);
+                               self::array2xml($array,'',0,$docTag,0, $options);
        }
 
        /**
@@ -2366,7 +2366,7 @@ final class t3lib_div {
                        if(isset($options['grandParentTagMap'][$stackData['grandParentTagName'].'/'.$stackData['parentTagName']])) {            // Use tag based on grand-parent + parent tag name
                                $attr.=' index="'.htmlspecialchars($tagName).'"';
                                $tagName = (string)$options['grandParentTagMap'][$stackData['grandParentTagName'].'/'.$stackData['parentTagName']];
-                       }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM']) && t3lib_div::testInt($tagName)) {              // Use tag based on parent tag name + if current tag is numeric
+                       }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM']) && self::testInt($tagName)) {           // Use tag based on parent tag name + if current tag is numeric
                                $attr.=' index="'.htmlspecialchars($tagName).'"';
                                $tagName = (string)$options['parentTagMap'][$stackData['parentTagName'].':_IS_NUM'];
                        }elseif(isset($options['parentTagMap'][$stackData['parentTagName'].':'.$tagName])) {            // Use tag based on parent tag name + current tag
@@ -2403,7 +2403,7 @@ final class t3lib_div {
                                }
 
                                $content = $nl .
-                                                       t3lib_div::array2xml(
+                                                       self::array2xml(
                                                                $v,
                                                                $NSprefix,
                                                                $level+1,
@@ -2656,7 +2656,7 @@ final class t3lib_div {
        public static function xmlGetHeaderAttribs($xmlData)    {
                $match = array();
                if (preg_match('/^\s*<\?xml([^>]*)\?\>/', $xmlData, $match))    {
-                       return t3lib_div::get_tag_attributes($match[1]);
+                       return self::get_tag_attributes($match[1]);
                }
        }
 
@@ -2675,7 +2675,7 @@ final class t3lib_div {
                }
                catch(JSMinException $e) {
                        $error = 'Error while minifying JavaScript: ' . $e->getMessage();
-                       t3lib_div::devLog($error, 't3lib_div', 2,
+                       self::devLog($error, 't3lib_div', 2,
                                array('JavaScript' => $script, 'Stack trace' => $e->getTrace()));
                }
                return $script;
@@ -2899,7 +2899,7 @@ final class t3lib_div {
                        if ($res===false)       return false;
 
                        if ($changePermissions) {       // Change the permissions only if the file has just been created
-                               t3lib_div::fixPermissions($file);
+                               self::fixPermissions($file);
                        }
 
                        return true;
@@ -2940,11 +2940,11 @@ final class t3lib_div {
                $fI['dirname'].= '/';
 
                        // Check parts:
-               if (t3lib_div::validPathStr($filepath) && $fI['basename'] && strlen($fI['basename'])<60)        {
+               if (self::validPathStr($filepath) && $fI['basename'] && strlen($fI['basename'])<60)     {
                        if (defined('PATH_site'))       {
                                $dirName = PATH_site.'typo3temp/';      // Setting main temporary directory name (standard)
                                if (@is_dir($dirName))  {
-                                       if (t3lib_div::isFirstPartOfStr($fI['dirname'],$dirName))       {
+                                       if (self::isFirstPartOfStr($fI['dirname'],$dirName))    {
 
                                                        // Checking if the "subdir" is found:
                                                $subdir = substr($fI['dirname'],strlen($dirName));
@@ -2952,14 +2952,14 @@ final class t3lib_div {
                                                        if (preg_match('/^[[:alnum:]_]+\/$/',$subdir) || preg_match('/^[[:alnum:]_]+\/[[:alnum:]_]+\/$/',$subdir))      {
                                                                $dirName.= $subdir;
                                                                if (!@is_dir($dirName)) {
-                                                                       t3lib_div::mkdir_deep(PATH_site.'typo3temp/', $subdir);
+                                                                       self::mkdir_deep(PATH_site.'typo3temp/', $subdir);
                                                                }
                                                        } else return 'Subdir, "'.$subdir.'", was NOT on the form "[[:alnum:]_]/" or  "[[:alnum:]_]/[[:alnum:]_]/"';
                                                }
                                                        // Checking dir-name again (sub-dir might have been created):
                                                if (@is_dir($dirName))  {
                                                        if ($filepath == $dirName.$fI['basename'])      {
-                                                               t3lib_div::writeFile($filepath, $content);
+                                                               self::writeFile($filepath, $content);
                                                                if (!@is_file($filepath))       return 'File not written to disk! Write permission error in filesystem?';
                                                        } else return 'Calculated filelocation didn\'t match input $filepath!';
                                                } else return '"'.$dirName.'" is not a directory!';
@@ -2998,12 +2998,12 @@ final class t3lib_div {
         * @return      string          If error, returns error string.
         */
        public static function mkdir_deep($destination,$deepDir)        {
-               $allParts = t3lib_div::trimExplode('/',$deepDir,1);
+               $allParts = self::trimExplode('/',$deepDir,1);
                $root = '';
                foreach($allParts as $part)     {
                        $root.= $part.'/';
                        if (!is_dir($destination.$root))        {
-                               t3lib_div::mkdir($destination.$root);
+                               self::mkdir($destination.$root);
                                if (!@is_dir($destination.$root))       {
                                        return 'Error: The directory "'.$destination.$root.'" could not be created...';
                                }
@@ -3029,7 +3029,7 @@ final class t3lib_div {
                                if ($removeNonEmpty==true && $handle = opendir($path))  {
                                        while ($OK && false !== ($file = readdir($handle)))     {
                                                if ($file=='.' || $file=='..') continue;
-                                               $OK = t3lib_div::rmdir($path.'/'.$file,$removeNonEmpty);
+                                               $OK = self::rmdir($path.'/'.$file,$removeNonEmpty);
                                        }
                                        closedir($handle);
                                }
@@ -3097,7 +3097,7 @@ final class t3lib_div {
                                        if (@is_file($path.'/'.$entry)) {
                                                $fI = pathinfo($entry);
                                                $key = md5($path.'/'.$entry);   // Don't change this ever - extensions may depend on the fact that the hash is an md5 of the path! (import/export extension)
-                                               if ((!strlen($extensionList) || t3lib_div::inList($extensionList,strtolower($fI['extension']))) && (!strlen($excludePattern) || !preg_match('/^'.$excludePattern.'$/',$entry))) {
+                                               if ((!strlen($extensionList) || self::inList($extensionList,strtolower($fI['extension']))) && (!strlen($excludePattern) || !preg_match('/^'.$excludePattern.'$/',$entry)))      {
                                                        $filearray[$key]=($prependPath?$path.'/':'').$entry;
                                                                if ($order=='mtime') {$sortarray[$key]=filemtime($path.'/'.$entry);}
                                                                elseif ($order) {$sortarray[$key]=$entry;}
@@ -3137,13 +3137,13 @@ final class t3lib_div {
         */
        public static function getAllFilesAndFoldersInPath(array $fileArr,$path,$extList='',$regDirs=0,$recursivityLevels=99,$excludePattern='')        {
                if ($regDirs)   $fileArr[] = $path;
-               $fileArr = array_merge($fileArr, t3lib_div::getFilesInDir($path,$extList,1,1,$excludePattern));
+               $fileArr = array_merge($fileArr, self::getFilesInDir($path,$extList,1,1,$excludePattern));
 
-               $dirs = t3lib_div::get_dirs($path);
+               $dirs = self::get_dirs($path);
                if (is_array($dirs) && $recursivityLevels>0)    {
                        foreach ($dirs as $subdirs)     {
                                if ((string)$subdirs!='' && (!strlen($excludePattern) || !preg_match('/^'.$excludePattern.'$/',$subdirs)))      {
-                                       $fileArr = t3lib_div::getAllFilesAndFoldersInPath($fileArr,$path.$subdirs.'/',$extList,$regDirs,$recursivityLevels-1,$excludePattern);
+                                       $fileArr = self::getAllFilesAndFoldersInPath($fileArr,$path.$subdirs.'/',$extList,$regDirs,$recursivityLevels-1,$excludePattern);
                                }
                        }
                }
@@ -3160,7 +3160,7 @@ final class t3lib_div {
         */
        public static function removePrefixPathFromList(array $fileArr,$prefixToRemove) {
                foreach ($fileArr as $k => &$absFileRef) {
-                       if (t3lib_div::isFirstPartOfStr($absFileRef, $prefixToRemove)) {
+                       if (self::isFirstPartOfStr($absFileRef, $prefixToRemove)) {
                                $absFileRef = substr($absFileRef, strlen($prefixToRemove));
                        } else {
                                return 'ERROR: One or more of the files was NOT prefixed with the prefix-path!';
@@ -3219,9 +3219,9 @@ final class t3lib_div {
        public static function locationHeaderUrl($path) {
                $uI = parse_url($path);
                if (substr($path,0,1)=='/')     { // relative to HOST
-                       $path = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').$path;
+                       $path = self::getIndpEnv('TYPO3_REQUEST_HOST').$path;
                } elseif (!$uI['scheme'])       { // No scheme either
-                       $path = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').$path;
+                       $path = self::getIndpEnv('TYPO3_REQUEST_DIR').$path;
                }
                return $path;
        }
@@ -3352,7 +3352,7 @@ final class t3lib_div {
                                                <td valign="top"><font face="Verdana,Arial" size="1">'.htmlspecialchars((string)$key).'</font></td>
                                                <td>';
                                        if (is_array($val))     {
-                                               $result.=t3lib_div::view_array($val);
+                                               $result.=self::view_array($val);
                                        } elseif (is_object($val))      {
                                                $string = get_class($val);
                                                if (method_exists($val, '__toString'))  {
@@ -3391,7 +3391,7 @@ final class t3lib_div {
         * @see view_array()
         */
        public static function print_array($array_in)   {
-               echo t3lib_div::view_array($array_in);
+               echo self::view_array($array_in);
        }
 
        /**
@@ -3411,14 +3411,14 @@ final class t3lib_div {
                        ob_start();
                }
 
-               if ($brOrHeader && !t3lib_div::testInt($brOrHeader))    {
+               if ($brOrHeader && !self::testInt($brOrHeader)) {
                        echo '<table class="typo3-debug" border="0" cellpadding="0" cellspacing="0" bgcolor="white" style="border:0px; margin-top:3px; margin-bottom:3px;"><tr><td style="background-color:#bbbbbb; font-family: verdana,arial; font-weight: bold; font-size: 10px;">'.htmlspecialchars((string)$brOrHeader).'</td></tr><tr><td>';
                } elseif ($brOrHeader<0)        {
                        for($a=0;$a<abs(intval($brOrHeader));$a++){echo '<br />';}
                }
 
                if (is_array($var))     {
-                       t3lib_div::print_array($var);
+                       self::print_array($var);
                } elseif (is_object($var))      {
                        echo '<b>|Object:<pre>';
                        print_r($var);
@@ -3429,7 +3429,7 @@ final class t3lib_div {
                        echo '<b>| debug |</b>';
                }
 
-               if ($brOrHeader && !t3lib_div::testInt($brOrHeader))    {
+               if ($brOrHeader && !self::testInt($brOrHeader)) {
                        echo '</td></tr></table>';
                } elseif ($brOrHeader>0)        {
                        for($a=0;$a<intval($brOrHeader);$a++){echo '<br />';}
@@ -3486,7 +3486,7 @@ final class t3lib_div {
                                        $tCells = array();
                                        foreach($headerColumns as $key) {
                                                $tCells[] = '
-                                                       <td><font face="Verdana,Arial" size="1">'.(is_array($singleRow[$key]) ? t3lib_div::debugRows($singleRow[$key],'',TRUE) : htmlspecialchars($singleRow[$key])).'</font></td>';
+                                                       <td><font face="Verdana,Arial" size="1">'.(is_array($singleRow[$key]) ? self::debugRows($singleRow[$key],'',TRUE) : htmlspecialchars($singleRow[$key])).'</font></td>';
                                        }
                                        $tRows[] = '
                                                <tr>'.implode('',$tCells).'
@@ -3543,8 +3543,8 @@ final class t3lib_div {
         * @return      string
         */
        public static function getThisUrl()     {
-               $p=parse_url(t3lib_div::getIndpEnv('TYPO3_REQUEST_SCRIPT'));            // Url of this script
-               $dir=t3lib_div::dirname($p['path']).'/';        // Strip file
+               $p=parse_url(self::getIndpEnv('TYPO3_REQUEST_SCRIPT'));         // Url of this script
+               $dir=self::dirname($p['path']).'/';     // Strip file
                $url = str_replace('//','/',$p['host'].($p['port']?':'.$p['port']:'').$dir);
                return $url;
        }
@@ -3559,8 +3559,8 @@ final class t3lib_div {
         * @return      string
         */
        public static function linkThisScript(array $getParams = array()) {
-               $parts = t3lib_div::getIndpEnv('SCRIPT_NAME');
-               $params = t3lib_div::_GET();
+               $parts = self::getIndpEnv('SCRIPT_NAME');
+               $params = self::_GET();
 
                foreach ($getParams as $key => $value) {
                        if ($value !== '') {
@@ -3570,7 +3570,7 @@ final class t3lib_div {
                        }
                }
 
-               $pString = t3lib_div::implodeArrayForUrl('', $params);
+               $pString = self::implodeArrayForUrl('', $params);
 
                return $pString ? $parts . '?' . preg_replace('/^&/', '', $pString) : $parts;
        }
@@ -3590,10 +3590,10 @@ final class t3lib_div {
                if ($parts['query'])    {
                        parse_str($parts['query'],$getP);
                }
-               $getP = t3lib_div::array_merge_recursive_overrule($getP,$getParams);
+               $getP = self::array_merge_recursive_overrule($getP,$getParams);
                $uP = explode('?',$url);
 
-               $params = t3lib_div::implodeArrayForUrl('',$getP);
+               $params = self::implodeArrayForUrl('',$getP);
                $outurl = $uP[0].($params ? '?'.substr($params, 1) : '');
 
                return $outurl;
@@ -3679,8 +3679,8 @@ final class t3lib_div {
                        case 'SCRIPT_NAME':
                                $retVal = (PHP_SAPI=='cgi'||PHP_SAPI=='cgi-fcgi')&&($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) ? ($_SERVER['ORIG_PATH_INFO']?$_SERVER['ORIG_PATH_INFO']:$_SERVER['PATH_INFO']) : ($_SERVER['ORIG_SCRIPT_NAME']?$_SERVER['ORIG_SCRIPT_NAME']:$_SERVER['SCRIPT_NAME']);
                                        // add a prefix if TYPO3 is behind a proxy: ext-domain.com => int-server.com/prefix
-                               if (t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
-                                       if (t3lib_div::getIndpEnv('TYPO3_SSL') && $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL']) {
+                               if (self::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
+                                       if (self::getIndpEnv('TYPO3_SSL') && $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL']) {
                                                $retVal = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL'].$retVal;
                                        } elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefix']) {
                                                $retVal = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefix'].$retVal;
@@ -3696,14 +3696,14 @@ final class t3lib_div {
                                        list($v,$n) = explode('|',$GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']);
                                        $retVal = $GLOBALS[$v][$n];
                                } elseif (!$_SERVER['REQUEST_URI'])     {       // This is for ISS/CGI which does not have the REQUEST_URI available.
-                                       $retVal = '/'.ltrim(t3lib_div::getIndpEnv('SCRIPT_NAME'), '/').
+                                       $retVal = '/'.ltrim(self::getIndpEnv('SCRIPT_NAME'), '/').
                                                ($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'');
                                } else {
                                        $retVal = $_SERVER['REQUEST_URI'];
                                }
                                        // add a prefix if TYPO3 is behind a proxy: ext-domain.com => int-server.com/prefix
-                               if (t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
-                                       if (t3lib_div::getIndpEnv('TYPO3_SSL') && $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL']) {
+                               if (self::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
+                                       if (self::getIndpEnv('TYPO3_SSL') && $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL']) {
                                                $retVal = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefixSSL'].$retVal;
                                        } elseif ($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefix']) {
                                                $retVal = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyPrefix'].$retVal;
@@ -3714,18 +3714,18 @@ final class t3lib_div {
                                        // $_SERVER['PATH_INFO']!=$_SERVER['SCRIPT_NAME'] is necessary because some servers (Windows/CGI) are seen to set PATH_INFO equal to script_name
                                        // Further, there must be at least one '/' in the path - else the PATH_INFO value does not make sense.
                                        // IF 'PATH_INFO' never works for our purpose in TYPO3 with CGI-servers, then 'PHP_SAPI=='cgi'' might be a better check. Right now strcmp($_SERVER['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) will always return false for CGI-versions, but that is only as long as SCRIPT_NAME is set equal to PATH_INFO because of PHP_SAPI=='cgi' (see above)
-//                             if (strcmp($_SERVER['PATH_INFO'],t3lib_div::getIndpEnv('SCRIPT_NAME')) && count(explode('/',$_SERVER['PATH_INFO']))>1)  {
+//                             if (strcmp($_SERVER['PATH_INFO'],self::getIndpEnv('SCRIPT_NAME')) && count(explode('/',$_SERVER['PATH_INFO']))>1)       {
                                if (PHP_SAPI!='cgi' && PHP_SAPI!='cgi-fcgi')    {
                                        $retVal = $_SERVER['PATH_INFO'];
                                }
                        break;
                        case 'TYPO3_REV_PROXY':
-                               $retVal = t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP']);
+                               $retVal = self::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP']);
                        break;
                        case 'REMOTE_ADDR':
                                $retVal = $_SERVER['REMOTE_ADDR'];
-                               if (t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
-                                       $ip = t3lib_div::trimExplode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
+                               if (self::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
+                                       $ip = self::trimExplode(',', $_SERVER['HTTP_X_FORWARDED_FOR']);
                                                // choose which IP in list to use
                                        if (count($ip)) {
                                                switch ($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyHeaderMultiValue']) {
@@ -3741,15 +3741,15 @@ final class t3lib_div {
                                                        break;
                                                }
                                        }
-                                       if (t3lib_div::validIP($ip)) {
+                                       if (self::validIP($ip)) {
                                                $retVal = $ip;
                                        }
                                }
                        break;
                        case 'HTTP_HOST':
                                $retVal = $_SERVER['HTTP_HOST'];
-                               if (t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
-                                       $host = t3lib_div::trimExplode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
+                               if (self::cmpIP($_SERVER['REMOTE_ADDR'], $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'])) {
+                                       $host = self::trimExplode(',', $_SERVER['HTTP_X_FORWARDED_HOST']);
                                                // choose which host in list to use
                                        if (count($host)) {
                                                switch ($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyHeaderMultiValue']) {
@@ -3782,8 +3782,8 @@ final class t3lib_div {
                        case 'TYPO3_DOCUMENT_ROOT':
                                // Some CGI-versions (LA13CGI) and mod-rewrite rules on MODULE versions will deliver a 'wrong' DOCUMENT_ROOT (according to our description). Further various aliases/mod_rewrite rules can disturb this as well.
                                // Therefore the DOCUMENT_ROOT is now always calculated as the SCRIPT_FILENAME minus the end part shared with SCRIPT_NAME.
-                               $SFN = t3lib_div::getIndpEnv('SCRIPT_FILENAME');
-                               $SN_A = explode('/',strrev(t3lib_div::getIndpEnv('SCRIPT_NAME')));
+                               $SFN = self::getIndpEnv('SCRIPT_FILENAME');
+                               $SN_A = explode('/',strrev(self::getIndpEnv('SCRIPT_NAME')));
                                $SFN_A = explode('/',strrev($SFN));
                                $acc = array();
                                foreach ($SN_A as $kk => $vv) {
@@ -3796,47 +3796,47 @@ final class t3lib_div {
                                $retVal = $DR;
                        break;
                        case 'TYPO3_HOST_ONLY':
-                               $p = explode(':',t3lib_div::getIndpEnv('HTTP_HOST'));
+                               $p = explode(':',self::getIndpEnv('HTTP_HOST'));
                                $retVal = $p[0];
                        break;
                        case 'TYPO3_PORT':
-                               $p = explode(':',t3lib_div::getIndpEnv('HTTP_HOST'));
+                               $p = explode(':',self::getIndpEnv('HTTP_HOST'));
                                $retVal = $p[1];
                        break;
                        case 'TYPO3_REQUEST_HOST':
-                               $retVal = (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').
-                                       t3lib_div::getIndpEnv('HTTP_HOST');
+                               $retVal = (self::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').
+                                       self::getIndpEnv('HTTP_HOST');
                        break;
                        case 'TYPO3_REQUEST_URL':
-                               $retVal = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').t3lib_div::getIndpEnv('REQUEST_URI');
+                               $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST').self::getIndpEnv('REQUEST_URI');
                        break;
                        case 'TYPO3_REQUEST_SCRIPT':
-                               $retVal = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').t3lib_div::getIndpEnv('SCRIPT_NAME');
+                               $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST').self::getIndpEnv('SCRIPT_NAME');
                        break;
                        case 'TYPO3_REQUEST_DIR':
-                               $retVal = t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST').t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')).'/';
+                               $retVal = self::getIndpEnv('TYPO3_REQUEST_HOST').self::dirname(self::getIndpEnv('SCRIPT_NAME')).'/';
                        break;
                        case 'TYPO3_SITE_URL':
                                if (defined('PATH_thisScript') && defined('PATH_site')) {
                                        $lPath = substr(dirname(PATH_thisScript),strlen(PATH_site)).'/';
-                                       $url = t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR');
+                                       $url = self::getIndpEnv('TYPO3_REQUEST_DIR');
                                        $siteUrl = substr($url,0,-strlen($lPath));
                                        if (substr($siteUrl,-1)!='/')   $siteUrl.='/';
                                        $retVal = $siteUrl;
                                }
                        break;
                        case 'TYPO3_SITE_PATH':
-                               $retVal = substr(t3lib_div::getIndpEnv('TYPO3_SITE_URL'), strlen(t3lib_div::getIndpEnv('TYPO3_REQUEST_HOST')));
+                               $retVal = substr(self::getIndpEnv('TYPO3_SITE_URL'), strlen(self::getIndpEnv('TYPO3_REQUEST_HOST')));
                        break;
                        case 'TYPO3_SITE_SCRIPT':
-                               $retVal = substr(t3lib_div::getIndpEnv('TYPO3_REQUEST_URL'),strlen(t3lib_div::getIndpEnv('TYPO3_SITE_URL')));
+                               $retVal = substr(self::getIndpEnv('TYPO3_REQUEST_URL'),strlen(self::getIndpEnv('TYPO3_SITE_URL')));
                        break;
                        case 'TYPO3_SSL':
                                $proxySSL = trim($GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxySSL']);
                                if ($proxySSL == '*') {
                                        $proxySSL = $GLOBALS['TYPO3_CONF_VARS']['SYS']['reverseProxyIP'];
                                }
-                               if (t3lib_div::cmpIP($_SERVER['REMOTE_ADDR'], $proxySSL))       {
+                               if (self::cmpIP($_SERVER['REMOTE_ADDR'], $proxySSL))    {
                                        $retVal = true;
                                } else {
                                        $retVal = $_SERVER['SSL_SESSION_ID'] || !strcasecmp($_SERVER['HTTPS'], 'on') || !strcmp($_SERVER['HTTPS'], '1') ? true : false; // see http://bugs.typo3.org/view.php?id=3909
@@ -3845,7 +3845,7 @@ final class t3lib_div {
                        case '_ARRAY':
                                $out = array();
                                        // Here, list ALL possible keys to this function for debug display.
-                               $envTestVars = t3lib_div::trimExplode(',','
+                               $envTestVars = self::trimExplode(',','
                                        HTTP_HOST,
                                        TYPO3_HOST_ONLY,
                                        TYPO3_PORT,
@@ -3869,7 +3869,7 @@ final class t3lib_div {
                                        HTTP_USER_AGENT,
                                        HTTP_ACCEPT_LANGUAGE',1);
                                foreach ($envTestVars as $v) {
-                                       $out[$v]=t3lib_div::getIndpEnv($v);
+                                       $out[$v]=self::getIndpEnv($v);
                                }
                                reset($out);
                                $retVal = $out;
@@ -3895,7 +3895,7 @@ final class t3lib_div {
         * @return      array           Parsed information about the HTTP_USER_AGENT in categories BROWSER, VERSION, SYSTEM and FORMSTYLE
         */
        public static function clientInfo($useragent='')        {
-               if (!$useragent) $useragent=t3lib_div::getIndpEnv('HTTP_USER_AGENT');
+               if (!$useragent) $useragent=self::getIndpEnv('HTTP_USER_AGENT');
 
                $bInfo=array();
                        // Which browser?
@@ -3957,7 +3957,7 @@ final class t3lib_div {
        public static function getHostname($requestHost=TRUE)   {
                $host = '';
                if ($requestHost && (!defined('TYPO3_cliMode') || !TYPO3_cliMode))      {
-                       $host = t3lib_div::getIndpEnv('HTTP_HOST');
+                       $host = self::getIndpEnv('HTTP_HOST');
                }
                if (!$host)     {
                                // will fail for PHP 4.1 and 4.2
@@ -4030,12 +4030,12 @@ final class t3lib_div {
                        if (strcmp($extKey,'') && t3lib_extMgm::isLoaded($extKey) && strcmp($local,'')) {
                                $filename = t3lib_extMgm::extPath($extKey).$local;
                        }
-               } elseif (!t3lib_div::isAbsPath($filename))     {       // relative. Prepended with $relPathPrefix
+               } elseif (!self::isAbsPath($filename))  {       // relative. Prepended with $relPathPrefix
                        $filename=$relPathPrefix.$filename;
-               } elseif ($onlyRelative && !t3lib_div::isFirstPartOfStr($filename,$relPathPrefix)) {    // absolute, but set to blank if not allowed
+               } elseif ($onlyRelative && !self::isFirstPartOfStr($filename,$relPathPrefix)) { // absolute, but set to blank if not allowed
                        $filename='';
                }
-               if (strcmp($filename,'') && t3lib_div::validPathStr($filename)) {       // checks backpath.
+               if (strcmp($filename,'') && self::validPathStr($filename))      {       // checks backpath.
                        return $filename;
                }
        }
@@ -4076,11 +4076,11 @@ final class t3lib_div {
         * @return      boolean
         */
        public static function isAllowedAbsPath($path)  {
-               if (t3lib_div::isAbsPath($path) &&
-                       t3lib_div::validPathStr($path) &&
-                               (       t3lib_div::isFirstPartOfStr($path,PATH_site)
+               if (self::isAbsPath($path) &&
+                       self::validPathStr($path) &&
+                               (       self::isFirstPartOfStr($path,PATH_site)
                                        ||
-                                       ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && t3lib_div::isFirstPartOfStr($path,$GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']))
+                                       ($GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath'] && self::isFirstPartOfStr($path,$GLOBALS['TYPO3_CONF_VARS']['BE']['lockRootPath']))
                                )
                        )       return true;
        }
@@ -4116,7 +4116,7 @@ final class t3lib_div {
                if (!empty($url) && self::removeXSS($decodedUrl) === $decodedUrl) {
                        $testAbsoluteUrl = self::resolveBackPath($decodedUrl);
                        $testRelativeUrl = self::resolveBackPath(
-                               t3lib_div::dirname(t3lib_div::getIndpEnv('SCRIPT_NAME')) . '/' . $decodedUrl
+                               self::dirname(self::getIndpEnv('SCRIPT_NAME')) . '/' . $decodedUrl
                        );
 
                                // Pass if URL is on the current host:
@@ -4163,7 +4163,7 @@ final class t3lib_div {
                        @copy($source,$destination);
                }
 
-               t3lib_div::fixPermissions($destination);        // Change the permissions of the file
+               self::fixPermissions($destination);     // Change the permissions of the file
 
                        // If here the file is copied and the temporary $source is still around, so when returning false the user can try unlink to delete the $source
                return $uploaded ? $uploadedResult : FALSE;
@@ -4181,7 +4181,7 @@ final class t3lib_div {
         */
        public static function upload_to_tempfile($uploadedFileName)    {
                if (is_uploaded_file($uploadedFileName))        {
-                       $tempFile = t3lib_div::tempnam('upload_temp_');
+                       $tempFile = self::tempnam('upload_temp_');
                        move_uploaded_file($uploadedFileName, $tempFile);
                        return @is_file($tempFile) ? $tempFile : '';
                }
@@ -4198,7 +4198,7 @@ final class t3lib_div {
         * @see upload_to_tempfile(), tempnam()
         */
        public static function unlink_tempfile($uploadedTempFileName)   {
-               if ($uploadedTempFileName && t3lib_div::validPathStr($uploadedTempFileName) && t3lib_div::isFirstPartOfStr($uploadedTempFileName,PATH_site.'typo3temp/') && @is_file($uploadedTempFileName))    {
+               if ($uploadedTempFileName && self::validPathStr($uploadedTempFileName) && self::isFirstPartOfStr($uploadedTempFileName,PATH_site.'typo3temp/') && @is_file($uploadedTempFileName))      {
                        if (unlink($uploadedTempFileName))      return TRUE;
                }
        }
@@ -4231,7 +4231,7 @@ final class t3lib_div {
                if (is_array($uid_or_record))   {
                        $recCopy_temp=array();
                        if ($fields)    {
-                               $fieldArr = t3lib_div::trimExplode(',',$fields,1);
+                               $fieldArr = self::trimExplode(',',$fields,1);
                                foreach ($fieldArr as $k => $v) {
                                        $recCopy_temp[$k]=$uid_or_record[$v];
                                }
@@ -4263,7 +4263,7 @@ final class t3lib_div {
                $pA = array();
                foreach($params as $theP)       {
                        $pKV = explode('=', $theP);     // Splitting single param by '=' sign
-                       if (!t3lib_div::inList('id,type,no_cache,cHash,MP,ftu',$pKV[0]) && !preg_match('/TSFE_ADMIN_PANEL\[.*?\]/',$pKV[0]))    {
+                       if (!self::inList('id,type,no_cache,cHash,MP,ftu',$pKV[0]) && !preg_match('/TSFE_ADMIN_PANEL\[.*?\]/',$pKV[0])) {
                                $pA[rawurldecode($pKV[0])] = (string)rawurldecode($pKV[1]);
                        }
                }
@@ -4278,7 +4278,7 @@ final class t3lib_div {
                                );
                                $hookReference = null;
                                foreach ($cHashParamsHook as $hookFunction)     {
-                                       t3lib_div::callUserFunction($hookFunction, $hookParameters, $hookReference);
+                                       self::callUserFunction($hookFunction, $hookParameters, $hookReference);
                                }
                        }
                }
@@ -4297,8 +4297,8 @@ final class t3lib_div {
         * @see t3lib_div::cHashParams(), t3lib_div::calculateCHash()
         */
        public static function generateCHash($addQueryParams) {
-               $cHashParams = t3lib_div::cHashParams($addQueryParams);
-               $cHash = t3lib_div::calculateCHash($cHashParams);
+               $cHashParams = self::cHashParams($addQueryParams);
+               $cHash = self::calculateCHash($cHashParams);
                return $cHash;
        }
 
@@ -4340,15 +4340,15 @@ final class t3lib_div {
        public static function readLLfile($fileRef, $langKey, $charset = '', $errorMode = 0)    {
 
                $result = FALSE;
-               $file = t3lib_div::getFileAbsFileName($fileRef);
+               $file = self::getFileAbsFileName($fileRef);
                if ($file)      {
                        $baseFile = preg_replace('/\.(php|xml)$/', '', $file);
 
                        if (@is_file($baseFile.'.xml')) {
-                               $LOCAL_LANG = t3lib_div::readLLXMLfile($baseFile.'.xml', $langKey, $charset);
+                               $LOCAL_LANG = self::readLLXMLfile($baseFile.'.xml', $langKey, $charset);
                        } elseif (@is_file($baseFile.'.php'))   {
                                if ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] || $charset)  {
-                                       $LOCAL_LANG = t3lib_div::readLLPHPfile($baseFile.'.php', $langKey, $charset);
+                                       $LOCAL_LANG = self::readLLPHPfile($baseFile.'.php', $langKey, $charset);
                                } else {
                                        include($baseFile.'.php');
                                        if (is_array($LOCAL_LANG))      {
@@ -4365,10 +4365,10 @@ final class t3lib_div {
                        }
                        if (is_array($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef])) {
                                foreach ($GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride'][$fileRef] as $overrideFile) {
-                                       $languageOverrideFileName = t3lib_div::getFileAbsFileName($overrideFile);
+                                       $languageOverrideFileName = self::getFileAbsFileName($overrideFile);
                                        if (@is_file($languageOverrideFileName)) {
-                                               $languageOverrideArray = t3lib_div::readLLXMLfile($languageOverrideFileName, $langKey, $charset);
-                                               $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG, $languageOverrideArray);
+                                               $languageOverrideArray = self::readLLXMLfile($languageOverrideFileName, $langKey, $charset);
+                                               $LOCAL_LANG = self::array_merge_recursive_overrule($LOCAL_LANG, $languageOverrideArray);
                                        }
                                }
                        }
@@ -4395,7 +4395,7 @@ final class t3lib_div {
                } elseif (is_object($GLOBALS['TSFE']))  {
                        $csConvObj = $GLOBALS['TSFE']->csConvObj;
                } else {
-                       $csConvObj = t3lib_div::makeInstance('t3lib_cs');
+                       $csConvObj = self::makeInstance('t3lib_cs');
                }
 
                if (@is_file($fileRef) && $langKey)     {
@@ -4415,7 +4415,7 @@ final class t3lib_div {
                        $hashSource = substr($fileRef,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($fileRef)).'|version=2.3';
                        $cacheFileName = PATH_site.'typo3temp/llxml/'.
                                                        substr(basename($fileRef),10,15).
-                                                       '_'.t3lib_div::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
+                                                       '_'.self::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
                                // Check if cache file exists...
                        if (!@is_file($cacheFileName))  {       // ... if it doesn't, create content and write it:
 
@@ -4442,11 +4442,11 @@ final class t3lib_div {
 
                                        // Cache the content now:
                                $serContent = array('origFile'=>$hashSource, 'LOCAL_LANG'=>array('default'=>$LOCAL_LANG['default'], $langKey=>$LOCAL_LANG[$langKey]));
-                               $res = t3lib_div::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
+                               $res = self::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
                                if ($res)       die('ERROR: '.$res);
                        } else {
                                        // Get content from cache:
-                               $serContent = unserialize(t3lib_div::getUrl($cacheFileName));
+                               $serContent = unserialize(self::getUrl($cacheFileName));
                                $LOCAL_LANG = $serContent['LOCAL_LANG'];
                        }
 
@@ -4470,7 +4470,7 @@ final class t3lib_div {
                } elseif (is_object($GLOBALS['TSFE']))  {
                        $csConvObj = $GLOBALS['TSFE']->csConvObj;
                } else {
-                       $csConvObj = t3lib_div::makeInstance('t3lib_cs');
+                       $csConvObj = self::makeInstance('t3lib_cs');
                }
 
                $LOCAL_LANG = NULL;
@@ -4490,14 +4490,14 @@ final class t3lib_div {
                        $hashSource = substr($fileRef,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($fileRef)).'|version=2.3';
                        $cacheFileName = PATH_site.'typo3temp/llxml/'.
                                                substr(basename($fileRef),10,15).
-                                               '_'.t3lib_div::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
+                                               '_'.self::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
 
                                // Check if cache file exists...
                        if (!@is_file($cacheFileName))  {       // ... if it doesn't, create content and write it:
 
                                        // Read XML, parse it.
-                               $xmlString = t3lib_div::getUrl($fileRef);
-                               $xmlContent = t3lib_div::xml2array($xmlString);
+                               $xmlString = self::getUrl($fileRef);
+                               $xmlContent = self::xml2array($xmlString);
                                if (!is_array($xmlContent)) {
                                        $fileName = substr($fileRef, strlen(PATH_site));
                                        die('The file "' . $fileName . '" is no TYPO3 language file!');
@@ -4522,8 +4522,8 @@ final class t3lib_div {
                                if ($langKey!='default')        {
 
                                                // If no entry is found for the language key, then force a value depending on meta-data setting. By default an automated filename will be used:
-                                       $LOCAL_LANG[$langKey] = t3lib_div::llXmlAutoFileName($fileRef, $langKey);
-                                       $localized_file = t3lib_div::getFileAbsFileName($LOCAL_LANG[$langKey]);
+                                       $LOCAL_LANG[$langKey] = self::llXmlAutoFileName($fileRef, $langKey);
+                                       $localized_file = self::getFileAbsFileName($LOCAL_LANG[$langKey]);
                                        if (!@is_file($localized_file) && isset($xmlContent['data'][$langKey])) {
                                                $LOCAL_LANG[$langKey] = $xmlContent['data'][$langKey];
                                        }
@@ -4538,11 +4538,11 @@ final class t3lib_div {
 
                                        // Cache the content now:
                                $serContent = array('origFile'=>$hashSource, 'LOCAL_LANG'=>array('default'=>$LOCAL_LANG['default'], $langKey=>$LOCAL_LANG[$langKey]));
-                               $res = t3lib_div::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
+                               $res = self::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
                                if ($res)       die('ERROR: '.$res);
                        } else {
                                        // Get content from cache:
-                               $serContent = unserialize(t3lib_div::getUrl($cacheFileName));
+                               $serContent = unserialize(self::getUrl($cacheFileName));
                                $LOCAL_LANG = $serContent['LOCAL_LANG'];
                        }
 
@@ -4550,21 +4550,21 @@ final class t3lib_div {
                        if ($langKey!='default' && is_string($LOCAL_LANG[$langKey]) && strlen($LOCAL_LANG[$langKey]))   {
 
                                        // Look for localized file:
-                               $localized_file = t3lib_div::getFileAbsFileName($LOCAL_LANG[$langKey]);
+                               $localized_file = self::getFileAbsFileName($LOCAL_LANG[$langKey]);
                                if ($localized_file && @is_file($localized_file))       {
 
                                                // Cache file name:
                                        $hashSource = substr($localized_file,strlen(PATH_site)).'|'.date('d-m-Y H:i:s',filemtime($localized_file)).'|version=2.3';
                                        $cacheFileName = PATH_site.'typo3temp/llxml/EXT_'.
                                                                        substr(basename($localized_file),10,15).
-                                                                       '_'.t3lib_div::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
+                                                                       '_'.self::shortMD5($hashSource).'.'.$langKey.'.'.$targetCharset.'.cache';
 
                                                // Check if cache file exists...
                                        if (!@is_file($cacheFileName))  {       // ... if it doesn't, create content and write it:
 
                                                        // Read and parse XML content:
-                                               $local_xmlString = t3lib_div::getUrl($localized_file);
-                                               $local_xmlContent = t3lib_div::xml2array($local_xmlString);
+                                               $local_xmlString = self::getUrl($localized_file);
+                                               $local_xmlContent = self::xml2array($local_xmlString);
                                                if (!is_array($local_xmlContent)) {
                                                        $fileName = substr($localized_file, strlen(PATH_site));
                                                        die('The file "' . $fileName . '" is no TYPO3 language file!');
@@ -4580,13 +4580,13 @@ final class t3lib_div {
 
                                                        // Cache the content now:
                                                $serContent = array('extlang'=>$langKey, 'origFile'=>$hashSource, 'EXT_DATA'=>$LOCAL_LANG[$langKey]);
-                                               $res = t3lib_div::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
+                                               $res = self::writeFileToTypo3tempDir($cacheFileName, serialize($serContent));
                                                if ($res) {
                                                        die('ERROR: '.$res);
                                                }
                                        } else {
                                                        // Get content from cache:
-                                               $serContent = unserialize(t3lib_div::getUrl($cacheFileName));
+                                               $serContent = unserialize(self::getUrl($cacheFileName));
                                                $LOCAL_LANG[$langKey] = $serContent['EXT_DATA'];
                                        }
                                } else {
@@ -4608,12 +4608,12 @@ final class t3lib_div {
        public static function llXmlAutoFileName($fileRef,$language)    {
                        // Analyse file reference:
                $location = 'typo3conf/l10n/'.$language.'/';    // Default location of translations
-               if (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3.'sysext/')) {       // Is system:
+               if (self::isFirstPartOfStr($fileRef,PATH_typo3.'sysext/'))      {       // Is system:
                        $validatedPrefix = PATH_typo3.'sysext/';
                        #$location = 'EXT:csh_'.$language.'/';  // For system extensions translations are found in "csh_*" extensions (language packs)
-               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3.'ext/'))      {       // Is global:
+               } elseif (self::isFirstPartOfStr($fileRef,PATH_typo3.'ext/'))   {       // Is global:
                        $validatedPrefix = PATH_typo3.'ext/';
-               } elseif (t3lib_div::isFirstPartOfStr($fileRef,PATH_typo3conf.'ext/'))  {       // Is local:
+               } elseif (self::isFirstPartOfStr($fileRef,PATH_typo3conf.'ext/'))       {       // Is local:
                        $validatedPrefix = PATH_typo3conf.'ext/';
                } else {
                        $validatedPrefix = '';
@@ -4623,7 +4623,7 @@ final class t3lib_div {
 
                                // Divide file reference into extension key, directory (if any) and base name:
                        list($file_extKey,$file_extPath) = explode('/',substr($fileRef,strlen($validatedPrefix)),2);
-                       $temp = t3lib_div::revExplode('/',$file_extPath,2);
+                       $temp = self::revExplode('/',$file_extPath,2);
                        if (count($temp)==1)    array_unshift($temp,'');        // Add empty first-entry if not there.
                        list($file_extPath,$file_fileName) = $temp;
 
@@ -4664,7 +4664,7 @@ final class t3lib_div {
                                if ($dcf) {
                                        if (!strcmp(substr($dcf,0,6),'T3LIB:')) {
                                                include(PATH_t3lib.'stddb/'.substr($dcf,6));
-                                       } elseif (t3lib_div::isAbsPath($dcf) && @is_file($dcf)) {       // Absolute path...
+                                       } elseif (self::isAbsPath($dcf) && @is_file($dcf))      {       // Absolute path...
                                                include($dcf);
                                        } else include(PATH_typo3conf.$dcf);
                                }
@@ -4693,9 +4693,9 @@ final class t3lib_div {
 
                                // If not an array, but still set, then regard it as a relative reference to a file:
                        if ($dataStruct && !is_array($dataStruct))      {
-                               $file = t3lib_div::getFileAbsFileName($dataStruct);
+                               $file = self::getFileAbsFileName($dataStruct);
                                if ($file && @is_file($file))   {
-                                       $dataStruct = t3lib_div::xml2array(t3lib_div::getUrl($file));
+                                       $dataStruct = self::xml2array(self::getUrl($file));
                                }
                        }
                } else {
@@ -4718,13 +4718,13 @@ final class t3lib_div {
                if (is_array($dataStructArray['sheets']))       {
                        $out=array('sheets'=>array());
                        foreach($dataStructArray['sheets'] as $sheetId => $sDat)        {
-                               list($ds,$aS) = t3lib_div::resolveSheetDefInDS($dataStructArray,$sheetId);
+                               list($ds,$aS) = self::resolveSheetDefInDS($dataStructArray,$sheetId);
                                if ($sheetId==$aS)      {
                                        $out['sheets'][$aS]=$ds;
                                }
                        }
                } else {
-                       list($ds) = t3lib_div::resolveSheetDefInDS($dataStructArray);
+                       list($ds) = self::resolveSheetDefInDS($dataStructArray);
                        $out = array('sheets' => array('sDEF' => $ds));
                }
                return $out;
@@ -4758,9 +4758,9 @@ final class t3lib_div {
 
                        // Check file-reference prefix; if found, require_once() the file (should be library of code)
                if (strpos($funcName,':') !== false)    {
-                       list($file,$funcRef) = t3lib_div::revExplode(':',$funcName,2);
-                       $requireFile = t3lib_div::getFileAbsFileName($file);
-                       if ($requireFile) t3lib_div::requireOnce($requireFile);
+                       list($file,$funcRef) = self::revExplode(':',$funcName,2);
+                       $requireFile = self::getFileAbsFileName($file);
+                       if ($requireFile) self::requireOnce($requireFile);
                } else {
                        $funcRef = $funcName;
                }
@@ -4775,8 +4775,8 @@ final class t3lib_div {
 
                        // Check prefix is valid:
                if ($checkPrefix &&
-                       !t3lib_div::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
-                       !t3lib_div::isFirstPartOfStr(trim($funcRef),'tx_')
+                       !self::isFirstPartOfStr(trim($funcRef),$checkPrefix) &&
+                       !self::isFirstPartOfStr(trim($funcRef),'tx_')
                        )       {
                        $errorMsg = "Function/class '$funcRef' was not prepended with '$checkPrefix'";
                        if ($errorMode == 2) {
@@ -4797,11 +4797,11 @@ final class t3lib_div {
                                        // Get/Create object of class:
                                if ($storePersistentObject)     {       // Get reference to current instance of class:
                                        if (!is_object($GLOBALS['T3_VAR']['callUserFunction_classPool'][$parts[0]]))    {
-                                               $GLOBALS['T3_VAR']['callUserFunction_classPool'][$parts[0]] = t3lib_div::makeInstance($parts[0]);
+                                               $GLOBALS['T3_VAR']['callUserFunction_classPool'][$parts[0]] = self::makeInstance($parts[0]);
                                        }
                                        $classObj = $GLOBALS['T3_VAR']['callUserFunction_classPool'][$parts[0]];
                                } else {        // Create new object:
-                                       $classObj = t3lib_div::makeInstance($parts[0]);
+                                       $classObj = self::makeInstance($parts[0]);
                                }
 
                                if (method_exists($classObj, $parts[1]))        {
@@ -4869,9 +4869,9 @@ final class t3lib_div {
 
                                // Check file-reference prefix; if found, require_once() the file (should be library of code)
                        if (strpos($classRef,':') !== false)    {
-                               list($file,$class) = t3lib_div::revExplode(':',$classRef,2);
-                               $requireFile = t3lib_div::getFileAbsFileName($file);
-                               if ($requireFile)       t3lib_div::requireOnce($requireFile);
+                               list($file,$class) = self::revExplode(':',$classRef,2);
+                               $requireFile = self::getFileAbsFileName($file);
+                               if ($requireFile)       self::requireOnce($requireFile);
                        } else {
                                $class = $classRef;
                        }
@@ -4886,8 +4886,8 @@ final class t3lib_div {
 
                                // Check prefix is valid:
                        if ($checkPrefix &&
-                               !t3lib_div::isFirstPartOfStr(trim($class),$checkPrefix) &&
-                               !t3lib_div::isFirstPartOfStr(trim($class),'tx_')
+                               !self::isFirstPartOfStr(trim($class),$checkPrefix) &&
+                               !self::isFirstPartOfStr(trim($class),'tx_')
                                )       {
                                if (!$silent)   debug("Class '".$class."' was not prepended with '".$checkPrefix."'",1);
                                return FALSE;
@@ -4895,7 +4895,7 @@ final class t3lib_div {
 
                                // Check if class exists:
                        if (class_exists($class))       {
-                               $classObj = t3lib_div::makeInstance($class);
+                               $classObj = self::makeInstance($class);
 
                                        // If persistent object should be created, set reference:
                                if ($storePersistentObject)     {
@@ -4963,7 +4963,7 @@ final class t3lib_div {
        public static function makeInstanceClassName($className)        {
                self::logDeprecatedFunction();
 
-               return (class_exists($className) && class_exists('ux_'.$className, false) ? t3lib_div::makeInstanceClassName('ux_' . $className) : $className);
+               return (class_exists($className) && class_exists('ux_'.$className, false) ? self::makeInstanceClassName('ux_' . $className) : $className);
        }
 
        /**
@@ -4993,7 +4993,7 @@ final class t3lib_div {
                $error = FALSE;
 
                if (!is_array($excludeServiceKeys) ) {
-                       $excludeServiceKeys = t3lib_div::trimExplode(',', $excludeServiceKeys, 1);
+                       $excludeServiceKeys = self::trimExplode(',', $excludeServiceKeys, 1);
                }
                while ($info = t3lib_extMgm::findService($serviceType, $serviceSubType, $excludeServiceKeys))   {
 
@@ -5005,14 +5005,14 @@ final class t3lib_div {
 
                                // include file and create object
                        } else {
-                               $requireFile = t3lib_div::getFileAbsFileName($info['classFile']);
+                               $requireFile = self::getFileAbsFileName($info['classFile']);
                                if (@is_file($requireFile)) {
-                                       t3lib_div::requireOnce ($requireFile);
-                                       $obj = t3lib_div::makeInstance($info['className']);
+                                       self::requireOnce ($requireFile);
+                                       $obj = self::makeInstance($info['className']);
                                        if (is_object($obj)) {
                                                if(!@is_callable(array($obj,'init')))   {
                                                                // use silent logging??? I don't think so.
-                                                       die ('Broken service:'.t3lib_div::view_array($info));
+                                                       die ('Broken service:'.self::view_array($info));
                                                }
                                                $obj->info = $info;
                                                if ($obj->init()) { // service available?
@@ -5089,7 +5089,7 @@ final class t3lib_div {
                                        if (0 == strcasecmp($parts[0], 'from')) {
                                                $parts[1] = self::normalizeMailAddress($parts[1]);
                                        }
-                                       $parts[1] = t3lib_div::encodeHeader($parts[1],$encoding,$charset);
+                                       $parts[1] = self::encodeHeader($parts[1],$encoding,$charset);
                                        $newHeaders[] = implode(': ',$parts);
                                } else {
                                        $newHeaders[] = $line;  // Should never happen - is such a mail header valid? Anyway, just add the unchanged line...
@@ -5098,8 +5098,8 @@ final class t3lib_div {
                        $headers = implode(chr(10),$newHeaders);
                        unset($newHeaders);
 
-                       $email = t3lib_div::encodeHeader($email,$encoding,$charset);            // Email address must not be encoded, but it could be appended by a name which should be so (e.g. "Kasper Skårhøj <kasperYYYY@typo3.com>")
-                       $subject = t3lib_div::encodeHeader($subject,$encoding,$charset);
+                       $email = self::encodeHeader($email,$encoding,$charset);         // Email address must not be encoded, but it could be appended by a name which should be so (e.g. "Kasper Skårhøj <kasperYYYY@typo3.com>")
+                       $subject = self::encodeHeader($subject,$encoding,$charset);
                }
 
                switch ((string)$encoding)      {
@@ -5124,18 +5124,18 @@ final class t3lib_div {
                                'Content-Type: text/plain; charset='.$charset.chr(10).
                                'Content-Transfer-Encoding: quoted-printable';
 
-                               $message=t3lib_div::quoted_printable($message);
+                               $message=self::quoted_printable($message);
                        break;
                }
 
                // Headers must be separated by CRLF according to RFC 2822, not just LF.
                // But many servers (Gmail, for example) behave incorectly and want only LF.
                // So we stick to LF in all cases.
-               $headers = trim(implode(chr(10), t3lib_div::trimExplode(chr(10), $headers, true)));     // Make sure no empty lines are there.
+               $headers = trim(implode(chr(10), self::trimExplode(chr(10), $headers, true)));  // Make sure no empty lines are there.
 
                $ret = @mail($email, $subject, $message, $headers);
                if (!$ret)      {
-                       t3lib_div::sysLog('Mail to "'.$email.'" could not be sent (Subject: "'.$subject.'").', 'Core', 3);
+                       self::sysLog('Mail to "'.$email.'" could not be sent (Subject: "'.$subject.'").', 'Core', 3);
                }
                return $ret;
        }
@@ -5218,7 +5218,7 @@ final class t3lib_div {
                                break;
                                case 'quoted-printable':
                                default:
-                                       $qpValue = t3lib_div::quoted_printable($part,1000);
+                                       $qpValue = self::quoted_printable($part,1000);
                                        if ($part!=$qpValue)    {
                                                // Encoded words in the header should not contain non-encoded:
                                                // * spaces. "_" is a shortcut for "=20". See RFC 2047 for details.
@@ -5259,10 +5259,10 @@ final class t3lib_div {
 
                                        switch ((string)$urlmode)       {
                                                case 'all':
-                                                       $newURL = t3lib_div::makeRedirectUrl($newURL,0,$index_script_url);
+                                                       $newURL = self::makeRedirectUrl($newURL,0,$index_script_url);
                                                break;
                                                case '76':
-                                                       $newURL = t3lib_div::makeRedirectUrl($newURL,76,$index_script_url);
+                                                       $newURL = self::makeRedirectUrl($newURL,76,$index_script_url);
                                                break;
                                        }
                                        $v = $newURL . substr($v,strlen($newParts[0]));
@@ -5301,7 +5301,7 @@ final class t3lib_div {
 
                                $GLOBALS['TYPO3_DB']->exec_INSERTquery('cache_md5params', $insertFields);
                        }
-                       $inUrl=($index_script_url ? $index_script_url : t3lib_div::getIndpEnv('TYPO3_REQUEST_DIR').'index.php').
+                       $inUrl=($index_script_url ? $index_script_url : self::getIndpEnv('TYPO3_REQUEST_DIR').'index.php').
                                '?RDCT='.$md5;
                }
 
@@ -5332,11 +5332,11 @@ final class t3lib_div {
 
                        // for CLI logging name is <fqdn-hostname>:<TYPO3-path>
                if (defined('TYPO3_cliMode') && TYPO3_cliMode)  {
-                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = t3lib_div::getHostname($requestHost=FALSE).':'.PATH_site;
+                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getHostname($requestHost=FALSE).':'.PATH_site;
                }
                        // for Web logging name is <protocol>://<request-hostame>/<site-path>
                else {
-                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = t3lib_div::getIndpEnv('TYPO3_SITE_URL');
+                       $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogHost'] = self::getIndpEnv('TYPO3_SITE_URL');
                }
 
                        // init custom logging
@@ -5344,7 +5344,7 @@ final class t3lib_div {
                        $params = array('initLog'=>TRUE);
                        $fakeThis = FALSE;
                        foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod)       {
-                               t3lib_div::callUserFunction($hookMethod,$params,$fakeThis);
+                               self::callUserFunction($hookMethod,$params,$fakeThis);
                        }
                }
 
@@ -5363,7 +5363,7 @@ final class t3lib_div {
                        }
                }
 
-               $TYPO3_CONF_VARS['SYS']['systemLogLevel'] = t3lib_div::intInRange($TYPO3_CONF_VARS['SYS']['systemLogLevel'],0,4);
+               $TYPO3_CONF_VARS['SYS']['systemLogLevel'] = self::intInRange($TYPO3_CONF_VARS['SYS']['systemLogLevel'],0,4);
                $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'] = TRUE;
        }
 
@@ -5381,14 +5381,14 @@ final class t3lib_div {
        public static function sysLog($msg, $extKey, $severity=0) {
                global $TYPO3_CONF_VARS;
 
-               $severity = t3lib_div::intInRange($severity,0,4);
+               $severity = self::intInRange($severity,0,4);
 
                        // is message worth logging?
                if (intval($TYPO3_CONF_VARS['SYS']['systemLogLevel']) > $severity)      return;
 
                        // initialize logging
                if (!$TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLogInit'])      {
-                       t3lib_div::initSysLog();
+                       self::initSysLog();
                }
 
                        // do custom logging
@@ -5396,7 +5396,7 @@ final class t3lib_div {
                        $params = array('msg'=>$msg, 'extKey'=>$extKey, 'backTrace'=>debug_backtrace(), 'severity'=>$severity);
                        $fakeThis = FALSE;
                        foreach ($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['systemLog'] as $hookMethod)       {
-                               t3lib_div::callUserFunction($hookMethod,$params,$fakeThis);
+                               self::callUserFunction($hookMethod,$params,$fakeThis);
                        }
                }
 
@@ -5469,7 +5469,7 @@ final class t3lib_div {
                        $params = array('msg'=>$msg, 'extKey'=>$extKey, 'severity'=>$severity, 'dataVar'=>$dataVar);
                        $fakeThis = FALSE;
                        foreach($TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_div.php']['devLog'] as $hookMethod)   {
-                               t3lib_div::callUserFunction($hookMethod,$params,$fakeThis);
+                               self::callUserFunction($hookMethod,$params,$fakeThis);
                        }
                }
        }
@@ -5486,7 +5486,7 @@ final class t3lib_div {
                }
 
                // write a longer message to the deprecation log
-               $destination = PATH_typo3conf . '/deprecation_' . t3lib_div::shortMD5(PATH_site . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) . '.log';
+               $destination = PATH_typo3conf . '/deprecation_' . self::shortMD5(PATH_site . $GLOBALS['TYPO3_CONF_VARS']['SYS']['encryptionKey']) . '.log';
                $file = @fopen($destination, 'a');
                if ($file) {
                        $date = date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] . ' ' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] . ': ');
@@ -5558,12 +5558,12 @@ final class t3lib_div {
        public static function arrayToLogString(array $arr, $valueList=array(), $valueLength=20) {
                $str = '';
                if (!is_array($valueList))      {
-                       $valueList = t3lib_div::trimExplode(',', $valueList, 1);
+                       $valueList = self::trimExplode(',', $valueList, 1);
                }
                $valListCnt = count($valueList);
                foreach ($arr as $key => $value)        {
                        if (!$valListCnt || in_array($key, $valueList)) {
-                               $str .= (string)$key.trim(': '.t3lib_div::fixed_lgd_cs(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
+                               $str .= (string)$key.trim(': '.self::fixed_lgd_cs(str_replace("\n",'|',(string)$value), $valueLength)).'; ';
                        }
                }
                return $str;
@@ -5615,7 +5615,7 @@ final class t3lib_div {
                $cmdLine = $path.' '.$parameters;
 
                if($command=='composite' && $switchCompositeParameters) {       // Because of some weird incompatibilities between ImageMagick 4 and 6 (plus GraphicsMagick), it is needed to change the parameters order under some preconditions
-                       $paramsArr = t3lib_div::unQuoteFilenames($parameters);
+                       $paramsArr = self::unQuoteFilenames($parameters);
 
                        if(count($paramsArr)>5) {       // The mask image has been specified => swap the parameters
                                $tmp = $paramsArr[count($paramsArr)-3];
@@ -5718,7 +5718,7 @@ final class t3lib_div {
                        $headersList = headers_list();
                        foreach ($headersList as $header) {
                                        // split it up at the :
-                               list($key, $value) = t3lib_div::trimExplode(':', $header, TRUE);
+                               list($key, $value) = self::trimExplode(':', $header, TRUE);
                                        // check if we have a Content-Encoding other than 'None'
                                if (strtolower($key) === 'content-encoding' && strtolower($value) !== 'none') {
                                        header('Content-Encoding: None');