public function viewHistoryAction() { $node = $this->_getParam('node') ? $this->_getParam('node') : ''; $catalogGuid = $this->_getParam('guid') ? $this->_getParam('guid') : ''; $a2 = array(); $aNodesTraversed = array(); $this->_traverseHistory($aNodesTraversed, $a2, $catalogGuid); $tblCatalogAttribute = new Kutu_Core_Orm_Table_CatalogAttribute(); $aTmp2['node'] = $catalogGuid; $aTmp2['nodeLeft'] = 'tmpLeft'; $aTmp2['nodeRight'] = 'tmpRight'; $aTmp2['description'] = ''; $aTmp2['relationType'] = ''; $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedTitle'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['title'] = $rowCatalogAttribute->value; } else { return 'No-Title'; } $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedSubTitle'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['subTitle'] = $rowCatalogAttribute->value; } else { return 'No-Title'; } $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedDate'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['fixedDate'] = $rowCatalogAttribute->value; } else { return ''; } array_push($a2, $aTmp2); UtilHistorySort::sort($a2, 'fixedDate', false); $this->view->aData = $a2; $this->view->catalogGuid = $catalogGuid; if ($nprt) { $this->view->node = $nprt; } elseif ($npts) { $this->view->node = $npts; } else { $this->view->node = $node; } }
public function getRelatedItem($catalogGuid, $relateAs) { $this->catalogGuid = $catalogGuid; $a2 = array(); $aNodesTraversed = array(); $this->_traverseHistory($aNodesTraversed, $a2, $catalogGuid, $relateAs); $tblCatalogAttribute = new Kutu_Core_Orm_Table_CatalogAttribute(); $aTmp2['node'] = $catalogGuid; $aTmp2['nodeLeft'] = 'tmpLeft'; $aTmp2['nodeRight'] = 'tmpRight'; $aTmp2['description'] = ''; $aTmp2['relationType'] = ''; $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedTitle'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['title'] = $rowCatalogAttribute->value; } else { $aTmp2['title'] = 'No-Title'; } $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedSubTitle'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['subTitle'] = $rowCatalogAttribute->value; } else { $aTmp2['subTitle'] = 'No-Title'; } $where2 = "catalogGuid='{$catalogGuid}' AND attributeGuid='fixedDate'"; $rowCatalogAttribute = $tblCatalogAttribute->fetchRow($where2); if (isset($rowCatalogAttribute->value)) { $aTmp2['fixedDate'] = $rowCatalogAttribute->value; } else { $aTmp2['fixedDate'] = '00-00-00'; } array_push($a2, $aTmp2); UtilHistorySort::sort($a2, 'fixedDate', false); return $a2; //print_r($a2); //die(); }