Changeset 1410344
- Timestamp:
- 05/04/2016 01:29:43 PM (10 years ago)
- Location:
- stacksight
- Files:
-
- 2 deleted
- 4 edited
- 23 copied
-
tags/1.9.1 (copied) (copied from stacksight/trunk)
-
tags/1.9.1/assets/css/settings.css (deleted)
-
tags/1.9.1/assets/css/ss-admin.css (copied) (copied from stacksight/trunk/assets/css/ss-admin.css)
-
tags/1.9.1/assets/img (copied) (copied from stacksight/trunk/assets/img)
-
tags/1.9.1/assets/js (deleted)
-
tags/1.9.1/readme.txt (copied) (copied from stacksight/trunk/readme.txt) (1 diff)
-
tags/1.9.1/stacksight-php-sdk (copied) (copied from stacksight/trunk/stacksight-php-sdk)
-
tags/1.9.1/stacksight-php-sdk/README.md (copied) (copied from stacksight/trunk/stacksight-php-sdk/README.md)
-
tags/1.9.1/stacksight-php-sdk/SSClientBase.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSClientBase.php)
-
tags/1.9.1/stacksight-php-sdk/SSEventsMessageMapping.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSEventsMessageMapping.php)
-
tags/1.9.1/stacksight-php-sdk/SSHttpRequest.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSHttpRequest.php) (1 diff)
-
tags/1.9.1/stacksight-php-sdk/SSLogsTracker.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSLogsTracker.php)
-
tags/1.9.1/stacksight-php-sdk/SSUtilities.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSUtilities.php)
-
tags/1.9.1/stacksight-php-sdk/bootstrap-drupal-7.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/bootstrap-drupal-7.php)
-
tags/1.9.1/stacksight-php-sdk/bootstrap-drupal-8.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/bootstrap-drupal-8.php)
-
tags/1.9.1/stacksight-php-sdk/bootstrap-wp.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/bootstrap-wp.php)
-
tags/1.9.1/stacksight-php-sdk/platforms (copied) (copied from stacksight/trunk/stacksight-php-sdk/platforms)
-
tags/1.9.1/stacksight-php-sdk/requests (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests)
-
tags/1.9.1/stacksight-php-sdk/requests/SSHttpInterface.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests/SSHttpInterface.php)
-
tags/1.9.1/stacksight-php-sdk/requests/SSHttpRequestCurl.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests/SSHttpRequestCurl.php)
-
tags/1.9.1/stacksight-php-sdk/requests/SSHttpRequestMultiCurl.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests/SSHttpRequestMultiCurl.php)
-
tags/1.9.1/stacksight-php-sdk/requests/SSHttpRequestSockets.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests/SSHttpRequestSockets.php)
-
tags/1.9.1/stacksight-php-sdk/requests/SSHttpRequestThread.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests/SSHttpRequestThread.php)
-
tags/1.9.1/texts.php (copied) (copied from stacksight/trunk/texts.php) (1 diff)
-
tags/1.9.1/wp-stacksight.php (copied) (copied from stacksight/trunk/wp-stacksight.php) (7 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/stacksight-php-sdk/SSHttpRequest.php (modified) (1 diff)
-
trunk/texts.php (modified) (1 diff)
-
trunk/wp-stacksight.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stacksight/tags/1.9.1/readme.txt
r1401375 r1410344 4 4 Requires at least: 3.5 5 5 Tested up to: 4.3 6 Stable tag: 1.9. 06 Stable tag: 1.9.1 7 7 License: GPLv2 or later 8 8 -
stacksight/tags/1.9.1/stacksight-php-sdk/SSHttpRequest.php
r1401375 r1410344 33 33 public function sendLog($data) { 34 34 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(); 36 36 $data_for_log = array( 37 37 'type' => $this->type, -
stacksight/tags/1.9.1/texts.php
r1401375 r1410344 21 21 define('stacksight_inventory_text', $inventory_text); 22 22 23 24 23 define('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 24 if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){ 25 $events_text = <<<HTML 26 26 <div>Watch users and application events at real time</div> 27 HTML 28 : <<<HTML 27 HTML; 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> 31 HTML; 32 } else{ 33 $events_text = <<<HTML 29 34 <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> 30 35 HTML; 36 } 31 37 32 38 define('stacksight_events_text', $events_text); -
stacksight/tags/1.9.1/wp-stacksight.php
r1401375 r1410344 4 4 * Plugin URI: http://mean.io 5 5 * Description: Stacksight wordpress support (featuring events, error logs and updates) 6 * Version: 1.9. 06 * Version: 1.9.1 7 7 * Author: Stacksight LTD 8 8 * Author URI: http://stacksight.io … … 12 12 defined('ABSPATH') or die("No script kiddies please!"); 13 13 14 require_once('texts.php');15 14 require_once('stacksight-php-sdk/SSUtilities.php'); 16 15 require_once('stacksight-php-sdk/SSClientBase.php'); … … 57 56 58 57 } 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 } 61 63 } 62 64 add_action('stacksight_main_action', array($this, 'cron_do_main_job')); … … 148 150 149 151 public function cron_do_main_job() { 150 if(!defined('STACKSIGHT_TOKEN') )152 if(!defined('STACKSIGHT_TOKEN') || !isset($this->ss_client) || !$this->ss_client) 151 153 return; 152 154 … … 399 401 public function create_admin_page() { 400 402 $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'); 404 411 $this->showStackMessages(); 405 412 ?> … … 1088 1095 $description = stacksight_events_text; 1089 1096 } 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)){ 1091 1099 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>'); 1092 1100 } else{ … … 1293 1301 1294 1302 public function getTotalState(){ 1303 global $wpdb; 1304 1295 1305 $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 1296 1328 return array( 1297 1329 'app' => $plugin_info, -
stacksight/trunk/readme.txt
r1401375 r1410344 4 4 Requires at least: 3.5 5 5 Tested up to: 4.3 6 Stable tag: 1.9. 06 Stable tag: 1.9.1 7 7 License: GPLv2 or later 8 8 -
stacksight/trunk/stacksight-php-sdk/SSHttpRequest.php
r1401375 r1410344 33 33 public function sendLog($data) { 34 34 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(); 36 36 $data_for_log = array( 37 37 'type' => $this->type, -
stacksight/trunk/texts.php
r1401375 r1410344 21 21 define('stacksight_inventory_text', $inventory_text); 22 22 23 24 23 define('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 24 if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && (defined('STACKSIGHT_ACTIVE_AAL') && STACKSIGHT_ACTIVE_AAL === true)){ 25 $events_text = <<<HTML 26 26 <div>Watch users and application events at real time</div> 27 HTML 28 : <<<HTML 27 HTML; 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> 31 HTML; 32 } else{ 33 $events_text = <<<HTML 29 34 <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> 30 35 HTML; 36 } 31 37 32 38 define('stacksight_events_text', $events_text); -
stacksight/trunk/wp-stacksight.php
r1401375 r1410344 4 4 * Plugin URI: http://mean.io 5 5 * Description: Stacksight wordpress support (featuring events, error logs and updates) 6 * Version: 1.9. 06 * Version: 1.9.1 7 7 * Author: Stacksight LTD 8 8 * Author URI: http://stacksight.io … … 12 12 defined('ABSPATH') or die("No script kiddies please!"); 13 13 14 require_once('texts.php');15 14 require_once('stacksight-php-sdk/SSUtilities.php'); 16 15 require_once('stacksight-php-sdk/SSClientBase.php'); … … 57 56 58 57 } 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 } 61 63 } 62 64 add_action('stacksight_main_action', array($this, 'cron_do_main_job')); … … 148 150 149 151 public function cron_do_main_job() { 150 if(!defined('STACKSIGHT_TOKEN') )152 if(!defined('STACKSIGHT_TOKEN') || !isset($this->ss_client) || !$this->ss_client) 151 153 return; 152 154 … … 399 401 public function create_admin_page() { 400 402 $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'); 404 411 $this->showStackMessages(); 405 412 ?> … … 1088 1095 $description = stacksight_events_text; 1089 1096 } 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)){ 1091 1099 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>'); 1092 1100 } else{ … … 1293 1301 1294 1302 public function getTotalState(){ 1303 global $wpdb; 1304 1295 1305 $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 1296 1328 return array( 1297 1329 'app' => $plugin_info,
Note: See TracChangeset
for help on using the changeset viewer.