2 маленьких фикса + конфиг для багзиллы
parent
1152a8df85
commit
1e4ded1796
4
olap.php
4
olap.php
|
@ -157,7 +157,7 @@ class OLAP
|
|||
if (!empty($v['options']))
|
||||
{
|
||||
if (is_callable($v['options']))
|
||||
$v['options'] = call_user_func($v['options']);
|
||||
$v['options'] = call_user_func($v['options'], $this);
|
||||
foreach ($v['options'] as &$o)
|
||||
$v['options_hash'][$o['id']] = $o['name'];
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ class OLAP
|
|||
continue;
|
||||
$this->request[$k] = $v;
|
||||
if (!empty($fd['is_time']))
|
||||
$v = Template::timestamp($v, $this->current_src['fielddescs'][$f]['format']);
|
||||
$v = VMXTemplate::timestamp($v, $this->current_src['fielddescs'][$f]['format']);
|
||||
$this->where_nosql[] = array($f, $t, $v);
|
||||
if ($fd['options'])
|
||||
foreach ($fd['options'] as &$o)
|
||||
|
|
|
@ -73,4 +73,26 @@ OLAP::$sources = array(
|
|||
),
|
||||
),
|
||||
),
|
||||
'bugzilla' => array(
|
||||
'id' => 'bugzilla',
|
||||
'name' => 'Время Bugzilla',
|
||||
'tables' => array('t' => 'bugs3.longdescs', 'p' => 'bugs3.profiles'),
|
||||
'fields' => 'p.login_name, t.bug_when, t.work_time',
|
||||
'where' => array('t.who=p.userid'),
|
||||
'fielddescs' => array(
|
||||
'login_name' => array(
|
||||
'name' => 'Сотрудник',
|
||||
),
|
||||
'bug_when' => array(
|
||||
'name' => 'Момент',
|
||||
'le_ge' => true,
|
||||
'is_time' => true,
|
||||
'format' => TS_DB,
|
||||
),
|
||||
'work_time' => array(
|
||||
'name' => 'Часы',
|
||||
'le_ge' => true,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue