PluginProbe
The WP Remote WordPress Plugin / trunk
The WP Remote WordPress Plugin vtrunk
6.72 6.69 6.65 6.62 6.48 6.47 4.87 4.97 5.05 5.09 5.16 5.22 5.24 5.25 5.38 5.41 5.42 5.45 5.47 5.53 5.56 5.65 5.68 5.72 5.73 All 53 releases
← All changes | callback/wings/info.php +25 -11 5.68trunk View file →
@@ -1,10 +1,10 @@
1 1 <?php
2 2
3 3 if (!defined('ABSPATH')) exit;
4 -if (!class_exists('BVInfoCallback')) :
4 +if (!class_exists('WPRInfoCallback')) :
5 5
6 -class BVInfoCallback extends BVCallbackBase {
6 +class WPRInfoCallback extends WPRCallbackBase {
7 7 public $db;
8 8 public $settings;
9 9 public $siteinfo;
10 10 public $bvinfo;
@@ -9,9 +9,9 @@
9 9 public $siteinfo;
10 10 public $bvinfo;
11 11 public $bvapi;
12 12
13 - const INFO_WING_VERSION = 2.3;
13 + const INFO_WING_VERSION = 2.7;
14 14
15 15 public function __construct($callback_handler) {
16 16 $this->db = $callback_handler->db;
17 17 $this->siteinfo = $callback_handler->siteinfo;
@@ -116,15 +116,14 @@
116 116 }
117 117
118 118 public function getThemes() {
119 119 $result = array();
120 - $themes = function_exists('wp_get_themes') ? wp_get_themes() : get_themes();
120 + $themes = wp_get_themes();
121 121 foreach($themes as $theme) {
122 122 $pdata = $this->themeToArray($theme);
123 123 $result["themes"][] = $pdata;
124 124 }
125 - $theme = function_exists('wp_get_theme') ? wp_get_theme() : get_current_theme();
126 - $pdata = $this->themeToArray($theme);
125 + $pdata = $this->themeToArray(wp_get_theme());
127 126 $result["currenttheme"] = $pdata;
128 127 return $result;
129 128 }
130 129
@@ -129,14 +128,14 @@
129 128 }
130 129
131 130 public function getSystemInfo() {
132 131 $sys_info = array(
133 - 'host' => $_SERVER['HTTP_HOST'],
132 + 'host' => WPRHelper::getRawParam('SERVER', 'HTTP_HOST'),
134 133 'phpversion' => phpversion(),
135 134 'AF_INET6' => defined('AF_INET6')
136 135 );
137 136 if (array_key_exists('SERVER_ADDR', $_SERVER)) {
138 - $sys_info['serverip'] = $_SERVER['SERVER_ADDR'];
137 + $sys_info['serverip'] = WPRHelper::getRawParam('SERVER', 'SERVER_ADDR');
139 138 }
140 139 if (function_exists('get_current_user')) {
141 140 $sys_info['user'] = get_current_user();
142 141 }
@@ -186,9 +185,11 @@
186 185 'custom_users' => defined('CUSTOM_USER_TABLE') ? CUSTOM_USER_TABLE : null,
187 186 'custom_usermeta' => defined('CUSTOM_USERMETA_TABLE') ? CUSTOM_USERMETA_TABLE : null,
188 187 'locale' => get_locale(),
189 188 'wp_local_string' => $wp_local_package,
190 - 'charset_collate' => $db->getCharsetCollate()
189 + 'charset_collate' => $db->getCharsetCollate(),
190 + 'allowed_paths' => ini_get('open_basedir'),
191 + 'path_seprator' => PATH_SEPARATOR
191 192 );
192 193 return $wp_info;
193 194 }
194 195
@@ -227,8 +228,14 @@
227 228 }
228 229 if (function_exists('openssl_public_decrypt')) {
229 230 $info['openssl_public_decrypt'] = "1";
230 231 }
232 + if (function_exists('openssl_encrypt')) {
233 + $info['openssl_encrypt'] = "1";
234 + }
235 + if (function_exists('openssl_decrypt')) {
236 + $info['openssl_decrypt'] = "1";
237 + }
231 238 $info['sha1'] = "1";
232 239 $info['apissl'] = "1";
233 240 if (function_exists('base64_encode')) {
234 241 $info['b64encode'] = true;
@@ -275,9 +282,16 @@
275 282 }
276 283
277 284 public function getHostInfo() {
278 285 $host_info = $_SERVER;
279 - $host_info['PHP_SERVER_NAME'] = php_uname('\n');
286 + if (function_exists('php_uname')) {
287 + $host_info['PHP_SERVER_NAME'] = php_uname();
288 + }
289 +
290 + if (isset($_SERVER['SERVER_ADDR']) && function_exists('gethostbyaddr')) {
291 + $host_info['HOST_FROM_IP'] = gethostbyaddr(WPRHelper::getRawParam('SERVER', 'SERVER_ADDR'));
292 + }
293 +
280 294 if (array_key_exists('IS_PRESSABLE', get_defined_constants())) {
281 295 $host_info['IS_PRESSABLE'] = true;
282 296 }
283 297
@@ -297,9 +311,9 @@
297 311 }
298 312
299 313 public function serverConfig() {
300 314 return array(
301 - 'software' => $_SERVER['SERVER_SOFTWARE'],
315 + 'software' => WPRHelper::getRawParam('SERVER', 'SERVER_SOFTWARE'),
302 316 'sapi' => (function_exists('php_sapi_name')) ? php_sapi_name() : false,
303 317 'has_apache_get_modules' => function_exists('apache_get_modules'),
304 318 'posix_getuid' => (function_exists('posix_getuid')) ? posix_getuid() : null,
305 319 'uid' => (function_exists('getmyuid')) ? getmyuid() : null,