Version Description
/ 20.01.2020
Download this release
Release Info
Developer | supsystic.com |
Plugin | Data Tables Generator by Supsystic |
Version | 1.9.98 |
Comparing to | |
See all releases |
Code changes from version 1.9.97 to 1.9.98
- app/SupsysticTables.php +1 -1
- app/assets/js/dtgsnonce.js +0 -0
- index.php +1 -1
- readme.txt +9 -2
- src/SupsysticTables/Core/Module.php +5 -2
- src/SupsysticTables/Core/assets/js/lib/dataTables.customExtensions.js +4 -2
- src/SupsysticTables/Tables/Model/Tables.php +28 -10
- vendor/Rsc/ClassLoader.php +15 -5
- vendor/Rsc/Environment.php +1 -0
app/SupsysticTables.php
CHANGED
@@ -18,7 +18,7 @@ class SupsysticTables
|
|
18 |
|
19 |
$menuSlug = 'supsystic-tables';
|
20 |
$pluginPath = dirname(dirname(__FILE__));
|
21 |
-
$environment = new Rsc_Environment('st', '1.9.
|
22 |
|
23 |
/* Configure */
|
24 |
$environment->configure(
|
18 |
|
19 |
$menuSlug = 'supsystic-tables';
|
20 |
$pluginPath = dirname(dirname(__FILE__));
|
21 |
+
$environment = new Rsc_Environment('st', '1.9.98', $pluginPath);
|
22 |
|
23 |
/* Configure */
|
24 |
$environment->configure(
|
app/assets/js/dtgsnonce.js
ADDED
File without changes
|
index.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Data Tables Generator by Supsystic
|
5 |
* Plugin URI: http://supsystic.com
|
6 |
* Description: Create and manage beautiful data tables with custom design. No HTML knowledge is required
|
7 |
-
* Version: 1.9.
|
8 |
* Author: supsystic.com
|
9 |
* Author URI: http://supsystic.com
|
10 |
* Text Domain: supsystic_tables
|
4 |
* Plugin Name: Data Tables Generator by Supsystic
|
5 |
* Plugin URI: http://supsystic.com
|
6 |
* Description: Create and manage beautiful data tables with custom design. No HTML knowledge is required
|
7 |
+
* Version: 1.9.98
|
8 |
* Author: supsystic.com
|
9 |
* Author URI: http://supsystic.com
|
10 |
* Text Domain: supsystic_tables
|
readme.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
=== Data Tables Generator by Supsystic ===
|
2 |
Contributors: supsystic.com
|
3 |
Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
|
4 |
-
Tested up to: 5.
|
5 |
-
Stable tag: 1.9.
|
6 |
|
7 |
Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
|
8 |
|
@@ -214,6 +214,13 @@ It's perfect for product [Price List](http://woo.supsystic.com/price-list "Price
|
|
214 |
Create custom order forms which increase your conversion rate!
|
215 |
|
216 |
== Changelog ==
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
217 |
= 1.9.97 / 08.12.2020 =
|
218 |
* Add security fixes
|
219 |
|
1 |
=== Data Tables Generator by Supsystic ===
|
2 |
Contributors: supsystic.com
|
3 |
Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
|
4 |
+
Tested up to: 5.6
|
5 |
+
Stable tag: 1.9.98
|
6 |
|
7 |
Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
|
8 |
|
214 |
Create custom order forms which increase your conversion rate!
|
215 |
|
216 |
== Changelog ==
|
217 |
+
= 1.9.98 / 20.01.2020 =
|
218 |
+
* Add fix for DataTables Export/Import library
|
219 |
+
* Migrating to new export/impor library PHP Spreadsheets from PHP Excel
|
220 |
+
* Add fix for compatibility with 4.9.16 WP
|
221 |
+
* Add fix for external connection
|
222 |
+
* add compatibility fix for wp < 5 for dtgs_nonce
|
223 |
+
|
224 |
= 1.9.97 / 08.12.2020 =
|
225 |
* Add security fixes
|
226 |
|
src/SupsysticTables/Core/Module.php
CHANGED
@@ -110,15 +110,18 @@ class SupsysticTables_Core_Module extends SupsysticTables_Core_BaseModule
|
|
110 |
}
|
111 |
}
|
112 |
|
|
|
|
|
|
|
113 |
if ( is_admin() && ( (current_user_can('administrator') || $userCanEdit) || empty($settings['access_roles']) ) ) {
|
114 |
$nonce = wp_create_nonce('dtgs_nonce');
|
115 |
-
wp_register_script( 'dtgs_nonce', '' );
|
116 |
wp_enqueue_script( 'dtgs_nonce' );
|
117 |
wp_add_inline_script( 'dtgs_nonce', 'var DTGS_NONCE = "'.$nonce.'"' );
|
118 |
}
|
119 |
if ( !is_admin() ) {
|
120 |
$nonce = wp_create_nonce('dtgs_nonce_frontend');
|
121 |
-
wp_register_script( 'dtgs_nonce_frontend', '' );
|
122 |
wp_enqueue_script( 'dtgs_nonce_frontend' );
|
123 |
wp_add_inline_script( 'dtgs_nonce_frontend', 'var DTGS_NONCE_FRONTEND = "'.$nonce.'"' );
|
124 |
}
|
110 |
}
|
111 |
}
|
112 |
|
113 |
+
$environment = $this->getEnvironment();
|
114 |
+
$path = $environment->getConfig()->get('plugin_url').'/app/assets/js/dgtsnonce.js';
|
115 |
+
|
116 |
if ( is_admin() && ( (current_user_can('administrator') || $userCanEdit) || empty($settings['access_roles']) ) ) {
|
117 |
$nonce = wp_create_nonce('dtgs_nonce');
|
118 |
+
wp_register_script( 'dtgs_nonce', $path, array(), '0.01', true );
|
119 |
wp_enqueue_script( 'dtgs_nonce' );
|
120 |
wp_add_inline_script( 'dtgs_nonce', 'var DTGS_NONCE = "'.$nonce.'"' );
|
121 |
}
|
122 |
if ( !is_admin() ) {
|
123 |
$nonce = wp_create_nonce('dtgs_nonce_frontend');
|
124 |
+
wp_register_script( 'dtgs_nonce_frontend', $path, array(), '0.01', true );
|
125 |
wp_enqueue_script( 'dtgs_nonce_frontend' );
|
126 |
wp_add_inline_script( 'dtgs_nonce_frontend', 'var DTGS_NONCE_FRONTEND = "'.$nonce.'"' );
|
127 |
}
|
src/SupsysticTables/Core/assets/js/lib/dataTables.customExtensions.js
CHANGED
@@ -128,7 +128,9 @@
|
|
128 |
}
|
129 |
for(var c = firstCol + (firstRow == r ? 1 : 0); c <= lastCol; c++) {
|
130 |
var cell = rows[rowNums[r]].anCells[c];
|
131 |
-
cell.style.display
|
|
|
|
|
132 |
if(autoHiding[c] === 0) {
|
133 |
colspan--;
|
134 |
}
|
@@ -189,4 +191,4 @@
|
|
189 |
}
|
190 |
} );
|
191 |
|
192 |
-
}(window.jQuery, window.supsystic.Tables));
|
128 |
}
|
129 |
for(var c = firstCol + (firstRow == r ? 1 : 0); c <= lastCol; c++) {
|
130 |
var cell = rows[rowNums[r]].anCells[c];
|
131 |
+
if (typeof cell !== "undefined" && typeof cell.style !== "undefined" && typeof cell.style.display !== "undefined") {
|
132 |
+
cell.style.display = 'none';
|
133 |
+
}
|
134 |
if(autoHiding[c] === 0) {
|
135 |
colspan--;
|
136 |
}
|
191 |
}
|
192 |
} );
|
193 |
|
194 |
+
}(window.jQuery, window.supsystic.Tables));
|
src/SupsysticTables/Tables/Model/Tables.php
CHANGED
@@ -881,11 +881,16 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
881 |
|
882 |
$table->view_id = $table->id . '_' . mt_rand(1, 99999);
|
883 |
$table->columns = $this->getColumns($table->id);
|
884 |
-
|
|
|
|
|
|
|
885 |
|
886 |
// rev 41
|
887 |
if (property_exists($table, 'meta')) {
|
888 |
-
|
|
|
|
|
889 |
}
|
890 |
|
891 |
return $table;
|
@@ -899,10 +904,14 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
899 |
return $table;
|
900 |
}
|
901 |
if(!empty($table->history_settings)) {
|
902 |
-
$table->historySettings =
|
|
|
|
|
903 |
}
|
904 |
if(!empty($table->woo_settings)) {
|
905 |
-
$table->woo_settings =
|
|
|
|
|
906 |
}
|
907 |
|
908 |
return $table;
|
@@ -965,7 +974,13 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
965 |
->from($this->getTable('columns'))
|
966 |
->where('table_id', '=', (int)$id);
|
967 |
}
|
968 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
969 |
public function getSettings($id)
|
970 |
{
|
971 |
$query = $this->getQueryBuilder()
|
@@ -980,9 +995,10 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
980 |
}
|
981 |
if(!empty($result)) {
|
982 |
$result = $result[0]->settings;
|
983 |
-
$
|
|
|
|
|
984 |
}
|
985 |
-
|
986 |
return $result;
|
987 |
}
|
988 |
|
@@ -999,8 +1015,10 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
999 |
throw new RuntimeException($this->db->last_error);
|
1000 |
}
|
1001 |
if (!empty($result)) {
|
1002 |
-
|
1003 |
-
|
|
|
|
|
1004 |
}
|
1005 |
|
1006 |
return $result;
|
@@ -1168,4 +1186,4 @@ class SupsysticTables_Tables_Model_Tables extends SupsysticTables_Core_BaseModel
|
|
1168 |
return $rows;
|
1169 |
}
|
1170 |
|
1171 |
-
}
|
881 |
|
882 |
$table->view_id = $table->id . '_' . mt_rand(1, 99999);
|
883 |
$table->columns = $this->getColumns($table->id);
|
884 |
+
|
885 |
+
$table->settings = htmlspecialchars_decode($table->settings, ENT_QUOTES);
|
886 |
+
$table->settings = $this->fixIncorrectSerialize($table->settings);
|
887 |
+
$table->settings = unserialize($table->settings);
|
888 |
|
889 |
// rev 41
|
890 |
if (property_exists($table, 'meta')) {
|
891 |
+
$table->meta = htmlspecialchars_decode($table->meta, ENT_QUOTES);
|
892 |
+
$table->meta = $this->fixIncorrectSerialize($table->meta);
|
893 |
+
$table->meta = unserialize($table->meta);
|
894 |
}
|
895 |
|
896 |
return $table;
|
904 |
return $table;
|
905 |
}
|
906 |
if(!empty($table->history_settings)) {
|
907 |
+
$table->historySettings = htmlspecialchars_decode($table->history_settings);
|
908 |
+
$table->historySettings = $this->fixIncorrectSerialize($table->historySettings);
|
909 |
+
$table->historySettings = unserialize($table->historySettings);
|
910 |
}
|
911 |
if(!empty($table->woo_settings)) {
|
912 |
+
$table->woo_settings = htmlspecialchars_decode($table->woo_settings);
|
913 |
+
$table->woo_settings = $this->fixIncorrectSerialize($table->woo_settings);
|
914 |
+
$table->woo_settings = unserialize($table->woo_settings);
|
915 |
}
|
916 |
|
917 |
return $table;
|
974 |
->from($this->getTable('columns'))
|
975 |
->where('table_id', '=', (int)$id);
|
976 |
}
|
977 |
+
public function fixIncorrectSerialize($string) {
|
978 |
+
// at first, check if "fixing" is really needed at all. After that, security checkup.
|
979 |
+
if ( @!unserialize($string) && preg_match('/^[aOs]:/', $string) ) {
|
980 |
+
$string = preg_replace_callback( '/s\:(\d+)\:\"(.*?)\";/s', function($matches){return 's:'.strlen($matches[2]).':"'.$matches[2].'";'; }, $string );
|
981 |
+
}
|
982 |
+
return $string;
|
983 |
+
}
|
984 |
public function getSettings($id)
|
985 |
{
|
986 |
$query = $this->getQueryBuilder()
|
995 |
}
|
996 |
if(!empty($result)) {
|
997 |
$result = $result[0]->settings;
|
998 |
+
$resultWithSlashes = htmlspecialchars_decode($result, ENT_QUOTES);
|
999 |
+
$resultWithSlashes = $this->fixIncorrectSerialize($resultWithSlashes);
|
1000 |
+
$result = unserialize($resultWithSlashes);
|
1001 |
}
|
|
|
1002 |
return $result;
|
1003 |
}
|
1004 |
|
1015 |
throw new RuntimeException($this->db->last_error);
|
1016 |
}
|
1017 |
if (!empty($result)) {
|
1018 |
+
$result = $result[0]->meta;
|
1019 |
+
$resultWithSlashes = htmlspecialchars_decode($result, ENT_QUOTES);
|
1020 |
+
$resultWithSlashes = $this->fixIncorrectSerialize($resultWithSlashes);
|
1021 |
+
$result = unserialize($resultWithSlashes);
|
1022 |
}
|
1023 |
|
1024 |
return $result;
|
1186 |
return $rows;
|
1187 |
}
|
1188 |
|
1189 |
+
}
|
vendor/Rsc/ClassLoader.php
CHANGED
@@ -114,6 +114,16 @@ class Rsc_ClassLoader
|
|
114 |
*/
|
115 |
public function load($class)
|
116 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
if ($file = $this->find($class)) {
|
118 |
require_once $file;
|
119 |
}
|
@@ -149,12 +159,11 @@ class Rsc_ClassLoader
|
|
149 |
if ($class == 'SupsysticSliderPro_Slider_Twig_SupTwg_Video') {
|
150 |
$path = DIRECTORY_SEPARATOR.'SupsysticSliderPro'.DIRECTORY_SEPARATOR.'Slider'.DIRECTORY_SEPARATOR.'Twig'.DIRECTORY_SEPARATOR.'Video.php';
|
151 |
}
|
|
|
|
|
|
|
152 |
|
153 |
-
|
154 |
-
$path .= str_replace('_', DIRECTORY_SEPARATOR, $name) . '.php';
|
155 |
-
}
|
156 |
-
|
157 |
-
foreach ($this->prefixes as $prefix => $dirs) {
|
158 |
if ($class === strstr($class, $prefix)) {
|
159 |
foreach ($dirs as $dir) {
|
160 |
if (file_exists($dir . DIRECTORY_SEPARATOR . $path)) {
|
@@ -163,5 +172,6 @@ class Rsc_ClassLoader
|
|
163 |
}
|
164 |
}
|
165 |
}
|
|
|
166 |
}
|
167 |
}
|
114 |
*/
|
115 |
public function load($class)
|
116 |
{
|
117 |
+
$a = 0;
|
118 |
+
switch (true) {
|
119 |
+
case stristr($class,'PhpSpreadsheet'):
|
120 |
+
case stristr($class,'SimpleCache'):
|
121 |
+
case stristr($class,'ZipStream'):
|
122 |
+
case stristr($class,'Enum'):
|
123 |
+
$a = 1;
|
124 |
+
return false;
|
125 |
+
break;
|
126 |
+
}
|
127 |
if ($file = $this->find($class)) {
|
128 |
require_once $file;
|
129 |
}
|
159 |
if ($class == 'SupsysticSliderPro_Slider_Twig_SupTwg_Video') {
|
160 |
$path = DIRECTORY_SEPARATOR.'SupsysticSliderPro'.DIRECTORY_SEPARATOR.'Slider'.DIRECTORY_SEPARATOR.'Twig'.DIRECTORY_SEPARATOR.'Video.php';
|
161 |
}
|
162 |
+
} else {
|
163 |
+
$path .= str_replace('_', DIRECTORY_SEPARATOR, $name) . '.php';
|
164 |
+
}
|
165 |
|
166 |
+
foreach ($this->prefixes as $prefix => $dirs) {
|
|
|
|
|
|
|
|
|
167 |
if ($class === strstr($class, $prefix)) {
|
168 |
foreach ($dirs as $dir) {
|
169 |
if (file_exists($dir . DIRECTORY_SEPARATOR . $path)) {
|
172 |
}
|
173 |
}
|
174 |
}
|
175 |
+
|
176 |
}
|
177 |
}
|
vendor/Rsc/Environment.php
CHANGED
@@ -147,6 +147,7 @@ class Rsc_Environment
|
|
147 |
{
|
148 |
$this->loader->add('BarsMaster', dirname(dirname(__FILE__)));
|
149 |
$this->loader->add('Twig', dirname(dirname(__FILE__)));
|
|
|
150 |
|
151 |
if ($this->config->has('plugin_prefix') && $this->config->has('plugin_source')) {
|
152 |
$prefix = $this->config->get('plugin_prefix');
|
147 |
{
|
148 |
$this->loader->add('BarsMaster', dirname(dirname(__FILE__)));
|
149 |
$this->loader->add('Twig', dirname(dirname(__FILE__)));
|
150 |
+
$this->loader->add('PHPOffice', dirname(dirname(__FILE__)));
|
151 |
|
152 |
if ($this->config->has('plugin_prefix') && $this->config->has('plugin_source')) {
|
153 |
$prefix = $this->config->get('plugin_prefix');
|