mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-24 06:48:40 +01:00
widen regular expression for sort-column to allow custom fields with relative arbitrary name (letters, numbers, space)
This commit is contained in:
parent
83f3c310e5
commit
0a07505b20
@ -336,7 +336,7 @@ class Nextmatch extends Etemplate\Widget
|
|||||||
// Parse sort into something that get_rows functions are expecting: db_field in order, ASC/DESC in sort
|
// Parse sort into something that get_rows functions are expecting: db_field in order, ASC/DESC in sort
|
||||||
if(is_array($value['sort']))
|
if(is_array($value['sort']))
|
||||||
{
|
{
|
||||||
$value['order'] = preg_match('/^[a-z0-9_]+$/', $value['sort']['id']) ? $value['sort']['id'] : '';
|
$value['order'] = preg_match('/^(#[a-z0-9 _]+|[a-z0-9_]+)$/i', $value['sort']['id']) ? $value['sort']['id'] : '';
|
||||||
$value['sort'] = $value['sort']['asc'] ? 'ASC' : 'DESC';
|
$value['sort'] = $value['sort']['asc'] ? 'ASC' : 'DESC';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user