Example #1
0
 /**
  * Accept single post
  *
  * @return integer
  */
 private function acceptPost($post)
 {
     $app = JFactory::getApplication();
     $CofiHelper = new CofiHelper();
     // call helper function to accept post and update stats
     $result = $CofiHelper->acceptPost($post);
     // redirect	link
     $redirectLink = JRoute::_("index.php?option=com_discussions&view=moderation&task=approve");
     $app->redirect($redirectLink, JText::_('COFI_POST_ACCEPTED'), "notice");
     return 0;
 }