Plugin Directory

Changeset 1876865


Ignore:
Timestamp:
05/18/2018 03:01:51 AM (8 years ago)
Author:
fs1995
Message:

cleanup

Location:
lw-mwp-tools
Files:
27 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • lw-mwp-tools/trunk/lw-mwp-tools.php

    r1854382 r1876865  
    55Description: Easy access to system logs and resource usage on the Liquid Web Managed WordPress Hosting Platform.
    66Author: Francis Smith
    7 Version: 0.3.6
     7Version: 0.3.6.1
    88Author URI: https://github.com/fs1995
    99License: GPL2
     
    1313
    1414//check if we are on MWPv2 platform. this is not a thorough check, just seeing if the user php is running as begins with 's' then a number.
    15 $is_lwmwp = 1;
    16 if (PHP_OS !== "Linux")
    17   $is_lwmwp = 0;
    18 if (get_current_user()[0] !== 's')
    19   $is_lwmwp = 0;
    20 if (!is_numeric(get_current_user()[1]))
    21   $is_lwmwp = 0;
    22 if(!$is_lwmwp){ //If not on MWP:
    23   delete_option('lwmwptools_update_interval'); //then cleanup db entry,
    24   exit("This plugin requires the Liquid Web Managed WordPress platform."); //and prevent plugin from activating.
     15if(PHP_OS !== "Linux" || !preg_match('/^s[0-9]+/', get_current_user()) ){ //then not on MWPv2,
     16  if(get_current_user() !== 'root'){ //but exclude deactivating if run as root.
     17    delete_option('lwmwptools_update_interval'); //cleanup db entry,
     18    exit("LW MWP Tools requires the Liquid Web Managed WordPress V2 platform. This plugin does not support the V3 or Managed WooCommerce platforms, as resource usage is irrelevant (load is distributed across multiple servers) and error/access logs are not accessible by the PHP user. You could also be receiving this error if you have migrated your site off the platform, in that case you can use this plugin instead: <a href=\"https://wordpress.org/plugins/servermonitor/\" target=\"_blank\">ServerMonitor</a> "); //and prevent plugin from activating nicely.
     19  }
    2520}
    2621
     
    136131
    137132function lwmwptools_monitorajax(){
    138   //global $wpdb; //provides access to db
    139   //$test = intval( $_POST['test'] );
    140133  require 'api.php';
    141134  wp_die(); //terminate immediately and return response
  • lw-mwp-tools/trunk/readme.txt

    r1854382 r1876865  
    44Tags: liquidweb, liquid web, server info, monitor, debug
    55Requires at least: 3.4
    6 Tested up to: 4.9.4
     6Tested up to: 4.9.6
    77Stable tag: trunk
    88License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.