InfiniteWP Client - Version 1.9.9

Version Description

  • Aug 9th 2022 =
  • Fix: Wordfence recent update changed the table prefix from the camel case, which caused the Client report to be unable to fetch Wordfence data.
  • Fix: PHP 8.0 fatal error in backup if the site has the smart-slider plugin installed.
  • Fix: WP Fastest Cache : Unable to perform WP Fastest cache error fixed.
  • Fix: PHP 8.0 fatal and warning.
Download this release

Release Info

Developer infinitewp
Plugin Icon 128x128 InfiniteWP Client
Version 1.9.9
Comparing to
See all releases

Code changes from version 1.9.8 to 1.9.9

addons/wordfence/wordfence.class.php CHANGED
@@ -53,52 +53,60 @@ class IWP_WORDFENCE extends IWP_MMB_Core
53
  function getGivenLogHistory($type, $from = false, $to = false){
54
  global $wpdb;
55
  $query = '';
 
 
 
 
 
 
 
 
56
  switch ($type) {
57
  case 'humans':
58
  $query = "SELECT count('id')
59
- FROM ".$wpdb->base_prefix."wfhits
60
  WHERE jsRun = 1 AND ctime >= '$from' AND ctime <= '$to'";
61
  break;
62
 
63
  case 'registered_users':
64
  $query = "SELECT count('id')
65
- FROM ".$wpdb->base_prefix."wfhits
66
  WHERE userID > 0 AND ctime >= '$from' AND ctime <= '$to'";
67
  break;
68
  case 'crawlers':
69
  $query = "SELECT count('id')
70
- FROM ".$wpdb->base_prefix."wfhits
71
  WHERE jsRun = 0 AND ctime >= '$from' AND ctime <= '$to'";
72
  break;
73
 
74
  case 'google_crawlers':
75
  $query = "SELECT count('id')
76
- FROM ".$wpdb->base_prefix."wfhits
77
  WHERE isGoogle = 1 AND ctime >= '$from' AND ctime <= '$to'";
78
  break;
79
  case 'four_oh_four':
80
  $query = "SELECT count('id')
81
- FROM ".$wpdb->base_prefix."wfhits
82
  WHERE statusCode = '404' AND ctime >= '$from' AND ctime <= '$to'";
83
  break;
84
  case 'logins_logouts':
85
  $query = "SELECT count('id')
86
- FROM ".$wpdb->base_prefix."wflogins
87
  WHERE ctime >= '$from' AND ctime <= '$to'";
88
  break;
89
  case 'locked_out':
90
  $query = "SELECT count('IP')
91
- FROM ".$wpdb->base_prefix."wfblocks7
92
  WHERE blockedTime >= '$from' AND `blockedTime` <= '$to'";
93
  break;
94
  case 'blocked':
95
  $query = "SELECT count('id')
96
- FROM ".$wpdb->base_prefix."wfhits
97
  WHERE action = 'blocked:wordfence' AND ctime >= '$from' AND ctime <= '$to'";
98
  break;
99
  case 'blocked_firewall':
100
  $query = "SELECT count('id')
101
- FROM ".$wpdb->base_prefix."wfhits
102
  WHERE action = 'blocked:waf' AND ctime >= '$from' AND ctime <= '$to'";
103
  break;
104
 
@@ -144,5 +152,14 @@ class IWP_WORDFENCE extends IWP_MMB_Core
144
 
145
 
146
  }
 
 
 
 
 
 
 
 
 
147
 
148
  }
