X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fsearch.php;h=c1990bf8708ba1d9a9d5148264f34d87ea9c9a79;hb=0454d0a670e051e8519e9a4220606f83d1408214;hp=57b65df1c4bcc011e8c9b9fe9336065f06061b8c;hpb=407b2397cbb25a1de9252f16279dfdd786ffade1;p=friendica.git diff --git a/mod/search.php b/mod/search.php index 57b65df1c4..c1990bf870 100644 --- a/mod/search.php +++ b/mod/search.php @@ -8,6 +8,7 @@ use Friendica\Content\Nav; use Friendica\Core\Cache; use Friendica\Core\Config; use Friendica\Core\L10n; +use Friendica\Core\System; use Friendica\Database\DBM; require_once "include/bbcode.php"; @@ -99,7 +100,7 @@ function search_content(App $a) { } if (Config::get('system','local_search') && !local_user() && !remote_user()) { - http_status_exit(403, + System::httpExit(403, ["title" => L10n::t("Public access denied."), "description" => L10n::t("Only logged in users are permitted to perform a search.")]); killme(); @@ -124,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)) { - http_status_exit(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(); @@ -226,10 +227,11 @@ function search_content(App $a) { } - if ($tag) - $title = sprintf(L10n::t('Items tagged with: %s'), $search); - else - $title = sprintf(L10n::t('Results for: %s'), $search); + if ($tag) { + $title = L10n::t('Items tagged with: %s', $search); + } else { + $title = L10n::t('Results for: %s', $search); + } $o .= replace_macros(get_markup_template("section_title.tpl"),[ '$title' => $title