Version 4.7.23
This commit is contained in:
1 parent
7124a02564
commit
25ddeb65d6
1791 files changed
+76990
-44452
No files matched your search
@@ -61,6 +61,11 @@ class _Database extends \IPS\Helpers\Chart\Dynamic
|
||||
* @brief Table Column Formatters
|
||||
*/
|
||||
public $tableParsers = array();
|
||||
|
||||
/**
|
||||
* @brief Table Lang Prefix
|
||||
*/
|
||||
public $tableLangPrefix = NULL;
|
||||
|
||||
/**
|
||||
* @brief Along with the other series, show one of the sum of all
|
||||
@@ -345,7 +350,7 @@ class _Database extends \IPS\Helpers\Chart\Dynamic
|
||||
NULL,
|
||||
NULL,
|
||||
$this->groupBy
|
||||
)->setKeyField( $this->groupBy )->setValueField( $key );
|
||||
);
|
||||
|
||||
if( \count( $this->joins ) )
|
||||
{
|
||||
@@ -354,7 +359,10 @@ class _Database extends \IPS\Helpers\Chart\Dynamic
|
||||
$stmt = $stmt->join( $join[0], $join[1], ( isset( $join[2] ) ? $join[2] : 'LEFT' ), ( isset( $join[3] ) ? $join[3] : FALSE ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Calling this before the joins are added just executes the query and the joins are never added */
|
||||
$stmt->setKeyField( $this->groupBy )->setValueField( $key );
|
||||
|
||||
foreach ( $stmt as $k => $v )
|
||||
{
|
||||
if( \count( $this->availableFilters ) and !\in_array( $k, $this->currentFilters ) )
|
||||
@@ -581,6 +589,10 @@ class _Database extends \IPS\Helpers\Chart\Dynamic
|
||||
{
|
||||
$table->include = $this->tableInclude;
|
||||
}
|
||||
if ( $this->tableLangPrefix )
|
||||
{
|
||||
$table->langPrefix = $this->tableLangPrefix;
|
||||
}
|
||||
$table->parsers = $this->tableParsers;
|
||||
$table->sortBy = $table->sortBy ?: $this->dateField;
|
||||
|
||||
|
||||
@@ -417,7 +417,7 @@ abstract class _Dynamic extends \IPS\Helpers\Chart
|
||||
|
||||
$custom = array();
|
||||
$chartFilters = ( isset( \IPS\Request::i()->chartFilters ) and \IPS\Request::i()->chartFilters ) ? \IPS\Request::i()->chartFilters : array();
|
||||
$this->timescale = $chart['chart_timescale'] ?? 'monthly';
|
||||
$this->timescale = ( isset( \IPS\Request::i()->timescale ) and \IPS\Request::i()->timescale[ $this->identifier ] ) ? \IPS\Request::i()->timescale[ $this->identifier ] : $chart['chart_timescale'] ?? 'monthly';
|
||||
|
||||
foreach( \IPS\Request::i() as $key => $value )
|
||||
{
|
||||
@@ -779,7 +779,15 @@ abstract class _Dynamic extends \IPS\Helpers\Chart
|
||||
|
||||
/* Anything else can just save as-is */
|
||||
default:
|
||||
$save[] = $row[$i];
|
||||
if ( \is_array( $row[$i] ) )
|
||||
{
|
||||
/* GeoCharts use arrays so we need to use the value rather */
|
||||
$save[] = $row[$i]['value'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$save[] = $row[$i];
|
||||
}
|
||||
break;
|
||||
}
|
||||
$i++;
|
||||
|
||||
Reference in new issue
Block a user