1<?php 2 3/** 4 * FAQ overview page. 5 * 6 * This Source Code Form is subject to the terms of the Mozilla Public License, 7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can 8 * obtain one at http://mozilla.org/MPL/2.0/. 9 * 10 * @package phpMyFAQ 11 * @author Thorsten Rinne <thorsten@phpmyfaq.de> 12 * @copyright 2015-2020 phpMyFAQ Team 13 * @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 14 * @link https://www.phpmyfaq.de 15 * @since 2015-09-27 16 */ 17 18use phpMyFAQ\Helper\FaqHelper; 19 20if (!defined('IS_VALID_PHPMYFAQ')) { 21 http_response_code(400); 22 exit(); 23} 24 25try { 26 $faqSession->userTracking('overview', 0); 27} catch (Exception $e) { 28 // @todo handle the exception 29} 30 31$faqHelper = new FaqHelper($faqConfig); 32 33$faq->setUser($currentUser); 34$faq->setGroups($currentGroups); 35 36$template->parse( 37 'mainPageContent', 38 [ 39 'pageHeader' => $PMF_LANG['faqOverview'], 40 'overview' => $faqHelper->createOverview($category, $faq, $faqLangCode), 41 ] 42); 43 44