Move functions to system

move some functions to system
This commit is contained in:
Adam Magness 2018-01-27 11:59:10 -05:00
parent f04d40a37e
commit 9b8599b619
21 changed files with 169 additions and 169 deletions

View file

@ -8,8 +8,8 @@ use Friendica\Content\Nav;
use Friendica\Core\Cache;
use Friendica\Core\Config;
use Friendica\Core\L10n;
use Friendica\Core\System;
use Friendica\Database\DBM;
use Friendica\Util\Network;
require_once "include/bbcode.php";
require_once 'include/security.php';
@ -100,7 +100,7 @@ function search_content(App $a) {
}
if (Config::get('system','local_search') && !local_user() && !remote_user()) {
Network::httpStatusExit(403,
System::httpExit(403,
["title" => L10n::t("Public access denied."),
"description" => L10n::t("Only logged in users are permitted to perform a search.")]);
killme();
@ -125,7 +125,7 @@ function search_content(App $a) {
if (!is_null($result)) {
$resultdata = json_decode($result);
if (($resultdata->time > (time() - $crawl_permit_period)) && ($resultdata->accesses > $free_crawls)) {
Network::httpStatusExit(429,
System::httpExit(429,
["title" => L10n::t("Too Many Requests"),
"description" => L10n::t("Only one search per minute is permitted for not logged in users.")]);
killme();