vitalif 2013-02-19 11:01:36 +00:00
parent f452ac0704
commit a274138775
1 changed files with 3 additions and 3 deletions

View File

@ -245,7 +245,7 @@ class OLAP
$this->cell['field_name'] = isset($this->cell['field']) ? $this->current_src['fielddescs'][$this->cell['field']]['name'] : NULL;
$this->cell['func_name'] = isset($this->cell['func']) ? self::$functions[$this->cell['func']]['name'] : NULL;
$this->cell['aggr_name'] = isset($this->cell['aggr']) ? self::$aggregates[$this->cell['aggr']]['name'] : NULL;
$this->cell['value_desc'] = $this->cell['field_name'];
$this->cell['value_desc'] = $this->cell['field_name'] ?: '*';
if ($this->cell['func_name'])
$this->cell['value_desc'] = $this->cell['func_name'].'('.$this->cell['value_desc'].')';
$this->cell['value_desc_brace'] = $this->cell['value_desc'];
@ -864,7 +864,7 @@ class OLAP
$fd = &$this->current_src['fielddescs'][$field];
$c = "\$r['$field']";
if (!empty($fd['is_time']) &&
!self::$functions[$func] || self::$functions[$func]['time_format'])
(empty(self::$functions[$func]) || !empty(self::$functions[$func]['time_format'])))
{
if ($fd['format'] == VMXTemplate::TS_UNIX)
$c = "date('Y-m-d', $c)";
@ -888,7 +888,7 @@ class OLAP
$sql = $fd['sql'];
}
if (!empty($fd['is_time']) &&
empty(self::$functions[$func]) || self::$functions[$func]['time_format'])
(empty(self::$functions[$func]) || !empty(self::$functions[$func]['time_format'])))
{
if ($fd['format'] == VMXTemplate::TS_UNIX)
$sql = "FROM_UNIXTIME($sql)";