From 8a7d1ed0a797f8486a9b2ac50081f5c281df4ecf Mon Sep 17 00:00:00 2001 From: xieqiyu Date: Mon, 20 May 2024 15:25:05 +0800 Subject: [PATCH] * Fix bug#49773. --- lib/zin/wg/storyrelatedlist/v1.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/zin/wg/storyrelatedlist/v1.php b/lib/zin/wg/storyrelatedlist/v1.php index ecb389a90b..8cae2a7267 100644 --- a/lib/zin/wg/storyrelatedlist/v1.php +++ b/lib/zin/wg/storyrelatedlist/v1.php @@ -99,7 +99,7 @@ class storyRelatedList extends relatedList 'onRender' => function($item, $linkedStory) use($storyProducts, $story, $app) { $storyID = $linkedStory->id; - $hasPriv = ($app->user->admin || str_contains(",{$app->user->view->products},", ",{$storyProducts[$story->id]},")); + $hasPriv = ($app->user->admin || str_contains(",{$app->user->view->products},", ",{$storyProducts[$storyID]},")); $item['url'] = $hasPriv ? createLink('story', 'view', "storyID=$storyID&version=0¶m=0&storyType=$story->type") : false; if($hasPriv) {