File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
phpmyfaq/src/phpMyFAQ/Controller/Api Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,8 @@ public function list(): JsonResponse
122122 /** @var Question $question */
123123 $ question = $ this ->container ?->get(id: 'phpmyfaq.question ' );
124124
125+ $ onlyPublic = (bool ) $ this ->configuration ->get ('api.onlyPublicQuestions ' );
126+
125127 // Get pagination and sorting parameters
126128 $ pagination = $ this ->getPaginationRequest ();
127129 $ sort = $ this ->getSortRequest (
@@ -131,7 +133,7 @@ public function list(): JsonResponse
131133 );
132134
133135 // Get all open questions
134- $ allQuestions = $ question ->getAll (false );
136+ $ allQuestions = $ question ->getAll ($ onlyPublic );
135137 $ total = is_countable ($ allQuestions ) ? count ($ allQuestions ) : 0 ;
136138
137139 // Apply sorting if needed
You can’t perform that action at this time.
0 commit comments