Changeset View
Changeset View
Standalone View
Standalone View
core/kernel/utility/temp_handler.php
| Show First 20 Lines • Show All 1065 Lines • ▼ Show 20 Line(s) | |||||
| $ses_var_name = $main_prefix . '_changes_' . $this->Application->GetTopmostWid($this->_prefix); | $ses_var_name = $main_prefix . '_changes_' . $this->Application->GetTopmostWid($this->_prefix); | ||||
| $changes = $this->Application->RecallVar($ses_var_name); | $changes = $this->Application->RecallVar($ses_var_name); | ||||
| $changes = $changes ? unserialize($changes) : Array (); | $changes = $changes ? unserialize($changes) : Array (); | ||||
| foreach ($changes as $key => $rec) { | foreach ($changes as $key => $rec) { | ||||
| if ( $rec['Prefix'] == $this->_prefix && $rec['ItemId'] == $temp_id ) { | if ( $rec['Prefix'] == $this->_prefix && $rec['ItemId'] == $temp_id ) { | ||||
| // main item change log record | // main item change log record | ||||
| $changes[$key]['ItemId'] = $live_id; | $changes[$key]['ItemId'] = $live_id; | ||||
| $changed_data = unserialize($rec['Changes']); | |||||
| if ( isset($changed_data[$this->_idField]) ) { | |||||
| $changed_data[$this->_idField] = $live_id; | |||||
| } | |||||
| $changes[$key]['Changes'] = serialize($changed_data); | |||||
| } | } | ||||
| if ( $rec['MasterPrefix'] == $this->_prefix && $rec['MasterId'] == $temp_id ) { | if ( $rec['MasterPrefix'] == $this->_prefix && $rec['MasterId'] == $temp_id ) { | ||||
| // sub item change log record | // sub item change log record | ||||
| $changes[$key]['MasterId'] = $live_id; | $changes[$key]['MasterId'] = $live_id; | ||||
| } | } | ||||
| if ( in_array($this->_prefix, $rec['ParentPrefix']) && $rec['ParentId'][$this->_prefix] == $temp_id ) { | if ( in_array($this->_prefix, $rec['ParentPrefix']) && $rec['ParentId'][$this->_prefix] == $temp_id ) { | ||||
| ▲ Show 20 Lines • Show All 585 Lines • Show Last 20 Lines | |||||