Changeset 1381898
- Timestamp:
- 03/30/2016 11:51:34 AM (10 years ago)
- Location:
- stacksight
- Files:
-
- 2 deleted
- 6 edited
- 15 copied
-
tags/1.8.4 (copied) (copied from stacksight/trunk)
-
tags/1.8.4/assets/css/settings.css (deleted)
-
tags/1.8.4/assets/img (copied) (copied from stacksight/trunk/assets/img)
-
tags/1.8.4/assets/js (deleted)
-
tags/1.8.4/readme.txt (copied) (copied from stacksight/trunk/readme.txt) (1 diff)
-
tags/1.8.4/stacksight-php-sdk (copied) (copied from stacksight/trunk/stacksight-php-sdk)
-
tags/1.8.4/stacksight-php-sdk/README.md (copied) (copied from stacksight/trunk/stacksight-php-sdk/README.md)
-
tags/1.8.4/stacksight-php-sdk/SSClientBase.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSClientBase.php)
-
tags/1.8.4/stacksight-php-sdk/SSEventsMessageMapping.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSEventsMessageMapping.php)
-
tags/1.8.4/stacksight-php-sdk/SSHttpRequest.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSHttpRequest.php)
-
tags/1.8.4/stacksight-php-sdk/SSLogsTracker.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSLogsTracker.php)
-
tags/1.8.4/stacksight-php-sdk/SSUtilities.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/SSUtilities.php)
-
tags/1.8.4/stacksight-php-sdk/bootstrap-drupal-8.php (modified) (1 diff)
-
tags/1.8.4/stacksight-php-sdk/bootstrap-wp.php (copied) (copied from stacksight/trunk/stacksight-php-sdk/bootstrap-wp.php) (1 diff)
-
tags/1.8.4/stacksight-php-sdk/platforms (copied) (copied from stacksight/trunk/stacksight-php-sdk/platforms)
-
tags/1.8.4/stacksight-php-sdk/requests (copied) (copied from stacksight/trunk/stacksight-php-sdk/requests)
-
tags/1.8.4/texts.php (copied) (copied from stacksight/trunk/texts.php) (1 diff)
-
tags/1.8.4/wp-stacksight.php (copied) (copied from stacksight/trunk/wp-stacksight.php) (2 diffs)
-
trunk/readme.txt (modified) (1 diff)
-
trunk/stacksight-php-sdk/bootstrap-drupal-8.php (modified) (1 diff)
-
trunk/stacksight-php-sdk/bootstrap-wp.php (modified) (1 diff)
-
trunk/texts.php (modified) (1 diff)
-
trunk/wp-stacksight.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
stacksight/tags/1.8.4/readme.txt
r1381865 r1381898 4 4 Requires at least: 3.5 5 5 Tested up to: 4.3 6 Stable tag: 1.8. 36 Stable tag: 1.8.4 7 7 License: GPLv2 or later 8 8 -
stacksight/tags/1.8.4/stacksight-php-sdk/bootstrap-drupal-8.php
r1375098 r1381898 12 12 require_once('platforms/SSDrupalClient.php'); 13 13 14 use Drupal\Core\Database\Database; 15 14 16 global $ss_client; 15 if(defined('STACKSIGHT_TOKEN')){ 16 if(defined('STACKSIGHT_APP_ID')) 17 $ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL, STACKSIGHT_APP_ID); 18 else 19 $ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL); 20 $handle_errors = FALSE; 21 $handle_fatal_errors = TRUE; 22 if(defined('STACKSIGHT_INCLUDE_LOGS') && STACKSIGHT_INCLUDE_LOGS === true){ 23 new SSLogsTracker($ss_client, $handle_errors, $handle_fatal_errors); 17 18 class DrupalBootstrap 19 { 20 public $options = array( 21 'stacksight.features', 22 'stacksight.settings' 23 ); 24 private $ready = false; 25 private $connection; 26 private $data_options = array(); 27 28 protected $ss_client; 29 30 protected $database; 31 32 private $root; 33 34 public function __construct($database){ 35 global $ss_client; 36 $this->root = dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)))); 37 require_once DRUPAL_ROOT . '/core/includes/database.inc'; 38 Database::setMultipleConnectionInfo($database); 39 $this->connection = Database::getConnection(); 40 $this->ss_client =& $ss_client; 41 $this->database = $database; 42 43 $query = db_select('config', 'n')->fields('n')->condition('name',$this->options, 'IN'); 44 $result = $query->execute(); 45 if($result && is_object($result)){ 46 foreach($result as $key => $row){ 47 $values = unserialize($row->data); 48 foreach($values[key($values)] as $value_key => $value){ 49 $this->data_options[$value_key] = $value; 50 } 51 } 52 if (isset($this->data_options['token'])) { 53 $this->ready = true; 54 } 55 } 24 56 } 25 define('STACKSIGHT_BOOTSTRAPED', TRUE); 57 58 public function init(){ 59 if ($this->ready == true && !empty($this->data_options)) { 60 if(is_array($this->data_options)){ 61 foreach($this->data_options as $key => $option_object){ 62 $option = (isset($option_object) && !empty($option_object)) ? $option_object : false; 63 switch($key){ 64 case 'app_id': 65 if (!defined('STACKSIGHT_APP_ID') && $option) { 66 define('STACKSIGHT_APP_ID', $option); 67 } 68 break; 69 case 'token': 70 if (!defined('STACKSIGHT_TOKEN') && $option) { 71 define('STACKSIGHT_TOKEN', $option); 72 } 73 break; 74 case 'group': 75 if (!defined('STACKSIGHT_GROUP') && $option) { 76 define('STACKSIGHT_GROUP', $option); 77 } 78 break; 79 case 'include_logs': 80 if (!defined('STACKSIGHT_INCLUDE_LOGS') && $option) { 81 define('STACKSIGHT_INCLUDE_LOGS', $option); 82 } 83 break; 84 case 'include_health': 85 if (!defined('STACKSIGHT_INCLUDE_HEALTH')) { 86 if ($option == true) { 87 define('STACKSIGHT_INCLUDE_HEALTH', true); 88 } 89 } 90 break; 91 case 'include_inventory': 92 if (!defined('STACKSIGHT_INCLUDE_INVENTORY')) { 93 if ($option == true) { 94 define('STACKSIGHT_INCLUDE_INVENTORY', true); 95 } 96 } 97 break; 98 case 'include_events': 99 if (!defined('STACKSIGHT_INCLUDE_EVENTS')) { 100 if ($option == true) { 101 define('STACKSIGHT_INCLUDE_EVENTS', true); 102 } 103 } 104 break; 105 case 'include_updates': 106 if (!defined('STACKSIGHT_INCLUDE_UPDATES')) { 107 if ($option == true) { 108 define('STACKSIGHT_INCLUDE_UPDATES', true); 109 } 110 } 111 break; 112 } 113 } 114 } 115 116 if(defined('STACKSIGHT_TOKEN')){ 117 if(defined('STACKSIGHT_APP_ID')) 118 $this->ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL, STACKSIGHT_APP_ID); 119 else 120 $this->ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL); 121 122 $handle_errors = FALSE; 123 $handle_fatal_errors = TRUE; 124 if(defined('STACKSIGHT_INCLUDE_LOGS') && STACKSIGHT_INCLUDE_LOGS == true){ 125 new SSLogsTracker($this->ss_client, $handle_errors, $handle_fatal_errors); 126 } 127 define('STACKSIGHT_BOOTSTRAPED', TRUE); 128 } 129 } 130 } 26 131 } 132 133 $wp_stacksight = new DrupalBootstrap($databases); 134 $wp_stacksight->init(); -
stacksight/tags/1.8.4/stacksight-php-sdk/bootstrap-wp.php
r1381865 r1381898 44 44 } 45 45 } 46 } 47 if(file_exists(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php')){ 48 define('STACKSIGHT_DEPENDENCY_AAL', true); 49 } else{ 50 // AAL doesn't exist 51 define('STACKSIGHT_DEPENDENCY_AAL', false); 46 52 } 47 53 define('STACKSIGHT_PHP_SDK_INCLUDE', true); -
stacksight/tags/1.8.4/texts.php
r1381865 r1381898 28 28 : 29 29 <<<HTML 30 <div class="code-red">If you want events enable, please install <a href="https:// ru.wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div>30 <div class="code-red">If you want events enable, please install <a href="https://wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div> 31 31 HTML; 32 32 ; -
stacksight/tags/1.8.4/wp-stacksight.php
r1381865 r1381898 4 4 * Plugin URI: http://mean.io 5 5 * Description: Stacksight wordpress support (featuring events, error logs and updates) 6 * Version: 1.8. 36 * Version: 1.8.4 7 7 * Author: Stacksight LTD 8 8 * Author URI: http://stacksight.io … … 817 817 } 818 818 if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')){ 819 printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" '.$checked.' disabled/></div>'.$description.'</div>'); 820 819 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>'); 821 820 } else{ 822 821 printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" disabled/></div>'.$description.'</div>'); -
stacksight/trunk/readme.txt
r1381865 r1381898 4 4 Requires at least: 3.5 5 5 Tested up to: 4.3 6 Stable tag: 1.8. 36 Stable tag: 1.8.4 7 7 License: GPLv2 or later 8 8 -
stacksight/trunk/stacksight-php-sdk/bootstrap-drupal-8.php
r1375098 r1381898 12 12 require_once('platforms/SSDrupalClient.php'); 13 13 14 use Drupal\Core\Database\Database; 15 14 16 global $ss_client; 15 if(defined('STACKSIGHT_TOKEN')){ 16 if(defined('STACKSIGHT_APP_ID')) 17 $ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL, STACKSIGHT_APP_ID); 18 else 19 $ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL); 20 $handle_errors = FALSE; 21 $handle_fatal_errors = TRUE; 22 if(defined('STACKSIGHT_INCLUDE_LOGS') && STACKSIGHT_INCLUDE_LOGS === true){ 23 new SSLogsTracker($ss_client, $handle_errors, $handle_fatal_errors); 17 18 class DrupalBootstrap 19 { 20 public $options = array( 21 'stacksight.features', 22 'stacksight.settings' 23 ); 24 private $ready = false; 25 private $connection; 26 private $data_options = array(); 27 28 protected $ss_client; 29 30 protected $database; 31 32 private $root; 33 34 public function __construct($database){ 35 global $ss_client; 36 $this->root = dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__)))); 37 require_once DRUPAL_ROOT . '/core/includes/database.inc'; 38 Database::setMultipleConnectionInfo($database); 39 $this->connection = Database::getConnection(); 40 $this->ss_client =& $ss_client; 41 $this->database = $database; 42 43 $query = db_select('config', 'n')->fields('n')->condition('name',$this->options, 'IN'); 44 $result = $query->execute(); 45 if($result && is_object($result)){ 46 foreach($result as $key => $row){ 47 $values = unserialize($row->data); 48 foreach($values[key($values)] as $value_key => $value){ 49 $this->data_options[$value_key] = $value; 50 } 51 } 52 if (isset($this->data_options['token'])) { 53 $this->ready = true; 54 } 55 } 24 56 } 25 define('STACKSIGHT_BOOTSTRAPED', TRUE); 57 58 public function init(){ 59 if ($this->ready == true && !empty($this->data_options)) { 60 if(is_array($this->data_options)){ 61 foreach($this->data_options as $key => $option_object){ 62 $option = (isset($option_object) && !empty($option_object)) ? $option_object : false; 63 switch($key){ 64 case 'app_id': 65 if (!defined('STACKSIGHT_APP_ID') && $option) { 66 define('STACKSIGHT_APP_ID', $option); 67 } 68 break; 69 case 'token': 70 if (!defined('STACKSIGHT_TOKEN') && $option) { 71 define('STACKSIGHT_TOKEN', $option); 72 } 73 break; 74 case 'group': 75 if (!defined('STACKSIGHT_GROUP') && $option) { 76 define('STACKSIGHT_GROUP', $option); 77 } 78 break; 79 case 'include_logs': 80 if (!defined('STACKSIGHT_INCLUDE_LOGS') && $option) { 81 define('STACKSIGHT_INCLUDE_LOGS', $option); 82 } 83 break; 84 case 'include_health': 85 if (!defined('STACKSIGHT_INCLUDE_HEALTH')) { 86 if ($option == true) { 87 define('STACKSIGHT_INCLUDE_HEALTH', true); 88 } 89 } 90 break; 91 case 'include_inventory': 92 if (!defined('STACKSIGHT_INCLUDE_INVENTORY')) { 93 if ($option == true) { 94 define('STACKSIGHT_INCLUDE_INVENTORY', true); 95 } 96 } 97 break; 98 case 'include_events': 99 if (!defined('STACKSIGHT_INCLUDE_EVENTS')) { 100 if ($option == true) { 101 define('STACKSIGHT_INCLUDE_EVENTS', true); 102 } 103 } 104 break; 105 case 'include_updates': 106 if (!defined('STACKSIGHT_INCLUDE_UPDATES')) { 107 if ($option == true) { 108 define('STACKSIGHT_INCLUDE_UPDATES', true); 109 } 110 } 111 break; 112 } 113 } 114 } 115 116 if(defined('STACKSIGHT_TOKEN')){ 117 if(defined('STACKSIGHT_APP_ID')) 118 $this->ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL, STACKSIGHT_APP_ID); 119 else 120 $this->ss_client = new SSDrupalClient(STACKSIGHT_TOKEN, SSClientBase::PLATFORM_DRUPAL); 121 122 $handle_errors = FALSE; 123 $handle_fatal_errors = TRUE; 124 if(defined('STACKSIGHT_INCLUDE_LOGS') && STACKSIGHT_INCLUDE_LOGS == true){ 125 new SSLogsTracker($this->ss_client, $handle_errors, $handle_fatal_errors); 126 } 127 define('STACKSIGHT_BOOTSTRAPED', TRUE); 128 } 129 } 130 } 26 131 } 132 133 $wp_stacksight = new DrupalBootstrap($databases); 134 $wp_stacksight->init(); -
stacksight/trunk/stacksight-php-sdk/bootstrap-wp.php
r1381865 r1381898 44 44 } 45 45 } 46 } 47 if(file_exists(ABSPATH .'wp-content/plugins/aryo-activity-log/aryo-activity-log.php')){ 48 define('STACKSIGHT_DEPENDENCY_AAL', true); 49 } else{ 50 // AAL doesn't exist 51 define('STACKSIGHT_DEPENDENCY_AAL', false); 46 52 } 47 53 define('STACKSIGHT_PHP_SDK_INCLUDE', true); -
stacksight/trunk/texts.php
r1381865 r1381898 28 28 : 29 29 <<<HTML 30 <div class="code-red">If you want events enable, please install <a href="https:// ru.wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div>30 <div class="code-red">If you want events enable, please install <a href="https://wordpress.org/plugins/aryo-activity-log/" target="_blank">Activity Log plugin</a>.</div> 31 31 HTML; 32 32 ; -
stacksight/trunk/wp-stacksight.php
r1381865 r1381898 4 4 * Plugin URI: http://mean.io 5 5 * Description: Stacksight wordpress support (featuring events, error logs and updates) 6 * Version: 1.8. 36 * Version: 1.8.4 7 7 * Author: Stacksight LTD 8 8 * Author URI: http://stacksight.io … … 817 817 } 818 818 if((defined('STACKSIGHT_DEPENDENCY_AAL') && STACKSIGHT_DEPENDENCY_AAL === true) && function_exists('aal_insert_log')){ 819 printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" '.$checked.' disabled/></div>'.$description.'</div>'); 820 819 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>'); 821 820 } else{ 822 821 printf('<div class="health_features_option"><div class="checkbox"><input type="checkbox" name="stacksight_opt_features[include_events]" id="enable_features_events" disabled/></div>'.$description.'</div>');
Note: See TracChangeset
for help on using the changeset viewer.