53
  function getGivenLogHistory($type, $from = false, $to = false){
54
  global $wpdb;
55
  $query = '';
56
+ if($type == 'logins_logouts'){
57
+ $tableName = $this->checkWordFenceCaseOption('wfLogins');
58
+ }elseif($type == 'locked_out'){
59
+ $tableName = $this->checkWordFenceCaseOption('wfBlocks7');
60
+ }else{
61
+ $tableName = $this->checkWordFenceCaseOption('wfHits');
62
+ }
63
+ $table_name = $wpdb->base_prefix.$tableName;
64
  switch ($type) {
65
  case 'humans':
66
  $query = "SELECT count('id')
67
+ FROM $table_name
68
  WHERE jsRun = 1 AND ctime >= '$from' AND ctime <= '$to'";
69
  break;
70
 
71
  case 'registered_users':
72
  $query = "SELECT count('id')
73
+ FROM $table_name
74
  WHERE userID > 0 AND ctime >= '$from' AND ctime <= '$to'";
75
  break;
76
  case 'crawlers':
77
  $query = "SELECT count('id')
78
+ FROM $table_name
79
  WHERE jsRun = 0 AND ctime >= '$from' AND ctime <= '$to'";
80
  break;
81
 
82
  case 'google_crawlers':
83
  $query = "SELECT count('id')
84
+ FROM $table_name
85
  WHERE isGoogle = 1 AND ctime >= '$from' AND ctime <= '$to'";
86
  break;
87
  case 'four_oh_four':
88
  $query = "SELECT count('id')
89
+ FROM $table_name
90
  WHERE statusCode = '404' AND ctime >= '$from' AND ctime <= '$to'";
91
  break;
92
  case 'logins_logouts':
93
  $query = "SELECT count('id')
94
+ FROM $table_name
95
  WHERE ctime >= '$from' AND ctime <= '$to'";
96
  break;
97
  case 'locked_out':
98
  $query = "SELECT count('IP')
99
+ FROM $table_name
100
  WHERE blockedTime >= '$from' AND `blockedTime` <= '$to'";
101
  break;
102
  case 'blocked':
103
  $query = "SELECT count('id')
104
+ FROM $table_name
105
  WHERE action = 'blocked:wordfence' AND ctime >= '$from' AND ctime <= '$to'";
106
  break;
107
  case 'blocked_firewall':
108
  $query = "SELECT count('id')
109
+ FROM $table_name
110
  WHERE action = 'blocked:waf' AND ctime >= '$from' AND ctime <= '$to'";
111
  break;
112
 
152
 
153
 
154
  }
155
+
156
+ function checkWordFenceCaseOption($table){
157
+ // $table value on camel case format, so no need for else case
158
+ $wf_table_case_option = get_option('wordfence_case'); //false is camel case, true is lower
159
+ if($wf_table_case_option){
160
+ $table = strtolower($table);
161
+ }
162
+ return $table;
163
+ }
164
 
165
  }
