Fixed bug #15801: Deprecate t3lib_div::rm_endcomma
authorBenni Mack <benni.mack@typo3.org>
Thu, 14 Oct 2010 10:16:21 +0000 (10:16 +0000)
committerBenni Mack <benni.mack@typo3.org>
Thu, 14 Oct 2010 10:16:21 +0000 (10:16 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9058 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_div.php
typo3/sysext/lowlevel/dbint/index.php

index 3c00d53..dce4058 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-10-14  Benjamin Mack  <benni@typo3.org>
 
+       * Fixed bug #15801: Deprecate t3lib_div::rm_endcomma
        * Fixed bug #103: No Plain-text List Option
 
 2010-10-13  Steffen Gebert  <steffen@steffen-gebert.de>
index 807f090..f3267dd 100644 (file)
@@ -1217,8 +1217,11 @@ final class t3lib_div {
         *
         * @param       string          String from which the comma in the end (if any) will be removed.
         * @return      string
+        * @deprecated since TYPO3 4.5, will be removed in TYPO3 4.7 - Use rtrim() directly
         */
        public static function rm_endcomma($string)     {
+               self::logDeprecatedFunction();
+
                return rtrim($string, ',');
        }
 
index f6b83f6..b53dbf4 100755 (executable)
@@ -483,16 +483,16 @@ class SC_mod_tools_dbint_index {
                }
 
                        // Tables and lost records
-               $id_list = '-1,0,'.implode(array_keys($admin->page_idArray),',');
-               $id_list = t3lib_div::rm_endcomma($id_list);
+               $id_list = '-1,0,' . implode(',', array_keys($admin->page_idArray));
+               $id_list = rtrim($id_list, ',');
                $admin->lostRecords($id_list);
 
-               if ($admin->fixLostRecord(t3lib_div::_GET('fixLostRecords_table'),t3lib_div::_GET('fixLostRecords_uid')))       {
+               if ($admin->fixLostRecord(t3lib_div::_GET('fixLostRecords_table'), t3lib_div::_GET('fixLostRecords_uid'))) {
                        $admin = t3lib_div::makeInstance('t3lib_admin');
                        $admin->backPath = $BACK_PATH;
                        $admin->genTree(0,'');
-                       $id_list = '-1,0,'.implode(array_keys($admin->page_idArray),',');
-                       $id_list = t3lib_div::rm_endcomma($id_list);
+                       $id_list = '-1,0,' . implode(',', array_keys($admin->page_idArray));
+                       $id_list = rtrim($id_list, ',');
                        $admin->lostRecords($id_list);
                }