@ -34,6 +34,7 @@
*/
use Friendica\App;
use Friendica\BaseModule;
use Friendica\Content\Text\Markdown;
use Friendica\Core\Addon;
use Friendica\Core\Cache;
@ -46,6 +47,7 @@ use Friendica\Model\Term;
use Friendica\Module\Login;
use Friendica\Network\HTTPException;
use Friendica\Util\DateTimeFormat;
use Friendica\Util\Security;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Symfony\Component\ExpressionLanguage;
@ -53,7 +55,6 @@ use Symfony\Component\ExpressionLanguage;
require_once 'boot.php';
require_once 'include/conversation.php';
require_once 'include/dba.php';
require_once 'include/security.php';
require_once __DIR__ . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php';
@ -234,7 +235,7 @@ function advancedcontentfilter_content(App $a)
],
'$current_theme' => $a->getCurrentTheme(),
'$rules' => advancedcontentfilter_get_rules(),
'$form_security_token' => get_form_security_t oken()
'$form_security_token' => BaseModule::getFormSecurityT oken()
]);
}
}
@ -322,7 +323,7 @@ function advancedcontentfilter_post_rules(ServerRequestInterface $request)
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_t oken()) {
if (!BaseModule::checkFormSecurityT oken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -356,7 +357,7 @@ function advancedcontentfilter_put_rules_id(ServerRequestInterface $request, Res
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_t oken()) {
if (!BaseModule::checkFormSecurityT oken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}
@ -385,7 +386,7 @@ function advancedcontentfilter_delete_rules_id(ServerRequestInterface $request,
throw new HTTPException\UnauthorizedException(L10n::t('You must be logged in to use this method'));
}
if (!check_form_security_t oken()) {
if (!BaseModule::checkFormSecurityT oken()) {
throw new HTTPException\BadRequestException(L10n::t('Invalid form security token, please refresh the page.'));
}