applications/conversations/controllers/class.messagescontroller.php
public function All($Page = '') {
      $Session = Gdn::Session();
      $this->Title(T('Inbox'));
      Gdn_Theme::Section('ConversationList');

      list($Offset, $Limit) = OffsetLimit($Page, C('Conversations.Conversations.PerPage', 50));
      
      // Calculate offset
      $this->Offset = $Offset;
      
      $UserID = $this->Request->Get('userid', Gdn::Session()->UserID);
      if ($UserID != Gdn::Session()->UserID) {
         if (!C('Conversations.Moderation.Allow', FALSE)) {
            throw PermissionException();
         }
         $this->Permission('Conversations.Moderation.Manage');
      }
      
      $Conversations = $this->ConversationModel->Get2($UserID, $Offset, $Limit);
      $this->SetData('Conversations', $Conversations->ResultArray());
      
      // Get Conversations Count
      //$CountConversations = $this->ConversationModel->GetCount($UserID);
      //$this->SetData('CountConversations', $CountConversations);
      
      // Build the pager
      if (!$this->Data('_PagerUrl'))
         $this->SetData('_PagerUrl', 'messages/all/{Page}');
      $this->SetData('_Page', $Page);
      $this->SetData('_Limit', $Limit);
      $this->SetData('_CurrentRecords', count($Conversations->ResultArray()));
      
      // Deliver json data if necessary
      if ($this->_DeliveryType != DELIVERY_TYPE_ALL && $this->_DeliveryMethod == DELIVERY_METHOD_XHTML) {
         $this->SetJson('LessRow', $this->Pager->ToString('less'));
         $this->SetJson('MoreRow', $this->Pager->ToString('more'));
         $this->View = 'conversations';
      }
      
      // Build and display page.
      $this->Render();
   }
public function All($Page = '') {
      $Session = Gdn::Session();
      $this->Title(T('Inbox'));
      Gdn_Theme::Section('ConversationList');

      list($Offset, $Limit) = OffsetLimit($Page, C('Conversations.Conversations.PerPage', 50));
      
      // Calculate offset
      $this->Offset = $Offset;
      
      $UserID = $this->Request->Get('userid', Gdn::Session()->UserID);
      if ($UserID != Gdn::Session()->UserID) {
         if (!C('Conversations.Moderation.Allow', FALSE)) {
            throw PermissionException();
         }
         $this->Permission('Conversations.Moderation.Manage');
      }
      
      $Conversations = $this->ConversationModel->Get2($UserID, $Offset, $Limit);
      $this->SetData('Conversations', $Conversations->ResultArray());
      
      // Get Conversations Count
      //$CountConversations = $this->ConversationModel->GetCount($UserID);
      //$this->SetData('CountConversations', $CountConversations);
      
      // Build the pager
      if (!$this->Data('_PagerUrl'))
         $this->SetData('_PagerUrl', 'messages/all/{Page}');
      $this->SetData('_Page', $Page);
      $this->SetData('_Limit', $Limit);
      $this->SetData('_CurrentRecords', count($Conversations->ResultArray()));
      
      // Deliver json data if necessary
      if ($this->_DeliveryType != DELIVERY_TYPE_ALL && $this->_DeliveryMethod == DELIVERY_METHOD_XHTML) {
         $this->SetJson('LessRow', $this->Pager->ToString('less'));
         $this->SetJson('MoreRow', $this->Pager->ToString('more'));
         $this->View = 'conversations';
      }
      
      // Build and display page.
      $this->Render();
   }
public function All ( $ Page = '' ) { $ Session = Gdn :: Session ( ) ; $ this -> Title ( T ( 'Inbox' ) ) ; Gdn_Theme :: Section ( 'ConversationList' ) ; list ( $ Offset , $ Limit ) = OffsetLimit ( $ Page , C ( 'Conversations.Conversations.PerPage' , 50 ) ) ; // Calculate offset $ this -> Offset = $ Offset ; $ UserID = $ this -> Request -> Get ( 'userid' , Gdn :: Session ( ) -> UserID ) ; if ( $ UserID != Gdn :: Session ( ) -> UserID ) { if ( ! C ( 'Conversations.Moderation.Allow' , FALSE ) ) { throw PermissionException ( ) ; } $ this -> Permission ( 'Conversations.Moderation.Manage' ) ; } $ Conversations = $ this -> ConversationModel -> Get2 ( $ UserID , $ Offset , $ Limit ) ; $ this -> SetData ( 'Conversations' , $ Conversations -> ResultArray ( ) ) ; // Get Conversations Count //$CountConversations = $this->ConversationModel->GetCount($UserID); //$this->SetData('CountConversations', $CountConversations); // Build the pager if ( ! $ this -> Data ( '_PagerUrl' ) ) $ this -> SetData ( '_PagerUrl' , 'messages/all/{Page}' ) ; $ this -> SetData ( '_Page' , $ Page ) ; $ this -> SetData ( '_Limit' , $ Limit ) ; $ this -> SetData ( '_CurrentRecords' , count ( $ Conversations -> ResultArray ( ) ) ) ; // Deliver json data if necessary if ( $ this -> _DeliveryType != DELIVERY_TYPE_ALL && $ this -> _DeliveryMethod == DELIVERY_METHOD_XHTML ) { $ this -> SetJson ( 'LessRow' , $ this -> Pager -> ToString ( 'less' ) ) ; $ this -> SetJson ( 'MoreRow' , $ this -> Pager -> ToString ( 'more' ) ) ; $ this -> View = 'conversations' ; } // Build and display page. $ this -> Render ( ) ; }
Show all conversations for the currently authenticated user.

@since 2.0.0
@access public

@param string $Page
Show all conversations for the currently authenticated user .