Пример #1
0
 /**
  * @author : ELGUENNUNI Sohaib, s.elguennuni@gmail.com
  * @return type 
  */
 public function getPostsAllNetwork($idMember, $iswhere = false, $last_timeCreate = 0)
 {
     $numberPost = $this->_config->value->max_post;
     //$numberPostPertinent = $this->_config->value->max_post_pertinent;
     $postPertinent = $this->getLastPostHasMyTags($idMember, $iswhere, $last_timeCreate);
     $arrayIDPost = App_Utilities::convert_toArray($postPertinent, 'wall_post_id');
     $arrayPost = !empty($arrayIDPost['item_id']) ? $arrayIDPost : array('item_id' => array(0));
     $numberPostNormal = $numberPost - count($postPertinent);
     $postNormal = $this->getLastPost($numberPostNormal, $arrayPost, $iswhere, $last_timeCreate);
     $arrPosts = $postPertinent->toArray() + $postNormal->toArray();
     $arrPostSorted = App_Utilities::aasort($arrPosts, 'time_create', 'DESC');
     return $arrPostSorted;
 }