Version 4.5.0
This commit is contained in:
1 parent
1a0c7fd3c2
commit
f79dcf067a
3791 files changed
+248032
-76372
No files matched your search
@@ -11,7 +11,7 @@
|
||||
namespace IPS\Helpers;
|
||||
|
||||
/* To prevent PHP errors (extending class does not exist) revealing path */
|
||||
if ( !defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
if ( !\defined( '\IPS\SUITE_UNIQUE_KEY' ) )
|
||||
{
|
||||
header( ( isset( $_SERVER['SERVER_PROTOCOL'] ) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.0' ) . ' 403 Forbidden' );
|
||||
exit;
|
||||
@@ -84,7 +84,7 @@ class _Chart
|
||||
*/
|
||||
public function addRow( $values )
|
||||
{
|
||||
if ( count( $values ) !== count( $this->headers ) )
|
||||
if ( \count( $values ) !== \count( $this->headers ) )
|
||||
{
|
||||
throw new \LengthException('COLUMN_COUNT_MISMATCH');
|
||||
}
|
||||
@@ -96,21 +96,21 @@ class _Chart
|
||||
switch ( $data['type'] )
|
||||
{
|
||||
case 'string':
|
||||
if ( !is_string( $values[ $i ] ) )
|
||||
if ( !\is_string( $values[ $i ] ) )
|
||||
{
|
||||
throw new \InvalidArgumentException( "VALUE_{$i}_NOT_STRING" );
|
||||
}
|
||||
break;
|
||||
|
||||
case 'number':
|
||||
if ( !is_numeric( $values[ $i ] ) and !is_null( $values[ $i ] ) )
|
||||
if ( !\is_numeric( $values[ $i ] ) and !\is_null( $values[ $i ] ) )
|
||||
{
|
||||
throw new \InvalidArgumentException( "VALUE_{$i}_NOT_NUMBER" );
|
||||
}
|
||||
break;
|
||||
|
||||
case 'bool':
|
||||
if ( !is_bool( $values[ $i ] ) )
|
||||
if ( !\is_bool( $values[ $i ] ) )
|
||||
{
|
||||
throw new \InvalidArgumentException( "VALUE_{$i}_NOT_BOOL" );
|
||||
}
|
||||
@@ -146,11 +146,11 @@ class _Chart
|
||||
{
|
||||
if ( !\IPS\Request::i()->isAjax() )
|
||||
{
|
||||
\IPS\Output::i()->jsFiles[] = 'https://www.google.com/jsapi';
|
||||
\IPS\Output::i()->headJs .= "google.load('visualization', '1.0', {'packages':['corechart']}); ";
|
||||
\IPS\Output::i()->jsFiles[] = 'https://www.gstatic.com/charts/loader.js';
|
||||
\IPS\Output::i()->headJs .= "google.charts.load( '47', { 'packages':['corechart'] } );";
|
||||
}
|
||||
|
||||
if ( !$this->numbersCanBeNegative and in_array( $type, array( 'LineChart', 'ColumnChart' ) ) and !isset( $options['vAxis']['viewWindow']['min'] ) )
|
||||
if ( !$this->numbersCanBeNegative and \in_array( $type, array( 'LineChart', 'ColumnChart' ) ) and !isset( $options['vAxis']['viewWindow']['min'] ) )
|
||||
{
|
||||
$options['vAxis']['viewWindow']['min'] = 0;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user