InfiniteWP Client - Version 1.9.4.6

Version Description

  • Apr 24th 2020 =
  • Improvement: WPMerge Temp folder Excluded on all backup methods (single call, multicall, Phoenix).
  • Improvement: Improved Error messages for failed plugins, themes, translation updates in the process queue, and activity log.
  • Improvement: Phoenix backup failure case detection improved.
  • Fix: Unable to activate or network activate plugins on multisite.
  • Fix: Add site failed for Network sites without open SSL.
  • Fix: .rnd files created on the wp-admin folder in a few instances.
Download this release

Release Info

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

Code changes from version 1.9.4.5 to 1.9.4.6

activities_log.class.php CHANGED
@@ -754,7 +754,7 @@ class IWP_MMB_Activities_log {
754
  }
755
 
756
  function iwp_mmb_register_custom_post_type(){
757
- register_post_type('iwp-log', array('label' => 'IWP Log'));
758
  }
759
  function iwp_mmb_save_sucuri_activity_log(){
760
  $object = new IWP_MMB_Sucuri();
754
  }
755
 
756
  function iwp_mmb_register_custom_post_type(){
757
+ register_post_type('iwp_log', array('label' => 'IWP Log'));
758
  }
759
  function iwp_mmb_save_sucuri_activity_log(){
760
  $object = new IWP_MMB_Sucuri();
backup.class.multicall.php CHANGED
@@ -1347,7 +1347,8 @@ class IWP_MMB_Backup_Multicall extends IWP_MMB_Core
1347
  "wp-snapshots",
1348
  "site_map.xml",
1349
  "iwp-clone-log.txt",
1350
- "iwp-restore-log.txt"
 
1351
  );
1352
  manual_debug('', 'beforeExclude', 0);
1353
  if((!empty($exclude_file_size))||(!empty($exclude_extensions)))
1347
  "wp-snapshots",
1348
  "site_map.xml",
1349
  "iwp-clone-log.txt",
1350
+ "iwp-restore-log.txt",
1351
+ "wp-content/wpmerge-temp"
1352
  );
1353
  manual_debug('', 'beforeExclude', 0);
1354
  if((!empty($exclude_file_size))||(!empty($exclude_extensions)))
backup.class.singlecall.php CHANGED
@@ -634,7 +634,8 @@ function delete_task_now($task_name){
634
  "wp-snapshots",
635
  "site_map.xml",
636
  "iwp-clone-log.txt",
637
- "iwp-restore-log.txt"
 
638
  );
639
 
640
  //removing files which are larger than the specified size
@@ -1857,7 +1858,7 @@ function delete_task_now($task_name){
1857
  $reqs['serverInfo']['backup_folder']['status'] = "not writable";
1858
  $reqs['serverInfo']['backup_folder']['pass'] = false;
1859
  }
1860
- $reqs['serverInfo']['backup_folder']['suggeted'] = 'Need to writiable';
1861
 
1862
 
1863
  $file_path = IWP_BACKUP_DIR;
@@ -1871,7 +1872,7 @@ function delete_task_now($task_name){
1871
  $reqs['serverInfo']['execute_function']['status'] = "not found";
1872
  $reqs['serverInfo']['execute_function']['pass'] = false;
1873
  }
1874
- $reqs['serverInfo']['execute_function']['suggeted'] = 'Need any one of support exec, system, passhtru (or will try PHP replacement)';
1875
  $reqs['serverInfo']['zip']['name'] = 'Zip';
1876
  $reqs['serverInfo']['zip']['status'] = $this->get_zip();
1877
  $reqs['serverInfo']['zip']['suggeted'] = 'System Zip need or will try PHP replacement';
634
  "wp-snapshots",
635
  "site_map.xml",
636
  "iwp-clone-log.txt",
637
+ "iwp-restore-log.txt",
638
+ "wp-content/wpmerge-temp"
639
  );
640
 
641
  //removing files which are larger than the specified size
1858
  $reqs['serverInfo']['backup_folder']['status'] = "not writable";
1859
  $reqs['serverInfo']['backup_folder']['pass'] = false;
1860
  }
1861
+ $reqs['serverInfo']['backup_folder']['suggeted'] = 'Need to writable';
1862
 
1863
 
1864
  $file_path = IWP_BACKUP_DIR;
