Data Tables Generator by Supsystic - Version 1.10.19

Version Description

Download this release

Release Info

Developer supsystic.com
Plugin Icon 128x128 Data Tables Generator by Supsystic
Version 1.10.19
Comparing to
See all releases

Code changes from version 1.10.18 to 1.10.19

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.10.18', $pluginPath);
22
 
23
  /* Configure */
24
  $environment->configure(
@@ -30,7 +30,7 @@ class SupsysticTables
30
  'lang_path' => plugin_basename(dirname(__FILE__)) . '/langs',
31
  'plugin_prefix' => 'SupsysticTables',
32
  'plugin_source' => $pluginPath . '/src',
33
- 'plugin_title_name' => 'Data Tables',
34
  'plugin_menu' => array(
35
  'page_title' => __('Tables by Supsystic', $menuSlug),
36
  'menu_title' => __('Tables by Supsystic', $menuSlug),
@@ -42,17 +42,17 @@ class SupsysticTables
42
  'shortcode_prefix' => $menuSlug,
43
  'shortcode_name' => defined('SUPSYSTIC_TABLES_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_SHORTCODE_NAME : $menuSlug,
44
  'shortcode_part_name' => defined('SUPSYSTIC_TABLES_PART_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_PART_SHORTCODE_NAME : $menuSlug . '-part',
45
- 'shortcode_cell_name' => defined('SUPSYSTIC_TABLES_CELL_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_CELL_SHORTCODE_NAME : $menuSlug . '-cell-full',
46
- 'shortcode_value_name' => defined('SUPSYSTIC_TABLES_VALUE_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_VALUE_SHORTCODE_NAME : $menuSlug . '-cell',
47
  'db_prefix' => 'supsystic_tbl_',
48
  'hooks_prefix' => 'supsystic_tbl_',
49
- 'ajax_url' => admin_url('admin-ajax.php'),
50
  'admin_url' => admin_url(),
51
  'plugin_db_update' => true,
52
  'revision_key' => '_supsystic_tables_rev',
53
  'revision' => 61,
54
- 'welcome_page_was_showed' => get_option('supsystic_tbl_welcome_page_was_showed'),
55
- 'promo_controller' => 'SupsysticTables_Promo_Controller'
56
  )
57
  );
58
 
@@ -70,6 +70,160 @@ class SupsysticTables
70
  return $this->environment;
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  protected function getPluginEnvironment()
74
  {
75
  $environment = Rsc_Environment::ENV_PRODUCTION;
18
 
19
  $menuSlug = 'supsystic-tables';
20
  $pluginPath = dirname(dirname(__FILE__));
21
+ $environment = new Rsc_Environment('st', '1.10.19', $pluginPath);
22
 
23
  /* Configure */
24
  $environment->configure(
30
  'lang_path' => plugin_basename(dirname(__FILE__)) . '/langs',
31
  'plugin_prefix' => 'SupsysticTables',
32
  'plugin_source' => $pluginPath . '/src',
33
+ 'plugin_title_name' => 'Data Tables',
34
  'plugin_menu' => array(
35
  'page_title' => __('Tables by Supsystic', $menuSlug),
36
  'menu_title' => __('Tables by Supsystic', $menuSlug),
42
  'shortcode_prefix' => $menuSlug,
43
  'shortcode_name' => defined('SUPSYSTIC_TABLES_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_SHORTCODE_NAME : $menuSlug,
44
  'shortcode_part_name' => defined('SUPSYSTIC_TABLES_PART_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_PART_SHORTCODE_NAME : $menuSlug . '-part',
45
+ 'shortcode_cell_name' => defined('SUPSYSTIC_TABLES_CELL_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_CELL_SHORTCODE_NAME : $menuSlug . '-cell-full',
46
+ 'shortcode_value_name' => defined('SUPSYSTIC_TABLES_VALUE_SHORTCODE_NAME') ? SUPSYSTIC_TABLES_VALUE_SHORTCODE_NAME : $menuSlug . '-cell',
47
  'db_prefix' => 'supsystic_tbl_',
48
  'hooks_prefix' => 'supsystic_tbl_',
49
+ 'ajax_url' => admin_url('admin-ajax.php'),
50
  'admin_url' => admin_url(),
51
  'plugin_db_update' => true,
52
  'revision_key' => '_supsystic_tables_rev',
53
  'revision' => 61,
54
+ 'welcome_page_was_showed' => get_option('supsystic_tbl_welcome_page_was_showed'),
55
+ 'promo_controller' => 'SupsysticTables_Promo_Controller'
56
  )
57
  );
58
 
70
  return $this->environment;
71
  }
72
 
73
+ public function db_table_exist($table) {
74
+ global $wpdb;
75
+ switch ($table) {
76
+ case 'supsystic_tbl_tables':
77
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_tbl_tables'");
78
+ break;
79
+ case 'supsystic_tbl_columns':
80
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_tbl_columns'");
81
+ break;
82
+ case 'supsystic_tbl_conditions':
83
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_tbl_conditions'");
84
+ break;
85
+ case 'supsystic_tbl_rows':
86
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_tbl_rows'");
87
+ break;
88
+ case 'supsystic_tbl_diagrams':
89
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_tbl_diagrams'");
90
+ break;
91
+ case 'supsystic_rows_history':
92
+ $res = $wpdb->get_var("SHOW TABLES LIKE '{$wpdb->prefix}supsystic_rows_history'");
93
+ break;
94
+ }
95
+ return !empty($res);
96
+ }
97
+
98
+ public function createSchema()
99
+ {
100
+ global $wpdb;
101
+ if(get_option('stbl'.'_installed')) return;
102
+
103
+ if (!function_exists('dbDelta')) {
104
+ require_once(ABSPATH.'wp-admin/includes/upgrade.php');
105
+ }
106
+
107
+ $wpdb->show_errors = false;
108
+
109
+ $wpdb->query('SET FOREIGN_KEY_CHECKS=0;');
110
+
111
+ if (!$this->db_table_exist('supsystic_tbl_tables')) {
112
+ $charset_collate = $wpdb->get_charset_collate();
113
+ $table_name = $wpdb->prefix . 'supsystic_tbl_tables';
114
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
115
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
116
+ `title` VARCHAR(255) NOT NULL,
117
+ `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
118
+ `settings` TEXT NOT NULL,
119
+ `history_settings` TEXT NULL DEFAULT NULL,
120
+ `meta` TEXT NULL,
121
+ PRIMARY KEY (`id`)
122
+ ) $charset_collate";
123
+ dbDelta( $sql );
124
+ }
125
+
126
+ if (!$this->db_table_exist('supsystic_tbl_columns')) {
127
+ $charset_collate = $wpdb->get_charset_collate();
128
+ $table_name = $wpdb->prefix . 'supsystic_tbl_columns';
129
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
130
+ `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
131
+ `table_id` INT(10) UNSIGNED NULL DEFAULT NULL,
132
+ `index` INT(10) UNSIGNED NOT NULL,
133
+ `title` VARCHAR(255) NOT NULL,
134
+ PRIMARY KEY (`id`)
135
+ ) $charset_collate";
136
+ dbDelta( $sql );
137
+ }
138
+
139
+ if (!$this->db_table_exist('supsystic_tbl_rows_history')) {
140
+ $charset_collate = $wpdb->get_charset_collate();
141
+ $table_name = $wpdb->prefix . 'supsystic_tbl_rows_history';
142
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
143
+ `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
144
+ `user_id` INT(11) UNSIGNED NOT NULL,
145
+ `table_id` INT(11) UNSIGNED NOT NULL,
146
+ `data` MEDIUMTEXT NOT NULL,
147
+ `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
148
+ `updated` TIMESTAMP NULL DEFAULT NULL,
149
+ PRIMARY KEY (`id`)
150
+ ) $charset_collate";
151
+ dbDelta( $sql );
152
+ }
153
+
154
+ if (!$this->db_table_exist('supsystic_tbl_rows')) {
155
+ $charset_collate = $wpdb->get_charset_collate();
156
+ $table_name = $wpdb->prefix . 'supsystic_tbl_rows';
157
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
158
+ `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
159
+ `table_id` INT(10) UNSIGNED NULL DEFAULT NULL,
160
+ `data` TEXT NOT NULL,
161
+ PRIMARY KEY (`id`)
162
+ ) $charset_collate";
163
+ dbDelta( $sql );
164
+ }
165
+
166
+ if (!$this->db_table_exist('supsystic_tbl_conditions')) {
167
+ $charset_collate = $wpdb->get_charset_collate();
168
+ $table_name = $wpdb->prefix . 'supsystic_tbl_conditions';
169
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
170
+ `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
171
+ `table_id` INT(10) UNSIGNED NULL DEFAULT NULL,
172
+ `data` TEXT NOT NULL,
173
+ PRIMARY KEY (`id`)
174
+ ) $charset_collate";
175
+ dbDelta( $sql );
176
+ }
177
+
178
+ if (!$this->db_table_exist('supsystic_tbl_diagrams')) {
179
+ $charset_collate = $wpdb->get_charset_collate();
180
+ $table_name = $wpdb->prefix . 'supsystic_tbl_diagrams';
181
+ $sql = "CREATE TABLE IF NOT EXISTS $table_name (
182
+ `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
183
+ `table_id` INT(10) UNSIGNED NULL DEFAULT NULL,
184
+ `start_row` INT(10) UNSIGNED NULL DEFAULT NULL,
185
+ `start_col` INT(10) UNSIGNED NULL DEFAULT NULL,
186
+ `end_row` INT(10) UNSIGNED NULL DEFAULT NULL,
187
+ `end_col` INT(10) UNSIGNED NULL DEFAULT NULL,
188
+ `data` MEDIUMTEXT NULL DEFAULT NULL,
189
+ PRIMARY KEY (`id`)
190
+ ) $charset_collate";
191
+ dbDelta( $sql );
192
+ }
193
+
194
+ $wpdb->query('SET FOREIGN_KEY_CHECKS=1;');
195
+
196
+ $wpdb->show_errors = true;
197
+ update_option('stbl'.'_installed', 1);
198
+
199
+ }
200
+
201
+ public function dropOptions()
202
+ {
203
+ delete_option('stbl'.'_installed');
204
+ }
205
+ public function deactivate($bootstrap)
206
+ {
207
+ register_deactivation_hook($bootstrap, array($this, 'dropOptions'));
208
+ }
209
+
210
+ public function activate($bootstrap)
211
+ {
212
+ //if is multisite mode
213
+ if (function_exists('is_multisite') && is_multisite()) {
214
+ global $wpdb;
215
+ $blog_id = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
216
+ foreach ($blog_id as $id) {
217
+ if (switch_to_blog($id)) {
218
+ $this->createSchema();
219
+ restore_current_blog();
220
+ }
221
+ }
222
+ } else {
223
+ $this->createSchema();
224
+ }
225
+ }
226
+
227
  protected function getPluginEnvironment()
228
  {
229
  $environment = Rsc_Environment::ENV_PRODUCTION;
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.10.18
8
  * Author: supsystic.com
9
  * Author URI: http://supsystic.com
10
  * Text Domain: supsystic_tables
@@ -38,6 +38,9 @@ if (!defined('DTGS_PLUGIN_ADMIN_URL')) {
38
  $supsysticTables = new SupsysticTables();
39
  $supsysticTables->run();
40
 
 
 
 
41
  if (!function_exists('supsystic_tables_get')) {
42
  function supsystic_tables_get($id)
43
  {
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.10.19
8
  * Author: supsystic.com
9
  * Author URI: http://supsystic.com
10
  * Text Domain: supsystic_tables
38
  $supsysticTables = new SupsysticTables();
39
  $supsysticTables->run();
40
 
41
+ $supsysticTables->activate(__FILE__);
42
+ $supsysticTables->deactivate(__FILE__);
43
+
44
  if (!function_exists('supsystic_tables_get')) {
45
  function supsystic_tables_get($id)
46
  {
readme.txt CHANGED
@@ -5,7 +5,7 @@ Plugin URI: https://supsystic.com/plugins/data-tables-generator-plugin/
5
  Donate link: https://supsystic.com/plugins/data-tables-generator-plugin/
6
  Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
7
  Tested up to: 6.0
8
- Stable tag: 1.10.18
9
 
10
  Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
11
 
@@ -217,8 +217,12 @@ It's perfect for product [Price List](http://woo.supsystic.com/price-list "Price
217
  Create custom order forms which increase your conversion rate!
218
 
219
  == Changelog ==
 
 
 
220
  1.10.18 /10.06.2022 =
221
  WP fixes
 
222
  1.10.17 /09.06.2022 =
223
 
224
  1.10.16 /07.06.2022 =
5
  Donate link: https://supsystic.com/plugins/data-tables-generator-plugin/
6
  Tags: data table, spreadsheet, table builder, charts, graphs, wordpress table plugin, excel, line chart, pie chart, visualise data
7
  Tested up to: 6.0
8
+ Stable tag: 1.10.19
9
 
10
  Create data tables with charts and graphs. Custom design, navigation, searching and ordering functions. Export to PDF, CSV, Print. Excel spreadsheet. WooCommerce Integration.
11
 
217
  Create custom order forms which increase your conversion rate!
218
 
219
  == Changelog ==
220
+ 1.10.19 /17.06.2022 =
221
+ * Fixes for Installation
222
+
223
  1.10.18 /10.06.2022 =
224
  WP fixes
225
+
226
  1.10.17 /09.06.2022 =
227
 
228
  1.10.16 /07.06.2022 =
src/SupsysticTables/Core/updates/rev-1.sql CHANGED
@@ -3,6 +3,7 @@ CREATE TABLE `%prefix%tables` (
3
  `title` VARCHAR(255) NOT NULL,
4
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
5
  `settings` TEXT NOT NULL,
 
6
  PRIMARY KEY (`id`)
7
  )
8
  DEFAULT CHARSET=utf8
@@ -27,3 +28,19 @@ CREATE TABLE `%prefix%rows` (
27
  DEFAULT CHARSET=utf8
28
  ;
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  `title` VARCHAR(255) NOT NULL,
4
  `created_at` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
5
  `settings` TEXT NOT NULL,
6
+ `meta` TEXT NULL AFTER `created_at`,
7
  PRIMARY KEY (`id`)
8
  )
9
  DEFAULT CHARSET=utf8
28
  DEFAULT CHARSET=utf8
29
  ;
30
 
31
+ CREATE TABLE `%prefix%diagrams` (
32
+ `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
33
+ `table_id` INT(10) UNSIGNED NULL DEFAULT NULL,
34
+ `start_row` INT(10) UNSIGNED NULL DEFAULT NULL,
35
+ `start_col` INT(10) UNSIGNED NULL DEFAULT NULL,
36
+ `end_row` INT(10) UNSIGNED NULL DEFAULT NULL,
37
+ `end_col` INT(10) UNSIGNED NULL DEFAULT NULL,
38
+ `data` MEDIUMTEXT NULL DEFAULT NULL,
39
+ PRIMARY KEY (`id`)
40
+ )
41
+ DEFAULT CHARSET=utf8
42
+ ;
43
+
44
+
45
+ ALTER TABLE `%prefix%tables`
46
+ ADD COLUMN `meta` TEXT NULL AFTER `created_at`;
vendor/Rsc/Installer.php CHANGED
@@ -41,6 +41,9 @@ class Rsc_Installer
41
 
42
  protected function delta($query)
43
  {
 
 
 
44
  return dbDelta($query);
45
  }
46
  }
41
 
42
  protected function delta($query)
43
  {
44
+ if (!function_exists('dbDelta')) {
45
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
46
+ }
47
  return dbDelta($query);
48
  }
49
  }
vendor/Rsc/Mvc/Model.php CHANGED
@@ -26,6 +26,9 @@ class Rsc_Mvc_Model
26
  */
27
  public function delta($query)
28
  {
 
 
 
29
  return @dbDelta($query);
30
  }
31
 
26
  */
27
  public function delta($query)
28
  {
29
+ if (!function_exists('dbDelta')) {
30
+ require_once ABSPATH . 'wp-admin/includes/upgrade.php';
31
+ }
32
  return @dbDelta($query);
33
  }
34