From 530bbf058781e00e588f1457b6ee589a64b74da1 Mon Sep 17 00:00:00 2001 From: Freya Murphy Date: Fri, 5 Apr 2024 10:46:09 -0400 Subject: i did thing oh god large commit --- src/web/_controller/_util/post.php | 8 ++++---- src/web/_controller/apps/people.php | 7 +++++++ src/web/_controller/apps/profile.php | 6 +++++- 3 files changed, 16 insertions(+), 5 deletions(-) (limited to 'src/web/_controller') diff --git a/src/web/_controller/_util/post.php b/src/web/_controller/_util/post.php index 4da2671..5346497 100644 --- a/src/web/_controller/_util/post.php +++ b/src/web/_controller/_util/post.php @@ -79,9 +79,9 @@ class Post_controller extends Controller { ->where('p.id')->le($max); } - if ($uid) { + if ($filter_uid) { $query = $query - ->where('p.user_id')->eq($uid); + ->where('p.user_id')->eq($filter_uid); } $posts = $query @@ -106,9 +106,9 @@ class Post_controller extends Controller { ->select('COUNT(p.id) as pc') ->from('api.post p'); - if ($uid) { + if ($filter_uid) { $query = $query - ->where('p.user_id')->eq($uid); + ->where('p.user_id')->eq($filter_uid); } $pc = $query diff --git a/src/web/_controller/apps/people.php b/src/web/_controller/apps/people.php index 19910ac..86da3b3 100644 --- a/src/web/_controller/apps/people.php +++ b/src/web/_controller/apps/people.php @@ -17,10 +17,17 @@ class People_controller extends Controller { parent::index(); $data = $this->people_model->get_data(); $this->view('header', $data); + $this->view('apps/people/header', $data); $this->view('apps/people/main', $data); + $this->view('apps/people/footer', $data); $this->view('footer', $data); } + public function content(): void { + $data = $this->people_model->get_data(); + $this->view('apps/people/main', $data); + } + /** * @return array */ diff --git a/src/web/_controller/apps/profile.php b/src/web/_controller/apps/profile.php index aaed348..3bc9a91 100644 --- a/src/web/_controller/apps/profile.php +++ b/src/web/_controller/apps/profile.php @@ -7,12 +7,16 @@ class Profile_controller extends Controller { // the format model protected $format_model; - // the post model + // the post controller protected $post_controller; + // the people controller + protected $people_controller; + function __construct($load) { parent::__construct($load); $this->profile_model = $this->load->model('apps/profile'); + $this->people_controller = $this->load->controller('apps/people'); $this->format_model = $this->load->model('format'); $this->post_controller = $this->load->controller('_util/post'); } -- cgit v1.2.3-freya