Skip to content
Snippets Groups Projects
Commit cdf15908 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

making sure the date is no more than a year ago

parent 63d2944d
No related branches found
No related tags found
3 merge requests!1937Development,!1926Development,!1925Resolve "Modify Date Filter"
......@@ -1094,6 +1094,19 @@ class MetaGer
$from = $tmp;
$changed = true;
}
# Bing only allows a maximum of 1 year in the past
# Verify the parameters
$yearAgo = Carbon::now()->subYear();
if ($from < $yearAgo) {
$from = clone $yearAgo;
$changed = true;
}
if ($to < $yearAgo) {
$to = clone $yearAgo;
$changed = true;
}
if ($changed) {
$oldParameters = $this->request->all();
$oldParameters["ff"] = $from->format("Y-m-d");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment