Plugin Directory

Changeset 1381898


Ignore:
Timestamp:
03/30/2016 11:51:34 AM (10 years ago)
Author:
igor-lemon
Message:

tagging version 1.8.4

Location:
stacksight
Files:
2 deleted
6 edited
15 copied

Legend:

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

    r1381865 r1381898  
    44Requires at least: 3.5
    55Tested up to: 4.3
    6 Stable tag: 1.8.3
     6Stable tag: 1.8.4
    77License: GPLv2 or later
    88
  • stacksight/tags/1.8.4/stacksight-php-sdk/bootstrap-drupal-8.php

    r1375098 r1381898  
    1212require_once('platforms/SSDrupalClient.php');
    1313
     14use Drupal\Core\Database\Database;
     15
    1416global $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
     18class 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        }
    2456    }
    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    }
    26131}
     132
     133$wp_stacksight = new DrupalBootstrap($databases);
     134$wp_stacksight->init();
  • stacksight/tags/1.8.4/stacksight-php-sdk/bootstrap-wp.php

    r1381865 r1381898  
    4444                }
    4545            }
     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);
    4652        }
    4753        define('STACKSIGHT_PHP_SDK_INCLUDE', true);
  • stacksight/tags/1.8.4/texts.php

    r1381865 r1381898  
    2828:
    2929<<<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>
    3131HTML;
    3232;
  • stacksight/tags/1.8.4/wp-stacksight.php

    r1381865 r1381898  
    44 * Plugin URI: http://mean.io
    55 * Description: Stacksight wordpress support (featuring events, error logs and updates)
    6  * Version: 1.8.3
     6 * Version: 1.8.4
    77 * Author: Stacksight LTD
    88 * Author URI: http://stacksight.io
     
    817817        }
    818818        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>');
    821820        } else{
    822821            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  
    44Requires at least: 3.5
    55Tested up to: 4.3
    6 Stable tag: 1.8.3
     6Stable tag: 1.8.4
    77License: GPLv2 or later
    88
  • stacksight/trunk/stacksight-php-sdk/bootstrap-drupal-8.php

    r1375098 r1381898  
    1212require_once('platforms/SSDrupalClient.php');
    1313
     14use Drupal\Core\Database\Database;
     15
    1416global $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
     18class 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        }
    2456    }
    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    }
    26131}
     132
     133$wp_stacksight = new DrupalBootstrap($databases);
     134$wp_stacksight->init();
  • stacksight/trunk/stacksight-php-sdk/bootstrap-wp.php

    r1381865 r1381898  
    4444                }
    4545            }
     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);
    4652        }
    4753        define('STACKSIGHT_PHP_SDK_INCLUDE', true);
  • stacksight/trunk/texts.php

    r1381865 r1381898  
    2828:
    2929<<<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>
    3131HTML;
    3232;
  • stacksight/trunk/wp-stacksight.php

    r1381865 r1381898  
    44 * Plugin URI: http://mean.io
    55 * Description: Stacksight wordpress support (featuring events, error logs and updates)
    6  * Version: 1.8.3
     6 * Version: 1.8.4
    77 * Author: Stacksight LTD
    88 * Author URI: http://stacksight.io
     
    817817        }
    818818        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>');
    821820        } else{
    822821            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.