[BUGFIX] Unused argument in getItemUidList()
authorOliver Hader <oliver@typo3.org>
Tue, 27 Mar 2012 12:03:24 +0000 (14:03 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Tue, 27 Mar 2012 14:50:07 +0000 (16:50 +0200)
t3lib_collection_AbstractRecordCollection::getItemUidList() has
a method argument that is not used. The purpose is to have a
combination of table name and uid on demand.

Change-Id: I53f6aa0f87ea87db20d0e2d95cf5b4f5e2bdea81
Fixes: #35277
Releases: 6.0, 4.7
Reviewed-on: http://review.typo3.org/9899
Reviewed-by: Dmitry Dulepov
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/collection/AbstractRecordCollection.php

index 7e150a0..b2dbaa6 100644 (file)
@@ -127,7 +127,7 @@ abstract class t3lib_collection_AbstractRecordCollection implements t3lib_collec
         * Return the key of the current element
         *
         * @link http://php.net/manual/en/iterator.key.php
         * Return the key of the current element
         *
         * @link http://php.net/manual/en/iterator.key.php
-        * @return scalar scalar on success, integer
+        * @return integer
         * 0 on failure.
         */
        public function key() {
         * 0 on failure.
         */
        public function key() {
@@ -394,13 +394,13 @@ abstract class t3lib_collection_AbstractRecordCollection implements t3lib_collec
         * also allow to add table name, if it might be needed by TCEmain for
         * storing the relation
         *
         * also allow to add table name, if it might be needed by TCEmain for
         * storing the relation
         *
-        * @param bool $includeTableName
+        * @param boolean $includeTableName
         * @return string
         */
         * @return string
         */
-       protected function getItemUidList($includeTableName = FALSE) {
+       protected function getItemUidList($includeTableName = TRUE) {
                $list = array();
                $list = array();
-               foreach($this->storage AS $entry) {
-                       $list[] = $this->getItemTableName() . '_' . $entry['uid'];
+               foreach ($this->storage as $entry) {
+                       $list[] = ($includeTableName ? $this->getItemTableName() . '_' : '') . $entry['uid'];
                }
                return implode(',', $list);
        }
                }
                return implode(',', $list);
        }
@@ -431,10 +431,10 @@ abstract class t3lib_collection_AbstractRecordCollection implements t3lib_collec
         * @return void
         */
        public function fromArray(array $array) {
         * @return void
         */
        public function fromArray(array $array) {
-               $this->uid                      = $array['uid'];
-               $this->title            = $array['title'];
-               $this->description      = $array['description'];
-               $this->itemTableName= $array['table_name'];
+               $this->uid = $array['uid'];
+               $this->title = $array['title'];
+               $this->description = $array['description'];
+               $this->itemTableName = $array['table_name'];
        }
 }
 ?>
\ No newline at end of file
        }
 }
 ?>
\ No newline at end of file