applications/dashboard/controllers/class.messagecontroller.php
public function Delete($MessageID = '', $TransientKey = FALSE) {
      $this->Permission('Garden.Messages.Manage');
      $this->DeliveryType(DELIVERY_TYPE_BOOL);
      $Session = Gdn::Session();
      
      if ($TransientKey !== FALSE && $Session->ValidateTransientKey($TransientKey)) {
         $Message = $this->MessageModel->Delete(array('MessageID' => $MessageID));
         // Reset the message cache
         $this->MessageModel->SetMessageCache();
      }
      
      if ($this->_DeliveryType === DELIVERY_TYPE_ALL)
         Redirect('dashboard/message');

      $this->Render();      
   }
public function Delete($MessageID = '', $TransientKey = FALSE) {
      $this->Permission('Garden.Messages.Manage');
      $this->DeliveryType(DELIVERY_TYPE_BOOL);
      $Session = Gdn::Session();
      
      if ($TransientKey !== FALSE && $Session->ValidateTransientKey($TransientKey)) {
         $Message = $this->MessageModel->Delete(array('MessageID' => $MessageID));
         // Reset the message cache
         $this->MessageModel->SetMessageCache();
      }
      
      if ($this->_DeliveryType === DELIVERY_TYPE_ALL)
         Redirect('dashboard/message');

      $this->Render();      
   }
public function Delete ( $ MessageID = '' , $ TransientKey = FALSE ) { $ this -> Permission ( 'Garden.Messages.Manage' ) ; $ this -> DeliveryType ( DELIVERY_TYPE_BOOL ) ; $ Session = Gdn :: Session ( ) ; if ( $ TransientKey !== FALSE && $ Session -> ValidateTransientKey ( $ TransientKey ) ) { $ Message = $ this -> MessageModel -> Delete ( array ( 'MessageID' => $ MessageID ) ) ; // Reset the message cache $ this -> MessageModel -> SetMessageCache ( ) ; } if ( $ this -> _DeliveryType === DELIVERY_TYPE_ALL ) Redirect ( 'dashboard/message' ) ; $ this -> Render ( ) ; }
Delete a message.

@since 2.0.0
@access public
Delete a message .