Fixed #11234: Deprecate formatSize and checkEmail functions
authorBenni Mack <benni.mack@typo3.org>
Wed, 3 Jun 2009 10:52:13 +0000 (10:52 +0000)
committerBenni Mack <benni.mack@typo3.org>
Wed, 3 Jun 2009 10:52:13 +0000 (10:52 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5538 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 54d7a56..680402b 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-06-03  Benjamin Mack  <benni@typo3.org>
 
+       * Fixed #11234: Deprecate formatSize and checkEmail functions
        * Followup to #11148: Remove static require_once() to t3lib and tslib and use autoloading instead - re-added require_once() for the services classes
 
 2009-06-03  Francois Suter  <francois@typo3.org>
index c627ddd..19604bd 100644 (file)
@@ -490,8 +490,11 @@ class t3lib_basicFileFunctions     {
         *
         * @param       integer         Bytes to be formated
         * @return      string          Formatted with M,K or &nbsp;&nbsp; appended.
+        * @deprecated since at least TYPO3 4.2 - Use t3lib_div::formatSize() instead
         */
        function formatSize($sizeInBytes)       {
+               t3lib_div::logDeprecatedFunction();
+
                if ($sizeInBytes>900)   {
                        if ($sizeInBytes>900000)        {       // MB
                                $val = $sizeInBytes/(1024*1024);
index ff09f87..ea2e828 100644 (file)
@@ -3400,7 +3400,7 @@ class tslib_cObj {
                                if ($conf['age']){$content=$this->calcAge(time()-$content,$conf['age']);}
 
                                if ($conf['case']){$content=$this->HTMLcaseshift($content, $conf['case']);}
-                               if ($conf['bytes']){$content=$this->bytes($content,$conf['bytes.']['labels']);}
+                               if ($conf['bytes']){$content=t3lib_div::formatSize($content, $conf['bytes.']['labels']);}
                                if ($conf['substring']){$content=$this->substring($content,$conf['substring']);}
                                if ($conf['removeBadHTML'])     {$content = $this->removeBadHTML($content, $conf['removeBadHTML.']);}
                                if ($conf['stripHtml']){$content = strip_tags($content);}
@@ -6175,6 +6175,8 @@ class tslib_cObj {
         * @deprecated since TYPO3 3.6 - Use t3lib_div::formatSize() instead
         */
        function bytes($sizeInBytes,$labels)    {
+               t3lib_div::logDeprecatedFunction();
+
                return t3lib_div::formatSize($sizeInBytes,$labels);
        }
 
@@ -6261,6 +6263,8 @@ class tslib_cObj {
         * @deprecated since TYPO3 3.6 - Use t3lib_div::validEmail() instead
         */
        function checkEmail($email)     {
+               t3lib_div::logDeprecatedFunction();
+
                return t3lib_div::validEmail($email);
        }