function DisplayBareHistory(WebPage $oPage, $bEditMode = false, $iLimitCount = 0, $iLimitStart = 0) { // history block (with as a tab) $oHistoryFilter = new DBObjectSearch('CMDBChangeOp'); $oHistoryFilter->AddCondition('objkey', $this->GetKey(), '='); $oHistoryFilter->AddCondition('objclass', get_class($this), '='); $oBlock = new HistoryBlock($oHistoryFilter, 'table', false); $oBlock->SetLimit($iLimitCount, $iLimitStart); $oBlock->Display($oPage, 'history'); }
$oPage->SetContentType('text/html'); $id = (int) utils::ReadParam('id', 0); $iStart = (int) utils::ReadParam('start', 0); $iCount = (int) utils::ReadParam('count', MetaModel::GetConfig()->Get('max_history_length', '50')); $oObj = MetaModel::GetObject($sClass, $id); $oObj->DisplayBareHistory($oPage, false, $iCount, $iStart); $oPage->add_ready_script("\$('#history table.listResults').tableHover(); \$('#history table.listResults').tablesorter( { widgets: ['myZebra', 'truncatedList']} );"); break; case 'history_from_filter': $oPage->SetContentType('text/html'); $oHistoryFilter = CMDBSearchFilter::unserialize($sFilter); $iStart = (int) utils::ReadParam('start', 0); $iCount = (int) utils::ReadParam('count', MetaModel::GetConfig()->Get('max_history_length', '50')); $oBlock = new HistoryBlock($oHistoryFilter, 'table', false); $oBlock->SetLimit($iCount, $iStart); $oBlock->Display($oPage, 'history'); $oPage->add_ready_script("\$('#history table.listResults').tableHover(); \$('#history table.listResults').tablesorter( { widgets: ['myZebra', 'truncatedList']} );"); break; case 'full_text_search': $aFullTextNeedles = utils::ReadParam('needles', array(), false, 'raw_data'); $sFullText = trim(implode(' ', $aFullTextNeedles)); $sClassName = utils::ReadParam('class', ''); $iCount = utils::ReadParam('count', 0); $iCurrentPos = utils::ReadParam('position', 0); $iTune = utils::ReadParam('tune', 0); if (empty($sFullText)) { $oPage->p(Dict::S('UI:Search:NoSearch')); break; } // Search in full text mode in all the classes $aMatches = array();