Fixed issue #14480: tslib_cObj->start() sets a member "data", but not "table"
authorIngo Renner <ingo.renner@typo3.org>
Wed, 26 May 2010 09:02:17 +0000 (09:02 +0000)
committerIngo Renner <ingo.renner@typo3.org>
Wed, 26 May 2010 09:02:17 +0000 (09:02 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7677 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index 2d210e5..5667a5f 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-05-26  Ingo Renner  <ingo@typo3.org>
 
        * Added feature #14463: Add post initialization hook for tslib_cObj
+       * Fixed issue #14480: tslib_cObj->start() sets a member "data", but not "table"
 
 2010-05-26  Steffen Kamper  <info@sk-typo3.de>
 
index 9fe3cf0..7b18aac 100644 (file)
@@ -314,6 +314,7 @@ class tslib_cObj {
         * @see init()
         */
        var $data = Array();
+       protected $table = '';
        var $oldData = Array();                         // Used for backup...
        var $alternativeData ='';                       // If this is set with an array before stdWrap, it's used instead of $this->data in the data-property in stdWrap
        var $parameters = Array();                      // Used by the parseFunc function and is loaded with tag-parameters when parsing tags.
@@ -376,6 +377,7 @@ class tslib_cObj {
        function start($data,$table='') {
                global $TYPO3_CONF_VARS;
                $this->data = $data;
+               $this->table = $table;
                $this->currentRecord = $table ? $table.':'.$this->data['uid'] : '';
                $this->parameters = Array();
                if (is_array ($TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_content.php']['cObjTypeAndClass'])) {
@@ -7651,7 +7653,7 @@ class tslib_cObj {
                                }
                        }
                }
-               
+
                        // Construct WHERE clause:
                $conf['pidInList'] = trim($this->stdWrap($conf['pidInList'],$conf['pidInList.']));
 
@@ -7727,7 +7729,7 @@ class tslib_cObj {
                                // enabled properties
                        foreach ($queryMarkers as $marker => $markerValue) {
                                foreach ($queryParts as $queryPartKey => &$queryPartValue) {
-                                       $queryPartValue = str_replace('###' . $marker . '###', 
+                                       $queryPartValue = str_replace('###' . $marker . '###',
                                                        $markerValue,
                                                        $queryPartValue);
                                }
@@ -7946,11 +7948,11 @@ class tslib_cObj {
                                                                } else {
                                                                                // if quoted, remove quotes before
                                                                                // escaping.
-                                                                       if (preg_match('/^\'([^\']*)\'$/', 
+                                                                       if (preg_match('/^\'([^\']*)\'$/',
                                                                                        $listValue,
                                                                                        $matches)) {
                                                                                $listValue = $matches[1];
-                                                                       } elseif (preg_match('/^\"([^\"]*)\"$/', 
+                                                                       } elseif (preg_match('/^\"([^\"]*)\"$/',
                                                                                        $listValue,
                                                                                        $matches)) {
                                                                                $listValue = $matches[1];