1872
  $reqs['serverInfo']['execute_function']['status'] = "not found";
1873
  $reqs['serverInfo']['execute_function']['pass'] = false;
1874
  }
1875
+ $reqs['serverInfo']['execute_function']['suggeted'] = 'Need any one of support exec, system, passthru (or will try PHP replacement)';
1876
  $reqs['serverInfo']['zip']['name'] = 'Zip';
1877
  $reqs['serverInfo']['zip']['status'] = $this->get_zip();
1878
  $reqs['serverInfo']['zip']['suggeted'] = 'System Zip need or will try PHP replacement';
backup/backup.core.class.php CHANGED
@@ -2010,6 +2010,7 @@ class IWP_MMB_Backup_Core {
2010
  // Generate backup information
2011
  $use_nonce = (empty($options['use_nonce'])) ? false : $options['use_nonce'];
2012
  $this->backup_time_nonce($use_nonce);
 
2013
  // The current_resumption is consulted within logfile_open()
2014
  $this->current_resumption = 0;
2015
  $this->logfile_open($this->nonce);
@@ -2017,6 +2018,7 @@ class IWP_MMB_Backup_Core {
2017
  if (!is_file($this->logfile_name)) {
2018
  $this->log('Failed to open log file ('.$this->logfile_name.') - the directory ('.$iwp_backup_dir.') for creating files in is not writable, or you ran out of disk space). Backup aborted.');
2019
  $this->log(__('Could not create files in the backup directory. Backup aborted','InfiniteWP'), 'error');
 
2020
  return false;
2021
  }
2022
 
@@ -2065,6 +2067,7 @@ class IWP_MMB_Backup_Core {
2065
  if (!IWP_MMB_Backup_Options::get_iwp_backup_option('IWP_debug_mode') && !empty($this->logfile_name) && file_exists($this->logfile_name)) {
2066
  unlink($this->logfile_name);
2067
  }
 
2068
  return $ret;
2069
  }
2070
 
@@ -2078,6 +2081,7 @@ class IWP_MMB_Backup_Core {
2078
  $seconds_ago = time() - $last_scheduled_action_called_at;
2079
  if ($last_scheduled_action_called_at && $seconds_ago < 660 && apply_filters('IWP_check_repeated_scheduled_backups', true)) {
2080
  $this->log(sprintf('Scheduled backup aborted - another backup of this type was apparently invoked by the WordPress scheduler only %d seconds ago - the WordPress scheduler invoking events multiple times usually indicates a very overloaded server (or other plugins that mis-use the scheduler)', $seconds_ago));
 
2081
  return;
2082
  }
2083
  }
@@ -3693,6 +3697,15 @@ CREATE TABLE $wpdb->signups (
3693
  } elseif ($result == '0') {
3694
  $cron = $this->get_cron($job_id);
3695
  if ($cron == false) {
 
 
 
 
 
 
 
 
 
3696
  $last_backup = $this->last_backup_staus();
3697
  if (empty($last_backup) || empty($last_backup['error'])) {
3698
  $IWP_last_backup = IWP_MMB_Backup_Options::get_iwp_backup_option('IWP_last_backup');
@@ -3703,6 +3716,7 @@ CREATE TABLE $wpdb->signups (
3703
  $errorMsg = $last_backup['error'];
3704
  }
3705
  return array('error' => array('error_code' => 'backup_failed', 'error' => $errorMsg, 'jobdata' => $job_data, 'wp_content_url' => content_url(), 'backup_id' => $job_id));
 
3706
  }
3707
  if (!empty($cron)) {
3708
  if (time()> $cron[0]) {
2010
  // Generate backup information
2011
  $use_nonce = (empty($options['use_nonce'])) ? false : $options['use_nonce'];
2012
  $this->backup_time_nonce($use_nonce);
2013
+ update_option('IWP_running_backupID',$this->nonce);
2014
  // The current_resumption is consulted within logfile_open()
2015
  $this->current_resumption = 0;
2016
  $this->logfile_open($this->nonce);
2018
  if (!is_file($this->logfile_name)) {
2019
  $this->log('Failed to open log file ('.$this->logfile_name.') - the directory ('.$iwp_backup_dir.') for creating files in is not writable, or you ran out of disk space). Backup aborted.');
2020
  $this->log(__('Could not create files in the backup directory. Backup aborted','InfiniteWP'), 'error');
2021
+ delete_option('IWP_running_backupID');
2022
  return false;
2023
  }
2024
 
2067
  if (!IWP_MMB_Backup_Options::get_iwp_backup_option('IWP_debug_mode') && !empty($this->logfile_name) && file_exists($this->logfile_name)) {
2068
  unlink($this->logfile_name);
2069
  }
2070
+ delete_option('IWP_running_backupID');
2071
  return $ret;
2072
  }
2073
 
2081
  $seconds_ago = time() - $last_scheduled_action_called_at;
2082
  if ($last_scheduled_action_called_at && $seconds_ago < 660 && apply_filters('IWP_check_repeated_scheduled_backups', true)) {
2083
  $this->log(sprintf('Scheduled backup aborted - another backup of this type was apparently invoked by the WordPress scheduler only %d seconds ago - the WordPress scheduler invoking events multiple times usually indicates a very overloaded server (or other plugins that mis-use the scheduler)', $seconds_ago));
2084
+ delete_option('IWP_running_backupID');
2085
  return;
2086
  }
2087
  }
3697
  } elseif ($result == '0') {
3698
  $cron = $this->get_cron($job_id);
3699
  if ($cron == false) {
3700
+ $running_backupID = get_option('IWP_running_backupID');
3701
+ if(!empty($running_backupID)){
3702
+ $server = strtolower($_SERVER['SERVER_SOFTWARE']);
3703
+ if(strpos($server, 'litespeed') !== false){
3704
+ return array('error' => 'Unable to start the backup using the Phoenix method. LiteSpeed server detected.try using the multicall method.', 'error_code' => 'iwp_running_backup_issue_litespeed');
3705
+ } else{
3706
+ return array('error' => 'Unable to start the backup using the Phoenix method. Try using the multicall method', 'error_code' => 'iwp_running_backup_issue');
3707
+ }
3708
+ }else{
3709
  $last_backup = $this->last_backup_staus();
3710
  if (empty($last_backup) || empty($last_backup['error'])) {
3711
  $IWP_last_backup = IWP_MMB_Backup_Options::get_iwp_backup_option('IWP_last_backup');
3716
  $errorMsg = $last_backup['error'];
3717
  }
3718
  return array('error' => array('error_code' => 'backup_failed', 'error' => $errorMsg, 'jobdata' => $job_data, 'wp_content_url' => content_url(), 'backup_id' => $job_id));
3719
+ }
3720
  }
3721
  if (!empty($cron)) {
3722
  if (time()> $cron[0]) {
backup/class.semaphore.php CHANGED
@@ -78,6 +78,7 @@ class IWP_MMB_Semaphore {
78
 
79
  $iwp_backup_core->log('Semaphore lock ('.$this->lock_name.') complete');
80
  update_option('IWP_backup_status', '1');
 
81
  return true;
82
  }
83
 
78
 
79
  $iwp_backup_core->log('Semaphore lock ('.$this->lock_name.') complete');
80
  update_option('IWP_backup_status', '1');
81
+ delete_option('IWP_running_backupID');
82
  return true;
83
  }
84
 
backup/functions.php CHANGED
@@ -5,7 +5,7 @@ if ( ! defined('ABSPATH') )
5
 
6
  if( !function_exists ( 'iwp_mmb_define_constant' )) {
7
  function iwp_mmb_define_constant(){
8
- if (!defined('IWP_DEFAULT_OTHERS_EXCLUDE')) define('IWP_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,backup*,*backups,mysql.sql,debug.log,managewp,infinity-cache,backupwordpress,old-cache,nfwlog,wflogs,wishlist-backup,w3tc,logs,widget_cache,updraftplus');
9
 
10
  if (!defined('IWP_DEFAULT_INCLUDES')) define('IWP_DEFAULT_INCLUDES','google,wp-config.php,.htaccess');
11
 
5
 
6
  if( !function_exists ( 'iwp_mmb_define_constant' )) {
7
  function iwp_mmb_define_constant(){
8
+ if (!defined('IWP_DEFAULT_OTHERS_EXCLUDE')) define('IWP_DEFAULT_OTHERS_EXCLUDE','upgrade,cache,updraft,backup*,*backups,mysql.sql,debug.log,managewp,infinity-cache,backupwordpress,old-cache,nfwlog,wflogs,wishlist-backup,w3tc,logs,widget_cache,updraftplus,wpmerge-temp');
9
 
10
  if (!defined('IWP_DEFAULT_INCLUDES')) define('IWP_DEFAULT_INCLUDES','google,wp-config.php,.htaccess');
11
 
core.class.php CHANGED
@@ -726,6 +726,15 @@ class IWP_MMB_Core extends IWP_MMB_Helper
726
  }
727
  return $this->installer_instance;
728
  }
 
 
 
 
 
 
 
 
 
729
 
730
  /*
731
  * Get an instance of WordFence
@@ -851,8 +860,8 @@ EOF;
851
  update_blog_option($details->blog_id, 'iwp_client_network_admin_install', -1);
852
  }
853
 
854
- update_blog_option($details->blog_id, 'iwp_client_nossl_key', '');
855
- update_blog_option($details->blog_id, 'iwp_client_public_key', '');
856
  delete_blog_option($details->blog_id, 'iwp_client_action_message_id');
857
  }
858
  } else {
726
  }
727
  return $this->installer_instance;
728
  }
729
+
730
+ function check_plugin_activated($pluginBasename){
731
+ if(is_plugin_active_for_network($pluginBasename)){
732
+ return true;
733
+ }else if(is_plugin_active($pluginBasename)){
734
+ return true;
735
+ }
736
+ return false;
737
+ }
738
 
739
  /*
740
  * Get an instance of WordFence
860
  update_blog_option($details->blog_id, 'iwp_client_network_admin_install', -1);
861
  }
862
 
863
+ delete_blog_option($details->blog_id, 'iwp_client_nossl_key', '');
864
+ delete_blog_option($details->blog_id, 'iwp_client_public_key', '');
865
  delete_blog_option($details->blog_id, 'iwp_client_action_message_id');
866
  }
867
  } else {
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.4.5
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.4.5');
33
 
34
 
35
 
@@ -2141,6 +2141,10 @@ if(!function_exists('checkOpenSSL')){
2141
  if(empty($publicKey) || empty($privateKey)){
2142
  return false;
2143
  }
 
 
 
 
2144
  }
2145
  return true;
2146
  }
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.4.6
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.4.6');
33
 
34
 
35
 
2141
  if(empty($publicKey) || empty($privateKey)){
2142
  return false;
2143
  }
2144
+ $filename = getenv('HOME') . '/.rnd';
2145
+ if (file_exists($filename)) {
2146
+ @unlink($filename);
2147
+ }
2148
  }
2149
  return true;
2150
  }
installer.class.php CHANGED
@@ -20,6 +20,9 @@ if(basename($_SERVER['SCRIPT_FILENAME']) == "installer.class.php"):
20
  endif;
21
  class IWP_MMB_Installer extends IWP_MMB_Core
22
  {
 
 
 
23
  function __construct()
24
  {
25
  @set_time_limit(600);
@@ -31,6 +34,39 @@ class IWP_MMB_Installer extends IWP_MMB_Core
31
  @include_once(ABSPATH . 'wp-admin/includes/misc.php');
32
  @include_once(ABSPATH . 'wp-admin/includes/template.php');
33
  @include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
34
 
35
  global $wp_filesystem;
36
  if (!$wp_filesystem)
@@ -313,7 +349,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
313
  foreach ($result as $translate_tmp => $translate_info) {
314
  if (is_wp_error($translate_info) || empty($translate_info)) {
315
  $upgradeFailed = true;
316
- $return = array('error' => $this->iwp_mmb_get_error($translate_info), 'error_code' => 'upgrade_translations_wp_error');
317
  break;
318
  }
319
  }
@@ -523,11 +559,10 @@ class IWP_MMB_Installer extends IWP_MMB_Core
523
  $upgrader = new Plugin_Upgrader(new IWP_Updater_TraceableUpdaterSkin());
524
  $result = $upgrader->bulk_upgrade(array_keys($plugins));
525
  $current = $this->iwp_mmb_get_transient('update_plugins');
526
-
527
  if (!empty($result)) {
528
  foreach ($result as $plugin_slug => $plugin_info) {
529
  if (!$plugin_info || is_wp_error($plugin_info)) {
530
- $return[$plugin_slug] = array('error' => $this->iwp_mmb_get_error($plugin_info), 'error_code' => 'upgrade_plugins_wp_error');
531
  } else {
532
  if(
533
  !empty($result[$plugin_slug])
@@ -630,7 +665,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
630
  if (!empty($result)) {
631
  foreach ($result as $theme_tmp => $theme_info) {
632
  if (is_wp_error($theme_info) || empty($theme_info)) {
633
- $return[$theme_tmp] = array('error' => $this->iwp_mmb_get_error($theme_info), 'error_code' => 'upgrade_themes_wp_error');
634
  } else {
635
  if(!empty($result[$theme_tmp]) || (isset($current->checked[$theme_tmp]) && version_compare(array_search($theme_tmp, $versions), $current->checked[$theme_tmp], '<') == true)){
636
  foreach($theme_details as $key=>$theme_detail) {
@@ -935,25 +970,24 @@ class IWP_MMB_Installer extends IWP_MMB_Core
935
  'inactive' => array()
936
  );
937
  if (is_array($all_plugins) && !empty($all_plugins)) {
938
- $activated_plugins = get_option('active_plugins');
939
- if (!$activated_plugins)
940
- $activated_plugins = array();
941
 
942
  $br_a = 0;
943
  $br_i = 0;
944
  foreach ($all_plugins as $path => $plugin) {
945
  if ($plugin['Name'] != 'InfiniteWP - Client') {
946
- if (in_array($path, $activated_plugins)) {
947
  $plugins['active'][$br_a]['path'] = $path;
948
  $plugins['active'][$br_a]['name'] = strip_tags($plugin['Name']);
949
- $plugins['active'][$br_a]['version'] = $plugin['Version'];
 
950
  $br_a++;
951
  }
952
 
953
- if (!in_array($path, $activated_plugins)) {
954
  $plugins['inactive'][$br_i]['path'] = $path;
955
  $plugins['inactive'][$br_i]['name'] = strip_tags($plugin['Name']);
956
- $plugins['inactive'][$br_i]['version'] = $plugin['Version'];
 
957
  $br_i++;
958
  }
959
 
@@ -974,9 +1008,9 @@ class IWP_MMB_Installer extends IWP_MMB_Core
974
  }
975
  }
976
  }
977
-
978
  return $plugins;
979
  }
 
980
 
981
  function get_themes($args)
982
  {
@@ -1107,7 +1141,11 @@ class IWP_MMB_Installer extends IWP_MMB_Core
1107
  foreach ($items as $item) {
1108
  switch ($item['action']) {//switch ($items_edit_action) => switch ($item['action'])
1109
  case 'activate':
1110
- $result = activate_plugin($item['path']);
 
 
 
 
1111
  break;
1112
  case 'deactivate':
1113
  $result = deactivate_plugins(array(
@@ -1223,5 +1261,26 @@ class IWP_MMB_Installer extends IWP_MMB_Core
1223
 
1224
  return !is_null($current_db_version) && version_compare($current_db_version, max(array_keys($updates)), '<');
1225
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1226
  }
1227
  ?>
20
  endif;
21
  class IWP_MMB_Installer extends IWP_MMB_Core
22
  {
23
+ protected $upgrade_error_keys;
24
+ protected $upgrade_wp_flow_keys;
25
+ protected $upgrade_success_keys;
26
  function __construct()
27
  {
28
  @set_time_limit(600);
34
  @include_once(ABSPATH . 'wp-admin/includes/misc.php');
35
  @include_once(ABSPATH . 'wp-admin/includes/template.php');
36
  @include_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');
37
+ $this->upgrade_error_keys = array
38
+ (
39
+ 'bad_request',
40
+ 'fs_unavailable',
41
+ 'fs_error',
42
+ 'fs_no_root_dir',
43
+ 'fs_no_content_dir',
44
+ 'fs_no_plugins_dir',
45
+ 'fs_no_themes_dir',
46
+ 'fs_no_folder',
47
+ 'download_failed',
48
+ 'no_package',
49
+ 'no_files',
50
+ 'folder_exists',
51
+ 'mkdir_failed',
52
+ 'incompatible_archive',
53
+ 'files_not_writable',
54
+ 'process_failed',
55
+ 'remove_old_failed'
56
+ );
57
+ $this->upgrade_wp_flow_keys = array
58
+ (
59
+ 'installing_package',
60
+ 'maintenance_start',
61
+ 'maintenance_end',
62
+ 'downloading_package',
63
+ 'unpack_package',
64
+ 'remove_old'
65
+ );
66
+ $this->upgrade_success_keys = array(
67
+ 'up_to_date',
68
+ 'process_success'
69
+ );
70
 
71
  global $wp_filesystem;
72
  if (!$wp_filesystem)
349
  foreach ($result as $translate_tmp => $translate_info) {
350
  if (is_wp_error($translate_info) || empty($translate_info)) {
351
  $upgradeFailed = true;
352
+ $return = array('error' => $this->parse_upgrade_response($upgrader->skin->get_upgrade_messages()), 'error_code' => 'upgrade_translations_wp_error');
353
  break;
354
  }
355
  }
559
  $upgrader = new Plugin_Upgrader(new IWP_Updater_TraceableUpdaterSkin());
560
  $result = $upgrader->bulk_upgrade(array_keys($plugins));
561
  $current = $this->iwp_mmb_get_transient('update_plugins');
 
562
  if (!empty($result)) {
563
  foreach ($result as $plugin_slug => $plugin_info) {
564
  if (!$plugin_info || is_wp_error($plugin_info)) {
565
+ $return[$plugin_slug] = array('error' => $this->parse_upgrade_response($upgrader->skin->get_upgrade_messages()), 'error_code' => 'upgrade_plugins_wp_error');
566
  } else {
567
  if(
568
  !empty($result[$plugin_slug])
665
  if (!empty($result)) {
666
  foreach ($result as $theme_tmp => $theme_info) {
667
  if (is_wp_error($theme_info) || empty($theme_info)) {
668
+ $return[$theme_tmp] = array('error' => $this->parse_upgrade_response($upgrader->skin->get_upgrade_messages()), 'error_code' => 'upgrade_plugins_wp_error');
669
  } else {
670
  if(!empty($result[$theme_tmp]) || (isset($current->checked[$theme_tmp]) && version_compare(array_search($theme_tmp, $versions), $current->checked[$theme_tmp], '<') == true)){
671
  foreach($theme_details as $key=>$theme_detail) {
970
  'inactive' => array()
971
  );
972
  if (is_array($all_plugins) && !empty($all_plugins)) {
 
 
 
973
 
974
  $br_a = 0;
975
  $br_i = 0;
976
  foreach ($all_plugins as $path => $plugin) {
977
  if ($plugin['Name'] != 'InfiniteWP - Client') {
978
+ if($this->check_plugin_activated($path) == true){
979
  $plugins['active'][$br_a]['path'] = $path;
980
  $plugins['active'][$br_a]['name'] = strip_tags($plugin['Name']);
981
+ $plugins['active'][$br_a]['version'] = $plugin['Version'];
982
+ $plugins['active'][$br_a]['network'] = $plugin['Network'];
983
  $br_a++;
984
  }
985
 
986
+ if ($this->check_plugin_activated($path) == false) {
987
  $plugins['inactive'][$br_i]['path'] = $path;
988
  $plugins['inactive'][$br_i]['name'] = strip_tags($plugin['Name']);
989
+ $plugins['inactive'][$br_i]['version'] = $plugin['Version'];
990
+ $plugins['inactive'][$br_i]['network'] = $plugin['Network'];
991
  $br_i++;
992
  }
993
 
1008
  }
1009
  }
1010
  }
 
1011
  return $plugins;
1012
  }
1013
+
1014
 
1015
  function get_themes($args)
1016
  {
1141
  foreach ($items as $item) {
1142
  switch ($item['action']) {//switch ($items_edit_action) => switch ($item['action'])
1143
  case 'activate':
1144
+ $network_activate = false;
1145
+ if(!empty($item['network_activate']) && $item['network_activate'] == true){
1146
+ $network_activate = true;
1147
+ }
1148
+ $result = activate_plugin($item['path'],'',$network_activate);
1149
  break;
1150
  case 'deactivate':
1151
  $result = deactivate_plugins(array(
1261
 
1262
  return !is_null($current_db_version) && version_compare($current_db_version, max(array_keys($updates)), '<');
1263
  }
1264
+
1265
+ function parse_upgrade_response($response = null , $parse_error = true){
1266
+ $error_message = '';
1267
+ foreach ($response as $key => $message) {
1268
+ if(in_array($message['key'], $this->upgrade_wp_flow_keys) !== false){
1269
+ continue;
1270
+ }
1271
+ if(in_array($message['key'], $this->upgrade_success_keys) !== false){
1272
+ break;
1273
+ }
1274
+ if(in_array($message['key'], $this->upgrade_error_keys) !== false){
1275
+ $error_message = $message['message'];
1276
+ break;
1277
+ }
1278
+ $error_message = $message['message'];
1279
+ break;
1280
+ }
1281
+ if ($parse_error) {
1282
+ return !empty($error_message) ? $error_message : 'Could not find error from response : ' . serialize($response);
1283
+ }
1284
+ }
1285
  }
1286
  ?>
readme.txt CHANGED
@@ -2,7 +2,7 @@
2
  Contributors: infinitewp
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.3.2
6
  Stable tag: trunk
7
 
8
  Install this plugin on unlimited sites and manage them all from a central dashboard.
@@ -47,6 +47,14 @@ Credits: [Vladimir Prelovac](http://prelovac.com/vladimir) for his worker plugin
47
  5. One-click updates
48
 
49
  == Changelog ==
 
 
 
 
 
 
 
 
50
  = 1.9.4.5 - Jan 8th 2020 =
51
  * Fix: Important security fix.
52
 
2
  Contributors: infinitewp
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.4.2
6
  Stable tag: trunk
7
 
8
  Install this plugin on unlimited sites and manage them all from a central dashboard.
47
  5. One-click updates
48
 
49
  == Changelog ==
50
+ = 1.9.4.6 - Apr 24th 2020 =
51
+ * Improvement: WPMerge Temp folder Excluded on all backup methods (single call, multicall, Phoenix).
52
+ * Improvement: Improved Error messages for failed plugins, themes, translation updates in the process queue, and activity log.
53
+ * Improvement: Phoenix backup failure case detection improved.
54
+ * Fix: Unable to activate or network activate plugins on multisite.
55
+ * Fix: Add site failed for Network sites without open SSL.
56
+ * Fix: .rnd files created on the wp-admin folder in a few instances.
57
+
58
  = 1.9.4.5 - Jan 8th 2020 =
59
  * Fix: Important security fix.
60
 
stats.class.php CHANGED
@@ -368,7 +368,6 @@ class IWP_MMB_Stats extends IWP_MMB_Core
368
 
369
  function get_plugins_status($stats=array(), $options = array()){
370
  $installedPlugins = get_plugins();
371
- $activePlugins = get_option( 'active_plugins' );
372
 
373
  foreach ($installedPlugins as $installed=>$pluginDetails) {
374
  $pluginData = array('isInstalled' => true);
@@ -383,17 +382,9 @@ class IWP_MMB_Stats extends IWP_MMB_Core
383
  $pluginData['network'] = $pluginDetails['Network'];
384
  $pluginData['title'] = $pluginDetails['Title'];
385
  $pluginData['authorName'] = $pluginDetails['AuthorName'];
386
- // $pluginData['']
387
- if (in_array($installed, $activePlugins)){
388
- $pluginData['isActivated'] = true;
389
- // $stats['plugins_status'][$installed] = array(true,true);
390
- }else{
391
- $pluginData['isActivated'] = false;
392
- // $stats['plugins_status'][$installed] = array(true,false);
393
- }
394
  $stats['plugins_status'][$installed] = $pluginData;
395
  }
396
-
397
  return $stats;
398
  }
399
  function get_themes_status($stats=array(), $options = array()){
368
 
369
  function get_plugins_status($stats=array(), $options = array()){
370
  $installedPlugins = get_plugins();
 
371
 
372
  foreach ($installedPlugins as $installed=>$pluginDetails) {
373
  $pluginData = array('isInstalled' => true);
382
  $pluginData['network'] = $pluginDetails['Network'];
383
  $pluginData['title'] = $pluginDetails['Title'];
384
  $pluginData['authorName'] = $pluginDetails['AuthorName'];
385
+ $pluginData['isActivated'] = $this->check_plugin_activated($installed);
 
 
 
 
 
 
 
386
  $stats['plugins_status'][$installed] = $pluginData;
387
  }
 
388
  return $stats;
389
  }
390
  function get_themes_status($stats=array(), $options = array()){