Plugin Directory

Changeset 2763240


Ignore:
Timestamp:
07/29/2022 05:03:46 AM (4 years ago)
Author:
ehops32
Message:

1.1.6

  • Checks if the simple history plugin is installed. If so, looks at the last few accounts that have logged into the website.
  • Changing the remote server to now be data.sacksonweb.com.
  • Check to see values in .user.ini if it exists.
Location:
sackson-web-data/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sackson-web-data/trunk/README.txt

    r2762111 r2763240  
    55Requires at least: 3.0.1
    66Tested up to: 6.0
    7 Stable tag: 1.1.5.1
     7Stable tag: 1.1.6
    88Requires PHP: 7.0
    99License: GPLv2 or later
     
    5151== Changelog ==
    5252
     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
    5358= 1.1.5.1 =
    5459* Missed a check in release 1.1.5, correcting the PHP warning
  • sackson-web-data/trunk/includes/class-sacksonweb-data-helper.php

    r2762111 r2763240  
    4343
    4444    /**
    45      *
    46      */
    47     public $sacksonweb_remote_url = 'https://mm.ericandtammy.com/receiver';
     45     *  
     46     */
     47    public $sacksonweb_remote_url = 'https://data.sacksonweb.com/receiver';
    4848
    4949    /**
     
    145145        $this->getSiteCoreData();
    146146        $this->getFileSystemItems ();
     147        $this->getSimpleHistoryLastLoginData();
    147148    }
    148149   
     
    238239        $this->collected_data['debug_log_exists'] = $this->doesDebugLogExist ();
    239240        $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        }
    241246    }
    242247 
     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
    243266    /**
    244267     *
     
    324347    }
    325348
     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
    326383}
  • sackson-web-data/trunk/sacksonweb-data.php

    r2762111 r2763240  
    1010 *
    1111 * @link              http://data.sacksonweb.com/author
    12  * @since             1.1.5.1
     12 * @since             1.1.6
    1313 * @package           Sacksonweb_Data
    1414 *
     
    1717 * Plugin URI:        http://data.sacksonweb.com
    1818 * Description:       A tool to monitor security issues, performance issues, and Wordpress settings that should be changed.
    19  * Version:           1.1.5.1
     19 * Version:           1.1.6
    2020 * Author:            Eric Thornton
    2121 * Author URI:        http://data.sacksonweb.com/author
     
    3535 *
    3636 */
    37 define( 'SACKSONWEB_DATA_VERSION', '1.1.5.1' );
     37define( 'SACKSONWEB_DATA_VERSION', '1.1.6' );
    3838
    3939/**
Note: See TracChangeset for help on using the changeset viewer.