WordPress Charts and Graphs Lite - Version 2.1.4

Version Description

  • Fixed issues with non-latin chars on CSV files to import.
Download this release

Release Info

Developer codeinwp
Plugin Icon WordPress Charts and Graphs Lite
Version 2.1.4
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.4

CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
 
 
 
 
 
2
  ### v2.1.3 - 2017-05-31
3
  **Changes:**
4
 
1
 
2
+ ### v2.1.4 - 2017-06-02
3
+ **Changes:**
4
+ - Added support for non Latin characters
5
+
6
  ### v2.1.3 - 2017-05-31
7
  **Changes:**
8
 
classes/Visualizer/Module/Chart.php CHANGED
@@ -379,7 +379,6 @@ class Visualizer_Module_Chart extends Visualizer_Module {
379
  * @access public
380
  */
381
  public function uploadData() {
382
- error_log( 'in uploadData ' . print_r( $_GET,true ) . print_r( $_POST,true ) );
383
  // validate nonce
384
  // do not use filter_input as it does not work for phpunit test cases, use filter_var instead
385
  if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'] ) ) {
379
  * @access public
380
  */
381
  public function uploadData() {
 
382
  // validate nonce
383
  // do not use filter_input as it does not work for phpunit test cases, use filter_var instead
384
  if ( ! isset( $_GET['nonce'] ) || ! wp_verify_nonce( $_GET['nonce'] ) ) {
classes/Visualizer/Plugin.php CHANGED
@@ -28,7 +28,7 @@
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
- const VERSION = '2.1.3';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
28
  class Visualizer_Plugin {
29
 
30
  const NAME = 'visualizer';
31
+ const VERSION = '2.1.4';
32
 
33
  // custom post types
34
  const CPT_VISUALIZER = 'visualizer';
classes/Visualizer/Render/Page/Data.php CHANGED
@@ -157,7 +157,7 @@ class Visualizer_Render_Page_Data extends Visualizer_Render_Page {
157
  </li>
158
  </ul>
159
  </li>
160
- <li class="group <?php echo apply_filters( 'visualizer_pro_upsell_class' ); ?> ">
161
  <h2 class="group-title sub-group"
162
  data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
163
  class="dashicons dashicons-lock"></span></h2>
157
  </li>
158
  </ul>
159
  </li>
160
+ <li class="group <?php echo apply_filters( 'visualizer_pro_upsell_class', '' ); ?> ">
161
  <h2 class="group-title sub-group"
162
  data-current="chart"><?php _e( 'Import from other chart', 'visualizer' ); ?><span
163
  class="dashicons dashicons-lock"></span></h2>
classes/Visualizer/Source/Csv.php CHANGED
@@ -62,6 +62,7 @@ class Visualizer_Source_Csv extends Visualizer_Source {
62
  private function _fetchSeries( &$handle ) {
63
  // read column titles
64
  $labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
 
65
  // read series types
66
  $types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
67
 
@@ -78,6 +79,7 @@ class Visualizer_Source_Csv extends Visualizer_Source {
78
 
79
  // re read the labels and empty types array
80
  $labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
 
81
  $types = array();
82
  }
83
 
@@ -105,7 +107,10 @@ class Visualizer_Source_Csv extends Visualizer_Source {
105
  // set line endings auto detect mode
106
  ini_set( 'auto_detect_line_endings', true );
107
  // open file and return handle
108
- return fopen( $filename ? $filename : $this->_filename, 'rb' );
 
 
 
109
  }
110
 
111
  /**
62
  private function _fetchSeries( &$handle ) {
63
  // read column titles
64
  $labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
65
+ $labels = array_map( 'utf8_encode', $labels );
66
  // read series types
67
  $types = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
68
 
79
 
80
  // re read the labels and empty types array
81
  $labels = fgetcsv( $handle, 0, VISUALIZER_CSV_DELIMITER, VISUALIZER_CSV_ENCLOSURE );
82
+ $labels = array_map( 'utf8_encode', $labels );
83
  $types = array();
84
  }
85
 
107
  // set line endings auto detect mode
108
  ini_set( 'auto_detect_line_endings', true );
109
  // open file and return handle
110
+ $fc = iconv( 'ISO-8859-1', 'utf-8', file_get_contents( $filename ? $filename : $this->_filename ) );
111
+ $tmp = tempnam( sys_get_temp_dir(), rand() );
112
+ file_put_contents( $tmp, $fc );
113
+ return fopen( $tmp, 'rb' );
114
  }
115
 
116
  /**
css/media.css CHANGED
@@ -1,5 +1,5 @@
1
  /*
2
- Version: 2.1.3
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
1
  /*
2
+ Version: 2.1.4
3
  */
4
  #visualizer-library-view {
5
  padding: 30px 10px 10px 30px;
index.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin Name: Visualizer: Charts and Graphs Lite
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
- Version: 2.1.3
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
4
  Plugin Name: Visualizer: Charts and Graphs Lite
5
  Plugin URI: https://themeisle.com/plugins/visualizer-charts-and-graphs-lite/
6
  Description: A simple, easy to use and quite powerful tool to create, manage and embed interactive charts into your WordPress posts and pages. The plugin uses Google Visualization API to render charts, which supports cross-browser compatibility (adopting VML for older IE versions) and cross-platform portability to iOS and new Android releases.
7
+ Version: 2.1.4
8
  Author: Themeisle
9
  Author URI: http://themeisle.com
10
  License: GPL v2.0 or later
languages/visualizer.pot CHANGED
@@ -2,9 +2,9 @@
2
  # This file is distributed under the GPL v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.2\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
- "POT-Creation-Date: 2017-05-31 11:52:41+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
@@ -102,7 +102,7 @@ msgid "Pro Addon"
102
  msgstr ""
103
 
104
  #: classes/Visualizer/Module/Chart.php:298
105
- #: classes/Visualizer/Module/Chart.php:580
106
  msgid "You have entered invalid URL. Please, insert proper URL."
107
  msgstr ""
108
 
@@ -118,11 +118,11 @@ msgstr ""
118
  msgid "Insert Chart"
119
  msgstr ""
120
 
121
- #: classes/Visualizer/Module/Chart.php:412
122
  msgid "CSV file with chart data was not uploaded. Please, try again."
123
  msgstr ""
124
 
125
- #: classes/Visualizer/Module/Chart.php:424
126
  msgid "CSV file is broken or invalid. Please, try again."
127
  msgstr ""
128
 
2
  # This file is distributed under the GPL v2.0 or later.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Visualizer: Charts and Graphs Lite 2.1.3\n"
6
  "Report-Msgid-Bugs-To: https://github.com/Codeinwp/visualizer/issues\n"
7
+ "POT-Creation-Date: 2017-06-01 12:45:19+00:00\n"
8
  "MIME-Version: 1.0\n"
9
  "Content-Type: text/plain; charset=utf-8\n"
10
  "Content-Transfer-Encoding: 8bit\n"
102
  msgstr ""
103
 
104
  #: classes/Visualizer/Module/Chart.php:298
105
+ #: classes/Visualizer/Module/Chart.php:579
106
  msgid "You have entered invalid URL. Please, insert proper URL."
107
  msgstr ""
108
 
118
  msgid "Insert Chart"
119
  msgstr ""
120
 
121
+ #: classes/Visualizer/Module/Chart.php:411
122
  msgid "CSV file with chart data was not uploaded. Please, try again."
123
  msgstr ""
124
 
125
+ #: classes/Visualizer/Module/Chart.php:423
126
  msgid "CSV file is broken or invalid. Please, try again."
127
  msgstr ""
128
 
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
4
  Requires at least: 3.5
5
- Tested up to: 4.7.4
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
@@ -119,6 +119,9 @@ http://docs.themeisle.com/article/610-how-can-i-edit-the-data-manually
119
 
120
  == Changelog ==
121
 
 
 
 
122
  = 2.1.2 =
123
  * Fixed priority issue with wp_enqueue_media
124
  * Added latest version of sdk
2
  Contributors: codeinwp,marius2012,marius_codeinwp,hardeepasrani,themeisle,Madalin_ThemeIsle
3
  Tags: chart, charts, charting, graph, graphs, graphing, visualisation, visualise data, visualization, visualize data, HTML5, canvas, pie chart, line chart, bar chart, column chart, gauge chart, area chart, scatter chart, candlestick chart, geo chart, google visualization api
4
  Requires at least: 3.5
5
+ Tested up to: 4.7.5
6
  Stable tag: trunk
7
  License: GPL v2.0 or later
8
  License URI: http://www.opensource.org/licenses/gpl-license.php
119
 
120
  == Changelog ==
121
 
122
+ = 2.1.4 =
123
+ * Fixed issues with non-latin chars on CSV files to import.
124
+
125
  = 2.1.2 =
126
  * Fixed priority issue with wp_enqueue_media
127
  * Added latest version of sdk
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2::getLoader();
4
 
5
  require_once __DIR__ . '/composer' . '/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInit988fb584789e6308f59e182125c939b9::getLoader();
vendor/autoload_52.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
- return ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf::getLoader();
4
 
5
  require_once dirname(__FILE__) . '/composer'.'/autoload_real_52.php';
6
 
7
+ return ComposerAutoloaderInite9c98f83eb6cc982385204c69223ca46::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2
6
  {
7
  private static $loader;
8
 
@@ -19,9 +19,9 @@ class ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInitbec056f534495ea3881eb15b5d92aca2', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit988fb584789e6308f59e182125c939b9
6
  {
7
  private static $loader;
8
 
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInit988fb584789e6308f59e182125c939b9', 'loadClassLoader'), true, true);
23
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInit988fb584789e6308f59e182125c939b9', 'loadClassLoader'));
25
 
26
  $map = require __DIR__ . '/autoload_namespaces.php';
27
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_real_52.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
- class ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
@@ -19,9 +19,9 @@ class ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf {
19
  return self::$loader;
20
  }
21
 
22
- spl_autoload_register(array('ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
- spl_autoload_unregister(array('ComposerAutoloaderInit0d6c54331297f95ffc15f68fc72e2baf', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);
2
 
3
  // autoload_real_52.php generated by xrstf/composer-php52
4
 
5
+ class ComposerAutoloaderInite9c98f83eb6cc982385204c69223ca46 {
6
  private static $loader;
7
 
8
  public static function loadClassLoader($class) {
19
  return self::$loader;
20
  }
21
 
22
+ spl_autoload_register(array('ComposerAutoloaderInite9c98f83eb6cc982385204c69223ca46', 'loadClassLoader'), true /*, true */);
23
  self::$loader = $loader = new xrstf_Composer52_ClassLoader();
24
+ spl_autoload_unregister(array('ComposerAutoloaderInite9c98f83eb6cc982385204c69223ca46', 'loadClassLoader'));
25
 
26
  $vendorDir = dirname(dirname(__FILE__));
27
  $baseDir = dirname($vendorDir);