mirror of
https://github.com/YGGverse/Yo.git
synced 2026-04-02 10:45:29 +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;
|
$p = !empty($_GET['p']) ? (int) $_GET['p'] : 1;
|
||||||
|
|
||||||
// Register new URL by request on enabled
|
// 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
|
// Prepare URL
|
||||||
$url = $q;
|
$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
|
// Extended syntax corrections
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue