Plugin Directory

Changeset 1410344


Ignore:
Timestamp:
05/04/2016 01:29:43 PM (10 years ago)
Author:
igor-lemon
Message:

tagging version 1.9.1

Location:
stacksight
Files:
2 deleted
4 edited
23 copied

Legend:

Unmodified
Added
Removed
  • stacksight/tags/1.9.1/readme.txt

    r1401375 r1410344  
    44Requires at least: 3.5
    55Tested up to: 4.3
    6 Stable tag: 1.9.0
     6Stable tag: 1.9.1
    77License: GPLv2 or later
    88
  • stacksight/tags/1.9.1/stacksight-php-sdk/SSHttpRequest.php

    r1401375 r1410344  
    3333    public function sendLog($data) {
    3434        if((defined('STACKSIGHT_DEBUG') && STACKSIGHT_DEBUG === true) && defined('STACKSIGHT_DEBUG_MODE') && STACKSIGHT_DEBUG_MODE === true){
    35             $_SESSION['stacksight_debug']['events'] = array();
     35            $_SESSION['stacksight_debug']['logs'] = array();
    3636            $data_for_log = array(
    3737                'type' =>  $this->type,
  • stacksight/tags/1.9.1/texts.php

    r1401375 r1410344  
    2121define('stacksight_inventory_text', $inventory_text);
    2222
    23 
    2423define('stacksight_events_title', 'Include Events');
    25 $events_text = !((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)) ? <<<HTML
     24if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){
     25    $events_text =  <<<HTML
    2626    <div>Watch users and application events at real time</div>
    27 HTML
    28     : <<<HTML
     27HTML;
     28} elseif(defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === false){
     29    $events_text = <<<HTML
     30            <div class="code-red">If you want events enable, please activate <strong>Activity Log plugin</strong>.</div>
     31HTML;
     32} else{
     33    $events_text = <<<HTML
    2934    <div class="code-red">If you want events enable, please install and activate <a href="https://wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div>
    3035HTML;
     36}
    3137
    3238define('stacksight_events_text', $events_text);
  • stacksight/tags/1.9.1/wp-stacksight.php

    r1401375 r1410344  
    44 * Plugin URI: http://mean.io
    55 * Description: Stacksight wordpress support (featuring events, error logs and updates)
    6  * Version: 1.9.0
     6 * Version: 1.9.1
    77 * Author: Stacksight LTD
    88 * Author URI: http://stacksight.io
     
    1212defined('ABSPATH') or die("No script kiddies please!");
    1313
    14 require_once('texts.php');
    1514require_once('stacksight-php-sdk/SSUtilities.php');
    1615require_once('stacksight-php-sdk/SSClientBase.php');
     
    5756
    5857            }
    59             if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')) {
    60                 add_action('aal_insert_log', array(&$this, 'insert_log_mean'), 30);
     58            if(defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true){
     59                require_once(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php');
     60                if(function_exists('aal_insert_log')) {
     61                    add_action('aal_insert_log', array(&$this, 'insert_log_mean'), 30);
     62                }
    6163            }
    6264            add_action('stacksight_main_action', array($this, 'cron_do_main_job'));
     
    148150
    149151    public function cron_do_main_job() {
    150         if(!defined('STACKSIGHT_TOKEN'))
     152        if(!defined('STACKSIGHT_TOKEN') || !isset($this->ss_client) || !$this->ss_client)
    151153            return;
    152154
     
    399401    public function create_admin_page() {
    400402        $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general_settings';
    401         if(is_plugin_active('aryo-activity-log/aryo-activity-log.php')){
    402             define('STACKSIGHT_ACTIVE_AAL', true);
    403         }
     403        if(file_exists(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php')){
     404            if(is_plugin_active('aryo-activity-log/aryo-activity-log.php')){
     405                define('STACKSIGHT_ACTIVE_AAL', true);
     406            } else{
     407                define('STACKSIGHT_ACTIVE_AAL', false);
     408            }
     409        }
     410        require_once('texts.php');
    404411        $this->showStackMessages();
    405412        ?>
     
    10881095            $description = stacksight_events_text;
    10891096        }
    1090         if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')){
     1097
     1098        if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log') && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){
    10911099            printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" '.$checked.' /></div>'.$description.'</div>');
    10921100        } else{
     
    12931301
    12941302    public function getTotalState(){
     1303        global $wpdb;
     1304
    12951305        $plugin_info = get_plugin_data(dirname(__FILE__).'/wp-stacksight.php');
     1306        $plugin_info['free_space'] = trim(str_replace(' .','', shell_exec('du -hs .')));
     1307
     1308
     1309        $table = _get_meta_table('user');
     1310        $meta = $wpdb->get_row("SELECT * FROM $table WHERE meta_key = 'last_login_time' ORDER BY 'meta_value' DESC LIMIT 1 ");
     1311        if (isset($meta->meta_value)){
     1312            $meta->meta_value = maybe_unserialize( $meta->meta_value );
     1313            if(isset($meta->user_id)){
     1314                $user_info = get_userdata($meta->user_id);
     1315                $plugin_info['last_login'] = array(
     1316                    'user_id' => $meta->user_id,
     1317                    'user_login' => $user_info->user_login,
     1318                    'user_mail' => $user_info->user_email,
     1319                    'user_name' => $user_info->display_name,
     1320                    'time' => $meta->meta_value
     1321                );
     1322            }
     1323        }
     1324
     1325        $plugin_info['public'] = get_option('blog_public');
     1326        $plugin_info['url'] = get_home_url();
     1327
    12961328        return array(
    12971329            'app' => $plugin_info,
  • stacksight/trunk/readme.txt

    r1401375 r1410344  
    44Requires at least: 3.5
    55Tested up to: 4.3
    6 Stable tag: 1.9.0
     6Stable tag: 1.9.1
    77License: GPLv2 or later
    88
  • stacksight/trunk/stacksight-php-sdk/SSHttpRequest.php

    r1401375 r1410344  
    3333    public function sendLog($data) {
    3434        if((defined('STACKSIGHT_DEBUG') && STACKSIGHT_DEBUG === true) && defined('STACKSIGHT_DEBUG_MODE') && STACKSIGHT_DEBUG_MODE === true){
    35             $_SESSION['stacksight_debug']['events'] = array();
     35            $_SESSION['stacksight_debug']['logs'] = array();
    3636            $data_for_log = array(
    3737                'type' =>  $this->type,
  • stacksight/trunk/texts.php

    r1401375 r1410344  
    2121define('stacksight_inventory_text', $inventory_text);
    2222
    23 
    2423define('stacksight_events_title', 'Include Events');
    25 $events_text = !((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)) ? <<<HTML
     24if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){
     25    $events_text =  <<<HTML
    2626    <div>Watch users and application events at real time</div>
    27 HTML
    28     : <<<HTML
     27HTML;
     28} elseif(defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === false){
     29    $events_text = <<<HTML
     30            <div class="code-red">If you want events enable, please activate <strong>Activity Log plugin</strong>.</div>
     31HTML;
     32} else{
     33    $events_text = <<<HTML
    2934    <div class="code-red">If you want events enable, please install and activate <a href="https://wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div>
    3035HTML;
     36}
    3137
    3238define('stacksight_events_text', $events_text);
  • stacksight/trunk/wp-stacksight.php

    r1401375 r1410344  
    44 * Plugin URI: http://mean.io
    55 * Description: Stacksight wordpress support (featuring events, error logs and updates)
    6  * Version: 1.9.0
     6 * Version: 1.9.1
    77 * Author: Stacksight LTD
    88 * Author URI: http://stacksight.io
     
    1212defined('ABSPATH') or die("No script kiddies please!");
    1313
    14 require_once('texts.php');
    1514require_once('stacksight-php-sdk/SSUtilities.php');
    1615require_once('stacksight-php-sdk/SSClientBase.php');
     
    5756
    5857            }
    59             if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')) {
    60                 add_action('aal_insert_log', array(&$this, 'insert_log_mean'), 30);
     58            if(defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true){
     59                require_once(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php');
     60                if(function_exists('aal_insert_log')) {
     61                    add_action('aal_insert_log', array(&$this, 'insert_log_mean'), 30);
     62                }
    6163            }
    6264            add_action('stacksight_main_action', array($this, 'cron_do_main_job'));
     
    148150
    149151    public function cron_do_main_job() {
    150         if(!defined('STACKSIGHT_TOKEN'))
     152        if(!defined('STACKSIGHT_TOKEN') || !isset($this->ss_client) || !$this->ss_client)
    151153            return;
    152154
     
    399401    public function create_admin_page() {
    400402        $active_tab = isset( $_GET[ 'tab' ] ) ? $_GET[ 'tab' ] : 'general_settings';
    401         if(is_plugin_active('aryo-activity-log/aryo-activity-log.php')){
    402             define('STACKSIGHT_ACTIVE_AAL', true);
    403         }
     403        if(file_exists(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php')){
     404            if(is_plugin_active('aryo-activity-log/aryo-activity-log.php')){
     405                define('STACKSIGHT_ACTIVE_AAL', true);
     406            } else{
     407                define('STACKSIGHT_ACTIVE_AAL', false);
     408            }
     409        }
     410        require_once('texts.php');
    404411        $this->showStackMessages();
    405412        ?>
     
    10881095            $description = stacksight_events_text;
    10891096        }
    1090         if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')){
     1097
     1098        if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log') && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){
    10911099            printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" '.$checked.' /></div>'.$description.'</div>');
    10921100        } else{
     
    12931301
    12941302    public function getTotalState(){
     1303        global $wpdb;
     1304
    12951305        $plugin_info = get_plugin_data(dirname(__FILE__).'/wp-stacksight.php');
     1306        $plugin_info['free_space'] = trim(str_replace(' .','', shell_exec('du -hs .')));
     1307
     1308
     1309        $table = _get_meta_table('user');
     1310        $meta = $wpdb->get_row("SELECT * FROM $table WHERE meta_key = 'last_login_time' ORDER BY 'meta_value' DESC LIMIT 1 ");
     1311        if (isset($meta->meta_value)){
     1312            $meta->meta_value = maybe_unserialize( $meta->meta_value );
     1313            if(isset($meta->user_id)){
     1314                $user_info = get_userdata($meta->user_id);
     1315                $plugin_info['last_login'] = array(
     1316                    'user_id' => $meta->user_id,
     1317                    'user_login' => $user_info->user_login,
     1318                    'user_mail' => $user_info->user_email,
     1319                    'user_name' => $user_info->display_name,
     1320                    'time' => $meta->meta_value
     1321                );
     1322            }
     1323        }
     1324
     1325        $plugin_info['public'] = get_option('blog_public');
     1326        $plugin_info['url'] = get_home_url();
     1327
    12961328        return array(
    12971329            'app' => $plugin_info,
Note: See TracChangeset for help on using the changeset viewer.