diff --git a/src/controllers/Bookmarks.php b/src/controllers/Bookmarks.php index 8007bd25..aa28bab7 100644 --- a/src/controllers/Bookmarks.php +++ b/src/controllers/Bookmarks.php @@ -50,7 +50,6 @@ public function index(Request $request): Response [ 'offset' => $pagination->currentOffset(), 'limit' => $pagination->numberPerPage(), - 'context_user_id' => $user->id, ] ), 'pagination' => $pagination, diff --git a/src/controllers/Collections.php b/src/controllers/Collections.php index ea754a6f..d4999551 100644 --- a/src/controllers/Collections.php +++ b/src/controllers/Collections.php @@ -196,7 +196,6 @@ public function show(Request $request): Response [ 'offset' => $pagination->currentOffset(), 'limit' => $pagination->numberPerPage(), - 'context_user_id' => $user->id, ] ), 'pagination' => $pagination, @@ -211,7 +210,6 @@ public function show(Request $request): Response 'hidden' => $access_is_shared, 'offset' => $pagination->currentOffset(), 'limit' => $pagination->numberPerPage(), - 'context_user_id' => $user ? $user->id : '', ] ), 'pagination' => $pagination, diff --git a/src/controllers/Profiles.php b/src/controllers/Profiles.php index d5691e58..21176460 100644 --- a/src/controllers/Profiles.php +++ b/src/controllers/Profiles.php @@ -39,7 +39,6 @@ public function show(Request $request): Response $links = $user->links(['published_at', 'number_comments'], [ 'unshared' => false, 'limit' => 6, - 'context_user_id' => $current_user ? $current_user->id : null, ]); $collections = $user->collections(['number_links'], [ diff --git a/src/controllers/Read.php b/src/controllers/Read.php index 852b204f..2bb7bf2d 100644 --- a/src/controllers/Read.php +++ b/src/controllers/Read.php @@ -50,7 +50,6 @@ public function index(Request $request): Response [ 'offset' => $pagination->currentOffset(), 'limit' => $pagination->numberPerPage(), - 'context_user_id' => $user->id, ] ); diff --git a/src/models/dao/Link.php b/src/models/dao/Link.php index 527a88b8..b04d6fae 100644 --- a/src/models/dao/Link.php +++ b/src/models/dao/Link.php @@ -164,6 +164,7 @@ public static function listComputedByUserId( INNER JOIN collections c ON lc.collection_id = c.id AND c.is_public = true + AND c.user_id = :user_id SQL; if (in_array('published_at', $selected_computed_props)) {