Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dataProvider = new CActiveDataProvider('PersonalMessage', array(
- 'criteria' => array(
- 'condition' => '(t.sender_id = :user_id OR t.recipient_id = :user_id)',
- 'params' => array(
- ':user_id' => $this->_userId
- ),
- 'group' => 't.thread_id DESC',
- 'order' => 't.id desc',
- //(t.read=0 && t.recipient_id='.$this->_userId.' && t.sender_id<>'.$this->_userId.')
- //, 'sender'=> array('alias' => 'send')
- 'with' => array('recipient'=> array('alias' => 'rec')),
- ),
- 'pagination'=>array(
- 'pageSize'=>20,
- ),
- ));
- $dataProvider3 = new CActiveDataProvider('PersonalMessage', array(
- 'criteria' => array(
- 'condition' => '(t.recipient_id = :user_id) && t.read=0',
- 'params' => array(
- ':user_id' => $this->_userId
- ),
- 'group' => 't.thread_id DESC',
- 'order' => 't.id desc',
- //(t.read=0 && t.recipient_id='.$this->_userId.' && t.sender_id<>'.$this->_userId.')
- //, 'sender'=> array('alias' => 'send')
- 'with' => array('recipient'=> array('alias' => 'rec')),
- ),
- 'pagination'=>array(
- 'pageSize'=>20,
- ),
- ));
- $dataProvider2=new CActiveDataProvider('PersonalMessage',array(
- 'criteria'=>array(
- 'condition'=>'(t.recipient_id=:support_id)',
- 'params'=>array(':support_id'=>User::model()->find('username="support"')->id),
- 'order'=>'t.id DESC',
- 'group'=>'t.thread_id DESC',
- ),
- 'pagination'=>array(
- 'pageSize'=>20,
- ),
- ));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement