Commit da2062e4 authored by profix898's avatar profix898

- bugfix: advanced search broken

- task: make filter tag case-insensitive
parent af61057b
......@@ -55,7 +55,7 @@ function gallery_filter_process($text) {
foreach ($args as $arg) {
list($key, $value) = array_filter(explode('=', $arg));
if (!empty($value)) {
$key = preg_replace('/\W/', '', $key);
$key = strtolower(preg_replace('/\W/', '', $key));
$params[$key] = _gallery_filter_sanitize($key, $value);
}
}
......@@ -148,7 +148,7 @@ function gallery_filter_process($text) {
* (sanitize filter parameters)
*/
function _gallery_filter_sanitize($key, $value) {
switch (strtolower($key)) {
switch ($key) {
case 'n':
case 'size':
case 'maxsize':
......
......@@ -100,7 +100,7 @@ function _gallery_search_pager_search(&$keys, $limit = 10, $element = 0) {
/**
* Function _gallery_search_perform().
*/
function _gallery_search_perform(&$keys, $offset = 0, $limit = -1) {
function _gallery_search_perform($keys, $offset = 0, $limit = -1) {
list($search_interface, $options) = _gallery_search_init();
if (!isset($search_interface)) {
return array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment