mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-27 09:09:04 +01:00
- Fixed return_html() not working when no history is present
- Fixed return_array() not working when using the show_only paramter
This commit is contained in:
parent
e4f41e8ec1
commit
aa8339f99c
@ -55,8 +55,18 @@
|
||||
}
|
||||
|
||||
// array $filter_out
|
||||
function return_array($filter_out,$only_show,$orderby = '',$sort = '', $record_id = 0)
|
||||
function return_array($filter_out,$only_show,$_orderby = '',$sort = '', $record_id = 0)
|
||||
{
|
||||
|
||||
if (! $sort || ! $_orderby)
|
||||
{
|
||||
$orderby = 'order by history_timestamp,history_id';
|
||||
}
|
||||
else
|
||||
{
|
||||
$orderby = "order by $_orderby $sort";
|
||||
}
|
||||
|
||||
while (is_array($filter_out) && list(,$_filter) = each($filter_out))
|
||||
{
|
||||
$filtered[] = "history_status != '$_filter'";
|
||||
@ -74,7 +84,7 @@
|
||||
|
||||
if (is_array($_only_show))
|
||||
{
|
||||
$only_show_filter = ' and ' . implode(' and ',$_only_show);
|
||||
$only_show_filter = ' and ' . implode(' or ',$_only_show);
|
||||
}
|
||||
|
||||
if ($record_id)
|
||||
@ -83,7 +93,7 @@
|
||||
}
|
||||
|
||||
$this->db->query("select * from phpgw_history_log where history_appname='"
|
||||
. $this->appname . "' $filter $record_filter $only_show_filter order by history_timestamp,history_id",__LINE__,__FILE__);
|
||||
. $this->appname . "' $filter $record_filter $only_show_filter $orderby",__LINE__,__FILE__);
|
||||
while ($this->db->next_record())
|
||||
{
|
||||
$return_values[] = array(
|
||||
@ -125,6 +135,7 @@
|
||||
|
||||
if (! is_array($values))
|
||||
{
|
||||
$this->template->set_var('tr_color',$GLOBALS['phpgw_info']['theme']['row_off']);
|
||||
$this->template->set_var('lang_no_history',lang('No history for this record'));
|
||||
$this->template->fp('rows','row_no_history');
|
||||
return $this->template->fp('out','list');
|
||||
|
Loading…
Reference in New Issue
Block a user