コード例 #1
0
 function saveKBConvert()
 {
     $mainframe =& JFactory::getApplication();
     if ($mainframe->isSite()) {
         return;
     }
     $model = $this->getModel('ticket');
     $ticket = $model->getTicket();
     $cid = JRequest::getInt('cid');
     $post = JRequest::get('post');
     $success = RSTicketsProHelper::convertTicket($ticket, $post);
     if ($success) {
         $this->setRedirect('index.php?option=com_rsticketspro&view=ticket&cid=' . $cid, JText::_('RST_KB_ARTICLE_SAVED_OK'));
     } else {
         JError::raiseWarning(500, JText::_('RST_KB_ARTICLE_SAVED_ERROR'));
         $this->setRedirect('index.php?option=com_rsticketspro&view=ticket&cid=' . $cid);
     }
 }