InfiniteWP Client - Version 1.2.7

Version Description

  • Fix: Activation failed on multiple plugin installation is fixed
  • Fix: Dropbox class name conflit with other plugins is fixed
  • Fix: Bug fixes
Download this release

Release Info

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

Code changes from version 1.2.6 to 1.2.7

Files changed (6) hide show
  1. backup.class.php +11 -3
  2. init.php +2 -2
  3. installer.class.php +7 -3
  4. lib/dropbox.php +8 -8
  5. pclzip.class.php +1 -2
  6. readme.txt +6 -1
backup.class.php CHANGED
@@ -2100,7 +2100,9 @@ function ftp_backup($args)
2100
2101
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2102
2103
- $dropbox = new Dropbox($consumer_key, $consumer_secret);
2104
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2105
2106
if ($dropbox_site_folder == true)
@@ -2134,7 +2136,10 @@ function ftp_backup($args)
2134
2135
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2136
2137
- $dropbox = new Dropbox($consumer_key, $consumer_secret);
2138
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2139
2140
if ($dropbox_site_folder == true)
@@ -2159,7 +2164,10 @@ function ftp_backup($args)
2159
2160
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2161
2162
- $dropbox = new Dropbox($consumer_key, $consumer_secret);
2163
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2164
2165
if ($dropbox_site_folder == true)
2100
2101
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2102
2103
+
2104
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2105
+
2106
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2107
2108
if ($dropbox_site_folder == true)
2136
2137
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2138
2139
+
2140
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2141
+
2142
+
2143
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2144
2145
if ($dropbox_site_folder == true)
2164
2165
require_once $GLOBALS['iwp_mmb_plugin_dir'] . '/lib/dropbox.php';
2166
2167
+
2168
+ $dropbox = new IWP_Dropbox($consumer_key, $consumer_secret);
2169
+
2170
+
2171
$dropbox->setOAuthTokens($oauth_token, $oauth_token_secret);
2172
2173
if ($dropbox_site_folder == true)
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.2.6
8
Author URI: http://www.revmakx.com
9
*/
10
/************************************************************
@@ -26,7 +26,7 @@ Author URI: http://www.revmakx.com
26
**************************************************************/
27
28
if(!defined('IWP_MMB_CLIENT_VERSION'))
29
- define('IWP_MMB_CLIENT_VERSION', '1.2.6');
30
31
32
if ( !defined('IWP_MMB_XFRAME_COOKIE')){
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.2.7
8
Author URI: http://www.revmakx.com
9
*/
10
/************************************************************
26
**************************************************************/
27
28
if(!defined('IWP_MMB_CLIENT_VERSION'))
29
+ define('IWP_MMB_CLIENT_VERSION', '1.2.7');
30
31
32
if ( !defined('IWP_MMB_XFRAME_COOKIE')){
installer.class.php CHANGED
@@ -51,6 +51,7 @@ class IWP_MMB_Installer extends IWP_MMB_Core
51
52
function install_remote_file($params)
53
{
54
global $wp_filesystem;
55
extract($params);
56
@@ -90,12 +91,15 @@ class IWP_MMB_Installer extends IWP_MMB_Core
90
'hook_extra' => array()
91
));
92
}
93
-
94
if ($activate) {
95
if ($type == 'plugins') {
96
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
97
- $all_plugins = get_plugins();
98
- foreach ($all_plugins as $plugin_slug => $plugin) {
99
$plugin_dir = preg_split('/\//', $plugin_slug);
100
foreach ($install_info as $key => $install) {
101
if (!$install || is_wp_error($install))
51
52
function install_remote_file($params)
53
{
54
+
55
global $wp_filesystem;
56
extract($params);
57
91
'hook_extra' => array()
92
));
93
}
94
+
95
if ($activate) {
96
if ($type == 'plugins') {
97
include_once(ABSPATH . 'wp-admin/includes/plugin.php');
98
+
99
+ wp_cache_delete( 'plugins', 'plugins' );
100
+
101
+ $all_plugins = get_plugins();
102
+ foreach ($all_plugins as $plugin_slug => $plugin) {
103
$plugin_dir = preg_split('/\//', $plugin_slug);
104
foreach ($install_info as $key => $install) {
105
if (!$install || is_wp_error($install))
lib/dropbox.php CHANGED
@@ -1,5 +1,5 @@
1
<?php
2
- class Dropbox {
3
const API_URL = 'https://api.dropbox.com/';
4
const API_CONTENT_URL = 'https://api-content.dropbox.com/';
5
const API_WWW_URL = 'https://www.dropbox.com/';
@@ -42,7 +42,7 @@ class Dropbox {
42
public function upload($file, $path = '',$overwrite=true){
43
$file = str_replace("\\", "/",$file);
44
if (!is_readable($file) or !is_file($file))
45
- throw new DropboxException("Error: File \"$file\" is not readable or doesn't exist.");
46
$filesize=filesize($file);
47
if ($filesize < (1024*1024*50)) { //chunk transfer on bigger uploads <50MB
48
$filehandle = fopen($file,'r');
@@ -58,7 +58,7 @@ class Dropbox {
58
public function chunked_upload($file, $path = '',$overwrite=true){
59
$file = str_replace("\\", "/",$file);
60
if (!is_readable($file) or !is_file($file))
61
- throw new DropboxException("Error: File \"$file\" is not readable or doesn't exist.");
62
$file_handle=fopen($file,'r');
63
$uploadid=null;
64
$offset=0;
@@ -105,7 +105,7 @@ class Dropbox {
105
106
public function search($path = '', $query , $fileLimit = 1000){
107
if (strlen($query)>=3)
108
- throw new DropboxException("Error: Query \"$query\" must three characters long.");
109
$url = self::API_URL.self::API_VERSION_URL.'search/'.$this->root.'/'.trim($path,'/');
110
return $this->request($url, array('query' => $query, 'file_limit' => $fileLimit));
111
}
@@ -154,7 +154,7 @@ class Dropbox {
154
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
155
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
156
else $message = '('.$status.') Invalid response.';
157
- throw new DropboxException($message);
158
}
159
curl_close($ch);
160
return array( 'authurl' => self::API_WWW_URL . self::API_VERSION_URL . 'oauth/authorize?oauth_token='.$oauth_token['oauth_token'].'&oauth_callback='.urlencode($callback_url),
@@ -188,7 +188,7 @@ class Dropbox {
188
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
189
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
190
else $message = '('.$status.') Invalid response.';
191
- throw new DropboxException($message);
192
}
193
}
194
@@ -257,7 +257,7 @@ class Dropbox {
257
elseif ($status['http_code']==503) $message = '(503) Your app is making too many requests and is being rate limited. 503s can trigger on a per-app or per-user basis.';
258
elseif ($status['http_code']==507) $message = '(507) User is over Dropbox storage quota.';
259
else $message = '('.$status['http_code'].') Invalid response.';
260
- throw new DropboxException($message);
261
} else {
262
curl_close($ch);
263
if (!is_array($output))
@@ -280,6 +280,6 @@ class Dropbox {
280
281
}
282
283
- class DropboxException extends Exception {
284
}
285
?>
1
<?php
2
+ class IWP_Dropbox {
3
const API_URL = 'https://api.dropbox.com/';
4
const API_CONTENT_URL = 'https://api-content.dropbox.com/';
5
const API_WWW_URL = 'https://www.dropbox.com/';
42
public function upload($file, $path = '',$overwrite=true){
43
$file = str_replace("\\", "/",$file);
44
if (!is_readable($file) or !is_file($file))
45
+ throw new IWP_DropboxException("Error: File \"$file\" is not readable or doesn't exist.");
46
$filesize=filesize($file);
47
if ($filesize < (1024*1024*50)) { //chunk transfer on bigger uploads <50MB
48
$filehandle = fopen($file,'r');
58
public function chunked_upload($file, $path = '',$overwrite=true){
59
$file = str_replace("\\", "/",$file);
60
if (!is_readable($file) or !is_file($file))
61
+ throw new IWP_DropboxException("Error: File \"$file\" is not readable or doesn't exist.");
62
$file_handle=fopen($file,'r');
63
$uploadid=null;
64
$offset=0;
105
106
public function search($path = '', $query , $fileLimit = 1000){
107
if (strlen($query)>=3)
108
+ throw new IWP_DropboxException("Error: Query \"$query\" must three characters long.");
109
$url = self::API_URL.self::API_VERSION_URL.'search/'.$this->root.'/'.trim($path,'/');
110
return $this->request($url, array('query' => $query, 'file_limit' => $fileLimit));
111
}
154
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
155
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
156
else $message = '('.$status.') Invalid response.';
157
+ throw new IWP_DropboxException($message);
158
}
159
curl_close($ch);
160
return array( 'authurl' => self::API_WWW_URL . self::API_VERSION_URL . 'oauth/authorize?oauth_token='.$oauth_token['oauth_token'].'&oauth_callback='.urlencode($callback_url),
188
elseif(isset($output['error']['hash']) && $output['error']['hash'] != '') $message = (string) $output['error']['hash'];
189
elseif (0!=curl_errno($ch)) $message = '('.curl_errno($ch).') '.curl_error($ch);
190
else $message = '('.$status.') Invalid response.';
191
+ throw new IWP_DropboxException($message);
192
}
193
}
194
257
elseif ($status['http_code']==503) $message = '(503) Your app is making too many requests and is being rate limited. 503s can trigger on a per-app or per-user basis.';
258
elseif ($status['http_code']==507) $message = '(507) User is over Dropbox storage quota.';
259
else $message = '('.$status['http_code'].') Invalid response.';
260
+ throw new IWP_DropboxException($message);
261
} else {
262
curl_close($ch);
263
if (!is_array($output))
280
281
}
282
283
+ class IWP_DropboxException extends Exception {
284
}
285
?>
pclzip.class.php CHANGED
@@ -5715,5 +5715,4 @@
5715
}
5716
// --------------------------------------------------------------------------------
5717
5718
-
5719
- ?>
5715
}
5716
// --------------------------------------------------------------------------------
5717
5718
+ ?>
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.0
5
- Tested up to: 3.7.1
6
Stable tag: trunk
7
8
Install this plugin on unlimited sites and manage them all from a central dashboard.
@@ -48,6 +48,11 @@ Credits: [Vladimir Prelovac](http://prelovac.com/vladimir) for his worker plugin
48
49
== Changelog ==
50
51
= 1.2.6 =
52
* Fix: Bug fixes
53
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.0
5
+ Tested up to: 3.8
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.2.7 =
52
+ * Fix: Activation failed on multiple plugin installation is fixed
53
+ * Fix: Dropbox class name conflit with other plugins is fixed
54
+ * Fix: Bug fixes
55
+
56
= 1.2.6 =
57
* Fix: Bug fixes
58