Data Tables Generator by Supsystic - Version 1.10.12

Version Description

Download this release

Release Info

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

Code changes from version 1.10.11 to 1.10.12

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.11', $pluginPath);
22
 
23
  /* Configure */
24
  $environment->configure(
18
 
19
  $menuSlug = 'supsystic-tables';
20
  $pluginPath = dirname(dirname(__FILE__));
21
+ $environment = new Rsc_Environment('st', '1.10.12', $pluginPath);
22
 
23
  /* Configure */
24
  $environment->configure(
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.11
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.10.12
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.7
5
- Stable tag: 1.10.11
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,9 @@ 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.10.11 / 24.05.2021 =
218
  * Add support PHP 8
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.8
5
+ Stable tag: 1.10.12
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.10.12 / 21.09.2021 =
218
+ * Fixes for Contact Form Integration
219
+
220
  1.10.11 / 24.05.2021 =
221
  * Add support PHP 8
222
 
src/SupsysticTables/ContactForm/Module.php CHANGED
@@ -38,16 +38,20 @@ class SupsysticTables_ContactForm_Module extends SupsysticTables_Core_BaseModule
38
  */
39
  public function call($method, $arguments = null)
40
  {
41
- if (!method_exists($this->getInstance(), $method)) {
42
- throw new BadMethodCallException(
43
- sprintf(
44
- $this->getEnvironment()->translate(
45
- 'Call to undefined method %1$s for %2$s.'
46
- ),
47
- $method,
48
- $this->frameClass
49
- )
50
- );
 
 
 
 
51
  }
52
 
53
  return call_user_func_array(
@@ -81,7 +85,11 @@ class SupsysticTables_ContactForm_Module extends SupsysticTables_Core_BaseModule
81
  */
82
  public function getModel()
83
  {
84
- return $this->getModule()->getModel();
 
 
 
 
85
  }
86
 
87
  /**
@@ -106,11 +114,13 @@ class SupsysticTables_ContactForm_Module extends SupsysticTables_Core_BaseModule
106
  protected function getInstance()
107
  {
108
  if (!$this->isInstalled()) {
109
- throw new RuntimeException(
110
- 'Failed to get Contact Forms by Supsystic instance. Plugin not activated.'
111
- );
 
 
112
  }
113
 
114
  return call_user_func_array(array($this->frameClass, '_'), array());
115
  }
116
- }
38
  */
39
  public function call($method, $arguments = null)
40
  {
41
+ if ($this->isInstalled()) {
42
+ if (!method_exists($this->getInstance(), $method)) {
43
+ throw new BadMethodCallException(
44
+ sprintf(
45
+ $this->getEnvironment()->translate(
46
+ 'Call to undefined method %1$s for %2$s.'
47
+ ),
48
+ $method,
49
+ $this->frameClass
50
+ )
51
+ );
52
+ }
53
+ } else {
54
+ return false;
55
  }
56
 
57
  return call_user_func_array(
85
  */
86
  public function getModel()
87
  {
88
+ if ($this->isInstalled()) {
89
+ return $this->getModule()->getModel();
90
+ } else {
91
+ return false;
92
+ }
93
  }
94
 
95
  /**
114
  protected function getInstance()
115
  {
116
  if (!$this->isInstalled()) {
117
+ error_log('Failed to get Contact Forms by Supsystic instance. Plugin not activated.');
118
+ return false;
119
+ // throw new RuntimeException(
120
+ // 'Failed to get Contact Forms by Supsystic instance. Plugin not activated.'
121
+ // );
122
  }
123
 
124
  return call_user_func_array(array($this->frameClass, '_'), array());
125
  }
126
+ }
src/SupsysticTables/Tables/Controller.php CHANGED
@@ -125,8 +125,8 @@ class SupsysticTables_Tables_Controller extends SupsysticTables_Core_BaseControl
125
 
126
  $settings = get_option($this->getConfig()->get('db_prefix') . 'settings');
127
  $contactForm = $this->getEnvironment()->getModule('contactForm');
128
- $contactFormIsInstalled = $contactForm->isInstalled();
129
-
130
  return $this->response(
131
  '@tables/view.twig',
132
  array(
@@ -140,10 +140,9 @@ class SupsysticTables_Tables_Controller extends SupsysticTables_Core_BaseControl
140
  'settings' => $settings,
141
  'contact_form' => array(
142
  'install_link' => admin_url('plugin-install.php?s=contact+form+by+supsystic&tab=search&type=term'),
143
- 'create_link' => $contactFormIsInstalled ? $contactForm->findModule('options')->getTabUrl('forms_add_new') : '',
144
  'is_installed' => $contactFormIsInstalled,
145
- 'forms_list' => $contactFormIsInstalled && method_exists($contactForm->getModel(), 'getAllForms')
146
- ? $contactForm->getModel()->getAllForms() : array(),
147
  'pages_list' => $contactFormIsInstalled ? $this->getPagesListForSelect() : array(),
148
  ),
149
  )
@@ -154,9 +153,7 @@ class SupsysticTables_Tables_Controller extends SupsysticTables_Core_BaseControl
154
  global $wpdb;
155
  // We are not using wp methods here - as list can be very large - and it can take too much memory
156
  $allPagesForSelect = array();
157
- $postTypesForPostsList = array('page', 'post', 'product', 'blog', 'grp_pages', 'documentation');
158
- $postTypesForPostsList = implode(',', $postTypesForPostsList);
159
- $allPages = $wpdb->get_results( $wpdb->prepare( "SELECT ID, post_title FROM $wpdb->posts WHERE post_type IN (%s) AND post_status IN ('publish','draft') ORDER BY post_title", $postTypesForPostsList ), ARRAY_A );
160
  $allPagesForSelect[home_url()] = $this->getEnvironment()->translate('Main Home Page');
161
  if(!empty($allPages)) {
162
  foreach($allPages as $p) {
125
 
126
  $settings = get_option($this->getConfig()->get('db_prefix') . 'settings');
127
  $contactForm = $this->getEnvironment()->getModule('contactForm');
128
+ $contactFormIsInstalled = ($contactForm->isInstalled()) ? true : false;
129
+ $contactFormList = $contactFormIsInstalled && method_exists($contactForm->getModel(), 'getAllForms') ? $contactForm->getModel()->getAllForms() : array();
130
  return $this->response(
131
  '@tables/view.twig',
132
  array(
140
  'settings' => $settings,
141
  'contact_form' => array(
142
  'install_link' => admin_url('plugin-install.php?s=contact+form+by+supsystic&tab=search&type=term'),
143
+ 'create_link' => ($contactFormIsInstalled) ? $contactForm->findModule('options')->getTabUrl('forms_add_new') : '',
144
  'is_installed' => $contactFormIsInstalled,
145
+ 'forms_list' => $contactFormList,
 
146
  'pages_list' => $contactFormIsInstalled ? $this->getPagesListForSelect() : array(),
147
  ),
148
  )
153
  global $wpdb;
154
  // We are not using wp methods here - as list can be very large - and it can take too much memory
155
  $allPagesForSelect = array();
156
+ $allPages = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type IN ('page', 'post') AND post_status IN ('publish','draft') ORDER BY post_title ", ARRAY_A);
 
 
157
  $allPagesForSelect[home_url()] = $this->getEnvironment()->translate('Main Home Page');
158
  if(!empty($allPages)) {
159
  foreach($allPages as $p) {
src/SupsysticTables/Tables/views/view.twig CHANGED
@@ -2386,7 +2386,7 @@ for example:
2386
  </div>
2387
 
2388
  <div id="addContactFormBtnDialog" class="supsystic-plugin" style="display: none;" title="Contact Form by Supsystic Button">
2389
- {% if contact_form.is_installed != true %}
2390
  <p>{{ environment.translate('You need to install <a href="%s" target="_blank" rel="noopener noreferrer">Contact Form by Supsystic</a> to use this feature.') | format(contact_form.install_link) | raw }}</p>
2391
  {% else %}
2392
  {% if contact_form.forms_list | length %}
2386
  </div>
2387
 
2388
  <div id="addContactFormBtnDialog" class="supsystic-plugin" style="display: none;" title="Contact Form by Supsystic Button">
2389
+ {% if contact_form.is_installed != 'true' %}
2390
  <p>{{ environment.translate('You need to install <a href="%s" target="_blank" rel="noopener noreferrer">Contact Form by Supsystic</a> to use this feature.') | format(contact_form.install_link) | raw }}</p>
2391
  {% else %}
2392
  {% if contact_form.forms_list | length %}