forked from thorsten/phpMyFAQ
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,20 @@ | |
/** | ||
* This is XML code for OpenSearch. | ||
* | ||
* | ||
* @deprecated This functionality will be removed in phpMyFAQ 3.1 | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, | ||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | ||
* obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* @package phpMyFAQ | ||
* | ||
* @author Thorsten Rinne <[email protected]> | ||
* @copyright 2006-2019 phpMyFAQ Team | ||
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 | ||
* | ||
* @link https://www.phpmyfaq.de | ||
* @since 2006-11-19 | ||
*/ | ||
|
||
define('IS_VALID_PHPMYFAQ', null); | ||
|
||
require __DIR__.'/src/Bootstrap.php'; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,24 @@ | |
/** | ||
* This is the page there a user can add a FAQ record translation. | ||
* | ||
* | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, | ||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | ||
* obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* @package phpMyFAQ | ||
* | ||
* @author Matteo Scaramuccia <[email protected]> | ||
* @copyright 2006-2019 phpMyFAQ Team | ||
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 | ||
* | ||
* @link https://www.phpmyfaq.de | ||
* @since 2006-11-12 | ||
*/ | ||
|
||
use phpMyFAQ\Captcha; | ||
use phpMyFAQ\Faq; | ||
use phpMyFAQ\Filter; | ||
use phpMyFAQ\Helper\CaptchaHelper; | ||
use phpMyFAQ\Language; | ||
|
||
if (!defined('IS_VALID_PHPMYFAQ')) { | ||
$protocol = 'http'; | ||
if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { | ||
|
@@ -27,15 +30,15 @@ | |
exit(); | ||
} | ||
|
||
$captcha = new phpMyFAQ\Captcha($faqConfig); | ||
$captcha = new Captcha($faqConfig); | ||
$captcha->setSessionId($sids); | ||
|
||
if (!is_null($showCaptcha)) { | ||
$captcha->showCaptchaImg(); | ||
exit; | ||
} | ||
|
||
$translationLanguage = phpMyFAQ\Filter::filterInput(INPUT_POST, 'translation', FILTER_SANITIZE_STRIPPED, $LANGCODE); | ||
$translationLanguage = Filter::filterInput(INPUT_POST, 'translation', FILTER_SANITIZE_STRIPPED, $LANGCODE); | ||
|
||
if (!Language::isASupportedLanguage($translationLanguage)) { | ||
$translationLanguage = $LANGCODE; | ||
|
@@ -53,17 +56,17 @@ | |
// @todo handle the exception | ||
} | ||
|
||
$id = phpMyFAQ\Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); | ||
$categoryId = phpMyFAQ\Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT); | ||
$srclang = phpMyFAQ\Filter::filterInput(INPUT_GET, 'srclang', FILTER_SANITIZE_STRIPPED); | ||
$id = Filter::filterInput(INPUT_GET, 'id', FILTER_VALIDATE_INT); | ||
$categoryId = Filter::filterInput(INPUT_GET, 'cat', FILTER_VALIDATE_INT); | ||
$srclang = Filter::filterInput(INPUT_GET, 'srclang', FILTER_SANITIZE_STRIPPED); | ||
|
||
if (!is_null($id) && !is_null($srclang) && Language::isASupportedLanguage($srclang)) { | ||
$oFaq = new phpMyFAQ\Faq($faqConfig); | ||
$oFaq = new Faq($faqConfig); | ||
$oFaq->getRecord($id); | ||
$faqSource = $oFaq->faqRecord; | ||
} | ||
|
||
$captchaHelper = new phpMyFAQ\Helper_Captcha($faqConfig); | ||
$captchaHelper = new CaptchaHelper($faqConfig); | ||
|
||
// Enable/Disable WYSIWYG editor | ||
if ($faqConfig->get('main.enableWysiwygEditorFrontend')) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,21 +3,20 @@ | |
/** | ||
* Snippet for writing a comment. | ||
* | ||
* | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public License, | ||
* v. 2.0. If a copy of the MPL was not distributed with this file, You can | ||
* obtain one at http://mozilla.org/MPL/2.0/. | ||
* | ||
* @package phpMyFAQ | ||
* | ||
* @author Thorsten Rinne <[email protected]> | ||
* @copyright 2002-2019 phpMyFAQ Team | ||
* @license http://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0 | ||
* | ||
* @link https://www.phpmyfaq.de | ||
* @since 2002-08-29 | ||
*/ | ||
|
||
use phpMyFAQ\Captcha; | ||
|
||
if (!defined('IS_VALID_PHPMYFAQ')) { | ||
$protocol = 'http'; | ||
if (isset($_SERVER['HTTPS']) && strtoupper($_SERVER['HTTPS']) === 'ON') { | ||
|
@@ -27,7 +26,7 @@ | |
exit(); | ||
} | ||
|
||
$captcha = new phpMyFAQ\Captcha($faqConfig); | ||
$captcha = new Captcha($faqConfig); | ||
$captcha->setSessionId($sids); | ||
|
||
if (!is_null($showCaptcha)) { | ||
|