mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-15 18:38:57 +01:00
fix for bug [ 1446067 ] Invalid SQL sorting holidays
This commit is contained in:
parent
a116120ab8
commit
81a8e89f69
@ -172,11 +172,11 @@
|
|||||||
$querymethod = 'hol_locale LIKE '.$this->db->quote('%'.$query.'%');
|
$querymethod = 'hol_locale LIKE '.$this->db->quote('%'.$query.'%');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(preg_match('/^[a-zA-Z0-9_,]+$/',$order))
|
if(!preg_match('/^[a-zA-Z0-9_,]+$/',$order))
|
||||||
{
|
{
|
||||||
$querymethod .= ' ORDER BY '.$order;
|
$order = 'hol_local';
|
||||||
}
|
}
|
||||||
$this->db->select($this->table,'DISTINCT hol_locale',$querymethod,__LINE__,__FILE__);
|
$this->db->select($this->table,'DISTINCT hol_locale',$querymethod,__LINE__,__FILE__,false,$order);
|
||||||
while($this->db->next_record())
|
while($this->db->next_record())
|
||||||
{
|
{
|
||||||
$locale[] = $this->db->f('hol_locale');
|
$locale[] = $this->db->f('hol_locale');
|
||||||
|
@ -92,7 +92,7 @@
|
|||||||
'left_next_matchs' => $GLOBALS['egw']->nextmatchs->left('/index.php?menuaction=calendar.uiholiday.admin',$this->bo->start,$this->bo->total),
|
'left_next_matchs' => $GLOBALS['egw']->nextmatchs->left('/index.php?menuaction=calendar.uiholiday.admin',$this->bo->start,$this->bo->total),
|
||||||
'right_next_matchs' => $GLOBALS['egw']->nextmatchs->right('/index.php?menuaction=calendar.uiholiday.admin',$this->bo->start,$this->bo->total),
|
'right_next_matchs' => $GLOBALS['egw']->nextmatchs->right('/index.php?menuaction=calendar.uiholiday.admin',$this->bo->start,$this->bo->total),
|
||||||
'center' => '<td align="center">'.lang('Countries').'</td>',
|
'center' => '<td align="center">'.lang('Countries').'</td>',
|
||||||
'sort_name' => $GLOBALS['egw']->nextmatchs->show_sort_order($this->bo->sort,'locale',$this->bo->order,'/calendar/'.basename($SCRIPT_FILENAME),lang('Country')),
|
'sort_name' => $GLOBALS['egw']->nextmatchs->show_sort_order($this->bo->sort,'hol_locale',$this->bo->order,'/calendar/'.basename($SCRIPT_FILENAME),lang('Country')),
|
||||||
'header_edit' => lang('Edit'),
|
'header_edit' => lang('Edit'),
|
||||||
'header_delete' => lang('Delete'),
|
'header_delete' => lang('Delete'),
|
||||||
'header_extra' => lang('Submit to Repository'),
|
'header_extra' => lang('Submit to Repository'),
|
||||||
|
Loading…
Reference in New Issue
Block a user