mirror of
https://github.com/YGGverse/Yo.git
synced 2026-04-02 18:55:30 +00:00
add notice on URL request does not match node settings
This commit is contained in:
parent
2d26c65c71
commit
38d1649361
1 changed files with 47 additions and 40 deletions
|
|
@ -50,9 +50,9 @@ $q = !empty($_GET['q']) ? trim($_GET['q']) : '';
|
|||
$p = !empty($_GET['p']) ? (int) $_GET['p'] : 1;
|
||||
|
||||
// Register new URL by request on enabled
|
||||
if ($config->webui->search->index->request->url->enabled)
|
||||
if ($config->webui->search->index->request->url->enabled && filter_var($q, FILTER_VALIDATE_URL))
|
||||
{
|
||||
if (filter_var($q, FILTER_VALIDATE_URL) && preg_match($config->webui->search->index->request->url->regex, $q))
|
||||
if (preg_match($config->webui->search->index->request->url->regex, $q))
|
||||
{
|
||||
// Prepare URL
|
||||
$url = $q;
|
||||
|
|
@ -93,6 +93,13 @@ if ($config->webui->search->index->request->url->enabled)
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
$response = sprintf(
|
||||
_('URL "%s" does not match node settings!'),
|
||||
htmlentities($q)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Extended syntax corrections
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue