Skip to content

Commit

Permalink
bug 3056 quick search - fix regex for date searches (was not working …
Browse files Browse the repository at this point in the history
…with months 11 and 12)

git-svn-id: http://piwigo.org/svn/trunk@29022 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Jul 10, 2014
1 parent dcc719a commit cff2173
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/functions_search.inc.php
Expand Up @@ -426,7 +426,7 @@ function parse($token)

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]))
Expand Down Expand Up @@ -1308,4 +1308,4 @@ function get_search_results($search_id, $super_order_by, $images_where='')
}
}

?>
?>

0 comments on commit cff2173

Please sign in to comment.