forked from extern/egroupware
"php5.2 fixes and hiding Export button for php4 or importexport not available"
This commit is contained in:
parent
20fcee771b
commit
4947ddfd99
@ -323,7 +323,7 @@ class botimesheet extends so_sql
|
||||
|
||||
if ($only_summary) return $this->summary;
|
||||
|
||||
if ($this->show_sums && strstr($order_by,'ts_start') && // sums only make sense if ordered by ts_start
|
||||
if ($this->show_sums && strpos($order_by,'ts_start') !== false && // sums only make sense if ordered by ts_start
|
||||
$this->db->capabilities['union'] && ($from_unixtime_ts_start = $this->db->from_unixtime('ts_start')))
|
||||
{
|
||||
$sum_sql = array(
|
||||
|
@ -86,7 +86,7 @@ class uitimesheet extends botimesheet
|
||||
);
|
||||
}
|
||||
$referer = preg_match('/menuaction=([^&]+)/',$_SERVER['HTTP_REFERER'],$matches) ? $matches[1] :
|
||||
(strstr($_SERVER['HTTP_REFERER'],'/infolog/index.php') ? 'infolog.uiinfolog.index' : TIMESHEET_APP.'.uitimesheet.index');
|
||||
(strpos($_SERVER['HTTP_REFERER'],'/infolog/index.php') !== false ? 'infolog.uiinfolog.index' : TIMESHEET_APP.'.uitimesheet.index');
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -635,6 +635,9 @@ class uitimesheet extends botimesheet
|
||||
if (!is_array($projects)) $projects = array();
|
||||
$sel_options['ts_project'] = $projects + array(lang('No project'));
|
||||
}
|
||||
// dont show [Export] button if app is not availible to the user or we are on php4
|
||||
$readonlys['export'] = !$GLOBALS['egw_info']['user']['apps']['importexport'] || (int) phpversion() < 5;
|
||||
|
||||
return $etpl->exec(TIMESHEET_APP.'.uitimesheet.index',$content,$sel_options,$readonlys,$preserv);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user