More workspace stuff for beta.
[Packages/TYPO3.CMS.git] / typo3 / sysext / impexp / class.tx_impexp.php
index 5652c3b..abcceea 100755 (executable)
@@ -488,6 +488,9 @@ class tx_impexp {
         * @return      void
         */
        function export_addRecord($table,$row,$relationLevel=0) {
+
+               t3lib_BEfunc::workspaceOL($table,$row);
+
                if (strcmp($table,'') && is_array($row) && $row['uid']>0 && !$this->excludeMap[$table.':'.$row['uid']]) {
                        if ($this->checkPID($table==='pages' ? $row['uid'] : $row['pid']))      {
                                if (!isset($this->dat['records'][$table.':'.$row['uid']]))      {
@@ -1774,7 +1777,8 @@ class tx_impexp {
 
                                // If the record has been written and received a new id, then proceed:
                        if (is_array($this->import_mapId[$table]) && isset($this->import_mapId[$table][$uid]))  {
-                               $thisNewUid = $this->import_mapId[$table][$uid];
+                               $thisNewUid = t3lib_BEfunc::wsMapId($table,$this->import_mapId[$table][$uid]);
+
                                if (is_array($this->dat['records'][$table.':'.$uid]['rels']))   {
                                        reset($this->dat['records'][$table.':'.$uid]['rels']);
 
@@ -1878,7 +1882,8 @@ class tx_impexp {
 
                                // If the record has been written and received a new id, then proceed:
                        if (is_array($this->import_mapId[$table]) && isset($this->import_mapId[$table][$uid]))  {
-                               $thisNewUid = $this->import_mapId[$table][$uid];
+                               $thisNewUid = t3lib_BEfunc::wsMapId($table,$this->import_mapId[$table][$uid]);
+
                                if (is_array($this->dat['records'][$table.':'.$uid]['rels']))   {
                                        reset($this->dat['records'][$table.':'.$uid]['rels']);
                                        t3lib_div::loadTCA($table);
@@ -2016,7 +2021,7 @@ class tx_impexp {
                                                }
 
                                                        // The new id:
-                                               $thisNewUid = $this->import_mapId[$table][$uid];
+                                               $thisNewUid = t3lib_BEfunc::wsMapId($table,$this->import_mapId[$table][$uid]);
 
                                                        // Now, if there are any fields that require substitution to be done, lets go for that:
                                                foreach($fieldsIndex as $field => $softRefCfgs) {
@@ -2148,7 +2153,7 @@ class tx_impexp {
                                                                        // Trying to map database element if found in the mapID array:
                                                                list($tempTable,$tempUid) = explode(':',$cfg['subst']['recordRef']);
                                                                if (isset($this->import_mapId[$tempTable][$tempUid]))   {
-                                                                       $insertValue = $this->import_mapId[$tempTable][$tempUid];
+                                                                       $insertValue = t3lib_BEfunc::wsMapId($tempTable,$this->import_mapId[$tempTable][$tempUid]);
 
                                                                                // Look if reference is to a page and the original token value was NOT an integer - then we assume is was an alias and try to look up the new one!
                                                                        if ($tempTable==='pages' && !t3lib_div::testInt($cfg['subst']['tokenValue']))   {
@@ -2886,6 +2891,7 @@ class tx_impexp {
                                        if ($newUid = $this->import_mapId[$table][$uid])        {
                                                $diffInverse = FALSE;
                                                $recInf = $this->doesRecordExist($table, $newUid, '*');
+                                               t3lib_BEfunc::workspaceOL($table,$recInf);
                                        }
                                        if (is_array($recInf))  {
                                                $pInfo['showDiffContent'] = $this->compareRecords($recInf, $this->dat['records'][$table.':'.$uid]['data'], $table, $diffInverse);
@@ -3526,7 +3532,6 @@ class tx_impexp {
 
 
 
-
        /*****************************
         *
         * Error handling