if ($criteria_group) { $criteria_public->add($criteria_group, 'OR'); } $criteria->add($criteria_public); } else { $criteria->add($criteria_group); } } $xil_objs =& $xil_handler->getObjects($criteria, false, '', false, $join); $items = array(); include XOOPS_ROOT_PATH . '/header.php'; foreach ($xil_objs as $xil_obj) { $iid = $xil_obj->get('item_id'); $xid = $xil_obj->get('index_id'); if (!isset($items[$iid])) { $itemlib_handler =& XooNIpsItemLibraryHandler::getInstance(); $itemlib_obj =& $itemlib_handler->get($iid); if (!is_object($itemlib_obj)) { continue; } $items[$iid] = array('item_id' => $iid, 'indexes' => array(), 'item_body' => $itemlib_obj->getItemListBlock()); } $items[$iid]['indexes'][] = array('id' => $xid, 'path' => xnpGetIndexPathString($xnpsid, $xid)); } $xoopsOption['template_main'] = 'xoonips_certify.html'; if (isset($menu_id)) { $xoopsTpl->assign('menu_id', $menu_id); } $xoopsTpl->assign('pankuzu', $pankuzu); $xoopsTpl->assign('certify_button_label', _MD_XOONIPS_ITEM_CERTIFY_BUTTON_LABEL); $xoopsTpl->assign('uncertify_button_label', _MD_XOONIPS_ITEM_UNCERTIFY_BUTTON_LABEL);
/** * get related to htmls * * @access private * @param string $type block type * 's' : show * 'e' : edit * 'c' : confirm * @return array renderd list block htmls */ function _getRelatedToHtmlArray($type) { $itemlib_handler =& XooNIpsItemLibraryHandler::getInstance(); $htmls = array(); switch ($type) { case 's': // show block $item_ids = $this->_related_to_ids; break; case 'e': // edit block $item_ids = array_merge($this->_related_to_ids, $this->_related_to_check_all_ids); break; case 'c': // confirm block $item_ids = array_merge($this->_related_to_ids, $this->_related_to_check_ids); break; } $self_item_id = $this->_item_basic_obj->get('item_id'); foreach ($item_ids as $item_id) { if ($self_item_id == $item_id) { continue; } $itemlib_obj =& $itemlib_handler->get($item_id); if (!is_object($itemlib_obj)) { // broken related to item id found if (XOONIPS_DEBUG_MODE) { error_log('BROKEN RELATED TO ITEM ID FOUND : PARENT(' . $this->_item_basic_obj->get('item_id') . ') - CHILD(' . $item_id . ')'); } continue; } $htmls[$item_id] = $itemlib_obj->getItemListBlock(); } return $htmls; }