Changeset 2763240
- Timestamp:
- 07/29/2022 05:03:46 AM (4 years ago)
- Location:
- sackson-web-data/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
includes/class-sacksonweb-data-helper.php (modified) (4 diffs)
-
sacksonweb-data.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sackson-web-data/trunk/README.txt
r2762111 r2763240 5 5 Requires at least: 3.0.1 6 6 Tested up to: 6.0 7 Stable tag: 1.1. 5.17 Stable tag: 1.1.6 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 51 51 == Changelog == 52 52 53 = 1.1.6 = 54 * Checks if the simple history plugin is installed. If so, looks at the last few accounts that have logged into the website. 55 * Changing the remote server to now be data.sacksonweb.com. 56 * Check to see values in .user.ini if it exists. 57 53 58 = 1.1.5.1 = 54 59 * Missed a check in release 1.1.5, correcting the PHP warning -
sackson-web-data/trunk/includes/class-sacksonweb-data-helper.php
r2762111 r2763240 43 43 44 44 /** 45 * 46 */ 47 public $sacksonweb_remote_url = 'https:// mm.ericandtammy.com/receiver';45 * 46 */ 47 public $sacksonweb_remote_url = 'https://data.sacksonweb.com/receiver'; 48 48 49 49 /** … … 145 145 $this->getSiteCoreData(); 146 146 $this->getFileSystemItems (); 147 $this->getSimpleHistoryLastLoginData(); 147 148 } 148 149 … … 238 239 $this->collected_data['debug_log_exists'] = $this->doesDebugLogExist (); 239 240 $this->collected_data['htaccess_file_exists'] = $this->doesHtaccessFileExist (); 240 $this->collected_data['user_ini_file_exists'] = $this->doesUserIniFileExist (); 241 $this->collected_data['user_ini_file_exists'] = $this->doesUserIniExist (); 242 if ( 'y' == $this->collected_data['user_ini_file_exists'] ) 243 { 244 $this->collected_data['user_ini_file_contents'] = $this->getUserIniContents (); 245 } 241 246 } 242 247 248 /** 249 * 250 */ 251 function getUserIniContents () 252 { 253 $user_ini_file_location = ABSPATH . '/.user.ini'; 254 return file_get_contents($user_ini_file_location); 255 } 256 257 /** 258 * 259 */ 260 function doesUserIniExist () 261 { 262 $user_ini_file_location = ABSPATH . '/.user.ini'; 263 return file_exists($user_ini_file_location) ? 'y' : 'n'; 264 } 265 243 266 /** 244 267 * … … 324 347 } 325 348 349 350 /** 351 * 352 */ 353 function getSimpleHistoryLastLoginData( ) 354 { 355 356 if ( isset($this->collected_data['active_plugins']) && !str_contains(implode(',', $this->collected_data['active_plugins']), 'simple-history') ) 357 { 358 return; 359 } 360 361 362 global $wpdb; 363 /* 364 FROM `wp_vmck51qx8n_simple_history` sh 365 JOIN wp_vmck51qx8n_simple_history_contexts shc 366 */ 367 $query = "SELECT sh.date, shc.value 368 FROM `{$wpdb->prefix}simple_history` sh 369 JOIN {$wpdb->prefix}simple_history_contexts shc 370 ON sh.id = shc.history_id 371 WHERE shc.history_id >= ((SELECT MAX(shc.history_id) FROM wp_vmck51qx8n_simple_history) - 10) AND shc.key = 'user_login' 372 "; 373 374 $rows = $wpdb->get_results($query); 375 $last_logins = array(); 376 foreach ($rows as $row) 377 { 378 $last_logins[] = array($row->date, $row->value); 379 } 380 $this->collected_data['last_logins'] = json_encode($last_logins); 381 } 382 326 383 } -
sackson-web-data/trunk/sacksonweb-data.php
r2762111 r2763240 10 10 * 11 11 * @link http://data.sacksonweb.com/author 12 * @since 1.1. 5.112 * @since 1.1.6 13 13 * @package Sacksonweb_Data 14 14 * … … 17 17 * Plugin URI: http://data.sacksonweb.com 18 18 * Description: A tool to monitor security issues, performance issues, and Wordpress settings that should be changed. 19 * Version: 1.1. 5.119 * Version: 1.1.6 20 20 * Author: Eric Thornton 21 21 * Author URI: http://data.sacksonweb.com/author … … 35 35 * 36 36 */ 37 define( 'SACKSONWEB_DATA_VERSION', '1.1. 5.1' );37 define( 'SACKSONWEB_DATA_VERSION', '1.1.6' ); 38 38 39 39 /**
Note: See TracChangeset
for help on using the changeset viewer.