Example #1
0
 public function GetOlderPosts()
 {
     #Aumenta o contador
     if (!$this->session->times_reloaded) {
         $this->session->times_reloaded = new stdClass();
     }
     $list_id = is_null($this->post->list_id) ? '' : $list_id;
     $o = new stdClass();
     $o->min = $this->post->min_id;
     $o->max = $this->post->max_id;
     if ($this->post->list_id == '') {
         $data = Timeline::build($this->session->user->id, $o);
         $posts = $this->render($data);
     } elseif ($this->post->list_id == 'bookmarks') {
         $data = $this->MyFavorites($o);
         $posts = $this->render($data);
     } elseif ($this->post->list_id == 'all_posts') {
         $data = Timeline::get_public_posts($o);
         $posts = $this->render($data);
     } elseif (is_numeric($this->post->list_id)) {
         $data = Timeline::build_from_list($this->session->user->id, $list_id, $o);
         $posts = $this->render($data);
     }
     header("Content-type: text/html; charset=utf-8");
     if (is_array($posts)) {
         foreach ($posts as $post) {
             echo $post;
         }
     } else {
         die('');
     }
 }