addons/wp_optimize/purge-plugins-cache-class.php CHANGED
@@ -202,11 +202,8 @@ class IWP_MMB_PURGE_CACHE extends IWP_MMB_Core
202
  if($this->checkWPFCPlugin()) {
203
  $wpfc = new IWP_MMB_WPFC_CACHE();
204
  $wpfc->deleteMinifiedCache();
205
- $response = $wpfc->_getSystemMessage();
206
- if ($response[1] == 'error') {
207
- return array('error' => $response[0], 'error_code' => 'wpfc_plugin_delete_cache');
208
- }elseif($response[1] == 'success'){
209
- return array('success' => $response[0]);
210
  }else{
211
  return array('error' => 'Unable to perform WP Fastest cache', 'error_code' => 'wpfc_plugin_delete_cache');
212
  }
@@ -313,6 +310,10 @@ class IWP_MMB_PURGE_CACHE extends IWP_MMB_Core
313
  if(class_exists('WpFastestCache')){
314
  class IWP_MMB_WPFC_CACHE extends WpFastestCache{
315
 
 
 
 
 
316
  public function deleteALLCache(){
317
  $this->deleteCacheToolbar();
318
  }
@@ -321,8 +322,8 @@ if(class_exists('WpFastestCache')){
321
  $this->deleteCssAndJsCacheToolbar();
322
  }
323
 
324
- public function _getSystemMessage(){
325
- return $this->getSystemMessage();
326
  }
327
  }
328
  }
202
  if($this->checkWPFCPlugin()) {
203
  $wpfc = new IWP_MMB_WPFC_CACHE();
204
  $wpfc->deleteMinifiedCache();
205
+ if( !empty($GLOBALS['iwp_wpfc_delete_cache']) && $GLOBALS['iwp_wpfc_delete_cache'] == true ){
206
+ return array('success' => 'All cache files have been deleted');
 
 
 
207
  }else{
208
  return array('error' => 'Unable to perform WP Fastest cache', 'error_code' => 'wpfc_plugin_delete_cache');
209
  }
310
  if(class_exists('WpFastestCache')){
311
  class IWP_MMB_WPFC_CACHE extends WpFastestCache{
312
 
313
+ public function __construct(){
314
+ add_action('wpfc_delete_cache', array($this, 'wpfc_delete_cache'));
315
+ }
316
+
317
  public function deleteALLCache(){
318
  $this->deleteCacheToolbar();
319
  }
322
  $this->deleteCssAndJsCacheToolbar();
323
  }
324
 
325
+ public function wpfc_delete_cache(){
326
+ $GLOBALS['iwp_wpfc_delete_cache'] = true;
327
  }
328
  }
329
  }
backup.class.multicall.php CHANGED
@@ -90,6 +90,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
90
 
91
  //require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.split.php';
92
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
 
93
  parent::__construct();
94
  $this->site_name = str_replace(array(
95
  "_",
@@ -1634,6 +1635,7 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1634
  }
1635
 
1636
  include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
 
1637
  $returnArr = array();
1638
  if((($nextCount != 0)||($category == 'fileZipAfterDBZip'))&&(empty($is_new_zip)))
1639
  {
@@ -4370,7 +4372,9 @@ function ftp_backup($historyID,$args = '')
4370
  iwp_mmb_auto_print("ftploop");
4371
  }
4372
  if ($ret != FTP_FINISHED) {
4373
- fclose($fp);
 
 
4374
  /* if($del_host_file)
4375
  {
4376
  @unlink($backup_file);
@@ -6611,6 +6615,9 @@ function ftp_backup($historyID,$args = '')
6611
  }
6612
 
6613
  function wpdb_reconnect(){
 
 
 
6614
  global $wpdb;
6615
  $old_wpdb = $wpdb;
6616
  //Reconnect to avoid timeout problem after ZIP files
90
 
91
  //require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.split.php';
92
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
93
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
94
  parent::__construct();
95
  $this->site_name = str_replace(array(
96
  "_",
1635
  }
1636
 
1637
  include_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
1638
+ include_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
1639
  $returnArr = array();
1640
  if((($nextCount != 0)||($category == 'fileZipAfterDBZip'))&&(empty($is_new_zip)))
1641
  {
4372
  iwp_mmb_auto_print("ftploop");
4373
  }
4374
  if ($ret != FTP_FINISHED) {
4375
+ if (is_resource($fp)) {
4376
+ fclose($fp);
4377
+ }
4378
  /* if($del_host_file)
4379
  {
4380
  @unlink($backup_file);
6615
  }
6616
 
6617
  function wpdb_reconnect(){
6618
+ if(version_compare(phpversion() , '8', '>=')){
6619
+ return;
6620
+ }
6621
  global $wpdb;
6622
  $old_wpdb = $wpdb;
6623
  //Reconnect to avoid timeout problem after ZIP files
backup.class.singlecall.php CHANGED
@@ -84,6 +84,7 @@ class IWP_MMB_Backup_Singlecall extends IWP_MMB_Core
84
  function __construct()
85
  {
86
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
 
87
  parent::__construct();
88
  $this->site_name = str_replace(array(
89
  "_",
@@ -836,6 +837,7 @@ function delete_task_now($task_name){
836
  //define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
837
  //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
838
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
 
839
  $archive = new IWPPclZip($backup_file);
840
  }
841
 
@@ -907,6 +909,7 @@ function delete_task_now($task_name){
907
  iwp_mmb_print_flush('DB ZIP PCL: Start');
908
  //define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
909
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
 
910
  $archive = new IWPPclZip($backup_file);
911
 
912
  if($fail_safe_files && $disable_comp){
@@ -3467,6 +3470,9 @@ function ftp_backup($args)
3467
  }
3468
 
3469
  function wpdb_reconnect(){
 
 
 
3470
  global $wpdb;
3471
  $old_wpdb = $wpdb;
3472
  //Reconnect to avoid timeout problem after ZIP files
84
  function __construct()
85
  {
86
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
87
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
88
  parent::__construct();
89
  $this->site_name = str_replace(array(
90
  "_",
837
  //define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
838
  //require_once ABSPATH . '/wp-admin/includes/class-pclzip.php';
839
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
840
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
841
  $archive = new IWPPclZip($backup_file);
842
  }
843
 
909
  iwp_mmb_print_flush('DB ZIP PCL: Start');
910
  //define('IWP_PCLZIP_TEMPORARY_DIR', IWP_BACKUP_DIR . '/');
911
  require_once $GLOBALS['iwp_mmb_plugin_dir'].'/pclzip.class.php';
912
+ require_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
913
  $archive = new IWPPclZip($backup_file);
914
 
915
  if($fail_safe_files && $disable_comp){
3470
  }
3471
 
3472
  function wpdb_reconnect(){
3473
+ if(version_compare(phpversion() , '8', '>=')){
3474
+ return;
3475
+ }
3476
  global $wpdb;
3477
  $old_wpdb = $wpdb;
3478
  //Reconnect to avoid timeout problem after ZIP files
init.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: InfiniteWP - Client
4
  Plugin URI: http://infinitewp.com/
5
  Description: This is the client plugin of InfiniteWP that communicates with the InfiniteWP Admin panel.
6
  Author: Revmakx
7
- Version: 1.9.8
8
  Author URI: http://www.revmakx.com
9
  Network: true
10
  */
@@ -29,7 +29,7 @@ if(basename($_SERVER['SCRIPT_FILENAME']) == "init.php"):
29
  exit;
30
  endif;
31
  if(!defined('IWP_MMB_CLIENT_VERSION'))
32
- define('IWP_MMB_CLIENT_VERSION', '1.9.8');
33
 
34
 
35
 
4
  Plugin URI: http://infinitewp.com/
5
  Description: This is the client plugin of InfiniteWP that communicates with the InfiniteWP Admin panel.
6
  Author: Revmakx
7
+ Version: 1.9.9
8
  Author URI: http://www.revmakx.com
9
  Network: true
10
  */
29
  exit;
30
  endif;
31
  if(!defined('IWP_MMB_CLIENT_VERSION'))
32
+ define('IWP_MMB_CLIENT_VERSION', '1.9.9');
33
 
34
 
35
 
pclzip.class.php CHANGED
@@ -648,9 +648,10 @@ endif;
648
  }
649
  }
650
  */
651
- include_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
 
 
652
  if ($next_file_index == 0) {
653
- # code...
654
  scan_entire_site($v_filedescr_list);
655
  }
656
  $folder_list_result = iwp_iterator();
@@ -3678,10 +3679,13 @@ endif;
3678
  while ($v_size != 0)
3679
  {
3680
  $v_read_size = ($v_size < IWP_PCLZIP_READ_BLOCK_SIZE ? $v_size : IWP_PCLZIP_READ_BLOCK_SIZE);
 
 
 
3681
  $v_buffer = @fread($v_file_compressed, $v_read_size);
3682
- if($v_buffer === false){
3683
- return -1;
3684
- }
3685
  //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
3686
  $wr_result = @fwrite($this->zip_fd, $v_buffer, $v_read_size);
3687
  if($wr_result === false){
648
  }
649
  }
650
  */
651
+ if (!function_exists('scan_entire_site')) {
652
+ include_once $GLOBALS['iwp_mmb_plugin_dir'].'/iwp-file-iterator.php';
653
+ }
654
  if ($next_file_index == 0) {
 
655
  scan_entire_site($v_filedescr_list);
656
  }
657
  $folder_list_result = iwp_iterator();
3679
  while ($v_size != 0)
3680
  {
3681
  $v_read_size = ($v_size < IWP_PCLZIP_READ_BLOCK_SIZE ? $v_size : IWP_PCLZIP_READ_BLOCK_SIZE);
3682
+ if ($v_read_size <= 0) {
3683
+ return -1;
3684
+ }
3685
  $v_buffer = @fread($v_file_compressed, $v_read_size);
3686
+ if($v_buffer === false){
3687
+ return -1;
3688
+ }
3689
  //$v_binary_data = pack('a'.$v_read_size, $v_buffer);
3690
  $wr_result = @fwrite($this->zip_fd, $v_buffer, $v_read_size);
3691
  if($wr_result === false){
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: infinitewp, amritanandh, rajkuppus
3
  Tags: admin, administration, amazon, api, authentication, automatic, dashboard, dropbox, events, integration, manage, multisite, multiple, notification, performance, s3, security, seo, stats, tracking, infinitewp, updates, backup, restore, iwp, infinite
4
  Requires at least: 3.1
5
- Tested up to: 5.9.3
6
  Stable tag: trunk
7
 
8
  Install this plugin on unlimited sites and manage them all from a central dashboard.
@@ -48,6 +48,12 @@ Credits: [Vladimir Prelovac](http://prelovac.com/vladimir) for his worker plugin
48
 
49
  == Changelog ==
50
 
 
 
 
 
 
 
51
  = 1.9.8 - Mar 18th 2022 =
52
  * Feature: Added customer role to the Manage user addon if Woocommerce plugin is activated on the WordPress site.
53
  * Fix: iThemes 404 logs removed from client reports as the iThemes plugin do not detect 404 errors.
2
  Contributors: infinitewp, amritanandh, rajkuppus
3
  Tags: admin, administration, amazon, api, authentication, automatic, dashboard, dropbox, events, integration, manage, multisite, multiple, notification, performance, s3, security, seo, stats, tracking, infinitewp, updates, backup, restore, iwp, infinite
4
  Requires at least: 3.1
5
+ Tested up to: 6.0.2
6
  Stable tag: trunk
7
 
8
  Install this plugin on unlimited sites and manage them all from a central dashboard.
48
 
49
  == Changelog ==
50
 
51
+ = 1.9.9 - Aug 9th 2022 =
52
+ * Fix: Wordfence recent update changed the table prefix from the camel case, which caused the Client report to be unable to fetch Wordfence data.
53
+ * Fix: PHP 8.0 fatal error in backup if the site has the smart-slider plugin installed.
54
+ * Fix: WP Fastest Cache : Unable to perform WP Fastest cache error fixed.
55
+ * Fix: PHP 8.0 fatal and warning.
56
+
57
  = 1.9.8 - Mar 18th 2022 =
58
  * Feature: Added customer role to the Manage user addon if Woocommerce plugin is activated on the WordPress site.
59
  * Fix: iThemes 404 logs removed from client reports as the iThemes plugin do not detect 404 errors.