aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorrvelices <rv-github@modusoptimus.com>2014-07-10 21:00:12 +0000
committerrvelices <rv-github@modusoptimus.com>2014-07-10 21:00:12 +0000
commitcff2173deba0f13c3b63c812dabd3dfebf9817bc (patch)
tree3ef674336cabaa3272d9fb90900136e78511cc98 /include
parentdcc719a06d47ec1af3c23f40a84c359f302c31c6 (diff)
bug 3056 quick search - fix regex for date searches (was not working with months 11 and 12)
git-svn-id: http://piwigo.org/svn/trunk@29022 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r--include/functions_search.inc.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php
index a65c26ace..1af36d3af 100644
--- a/include/functions_search.inc.php
+++ b/include/functions_search.inc.php
@@ -426,7 +426,7 @@ class QDateRangeScope extends QSearchScope
foreach ($range as $i =>&$val)
{
- if (preg_match('/([0-9]{4})-?((?:0?[0-9])|(?:1[0-2]))?-?(((?:0?[0-9])|(?:[1-3][0-9])))?/', $val, $matches))
+ if (preg_match('/([0-9]{4})-?((?:1[0-2])|(?:0?[1-9]))?-?((?:(?:[1-3][0-9])|(?:0?[1-9])))?/', $val, $matches))
{
array_shift($matches);
if (!isset($matches[1]))
@@ -1308,4 +1308,4 @@ function get_search_results($search_id, $super_order_by, $images_where='')
}
}
-?> \ No newline at end of file
+?>