/**
  * @param DiscussionsController $Sender
  * @param array $Args
  */
 public function DiscussionsController_UnansweredCount_Create($Sender, $Args = array())
 {
     Gdn::SQL()->WhereIn('QnA', array('Unanswered', 'Rejected'));
     $Count = Gdn::SQL()->GetCount('Discussion', array('Type' => 'Question'));
     Gdn::Cache()->Store('QnA-UnansweredCount', $Count, array(Gdn_Cache::FEATURE_EXPIRY => 15 * 60));
     $Sender->SetData('UnansweredCount', $Count);
     $Sender->SetData('_Value', $Count);
     $Sender->Render('Value', 'Utility', 'Dashboard');
 }
示例#2
0
 /**
  * @param DiscussionsController $Sender
  * @param array $Args
  */
 public function DiscussionsController_UnansweredCount_Create($Sender, $Args = array())
 {
     $Count = $this->GetUnansweredCount();
     $Sender->SetData('UnansweredCount', $Count);
     $Sender->SetData('_Value', $Count);
     $Sender->Render('Value', 'Utility', 'Dashboard');
 }