Beispiel #1
0
 private function _getSourceInfo($typeid, $fromid)
 {
     $extend = array();
     switch ($typeid) {
         case PwLikeContent::THREAD:
             $msg = Wekit::load('forum.PwThread')->getThread($fromid);
             //needcheck
             Wind::import('SRV:forum.srv.post.PwReplyPost');
             Wind::import('SRV:forum.srv.PwPost');
             $postAction = new PwReplyPost($fromid);
             $post = new PwPost($postAction);
             if ($post->getDisabled()) {
                 $extend = array('needcheck' => true);
             }
             return array($msg['created_userid'], $msg['special'], $msg['like_count'], $msg['fid'], $extend);
         case PwLikeContent::POST:
             $msg = Wekit::load('forum.PwThread')->getPost($fromid);
             return array($msg['created_userid'], 0, $msg['like_count'], $msg['fid']);
         case PwLikeContent::WEIBO:
             $msg = Wekit::load('weibo.PwWeibo')->getWeibo($fromid);
             return array($msg['created_userid'], 0, $msg['like_count'], 0);
         case PwLikeContent::APP:
             $msg = Wekit::load('like.PwLikeSource')->getSource($fromid);
             return array(0, 0, $msg['like_count'], 0);
     }
 }