Plugin Directory

Changeset 1971312


Ignore:
Timestamp:
11/09/2018 05:01:08 AM (7 years ago)
Author:
think201
Message:

latest Update

Location:
echoza/trunk/includes/classes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • echoza/trunk/includes/classes/echoza-handler.php

    r1970351 r1971312  
    5656        $body['type'] = 'error';
    5757
     58        $body['priority'] = 'medium';
     59
    5860        return $body;
    5961    }
  • echoza/trunk/includes/classes/echoza.php

    r1970351 r1971312  
    44class Echoza {
    55
    6     public static function error($title, $custom_data = [], $echo_slug = 'error') {
     6    private $UserDetails;
     7
     8    public static function setUser($data) {
     9
     10        $this->UserDetails = $data;
     11    }
     12
     13    public static function error($title, $customdata = [], $echo_slug = 'error', $priority = 'high') {
    714
    815        $body = [];
     
    1825        $body['type'] = 'error';
    1926
     27        $body['priority'] = $priority;
     28
     29        $body['user'] = $this->UserDetails;
     30
    2031        EchozaHandler::sendData($body);
     32
     33        $this->UserDetails = NULL;
    2134    }
    2235
    23     public static function info($title, $custom_data = [], $echo_slug = 'info') {
     36    public static function info($title, $customdata = [], $echo_slug = 'info', $priority = 'medium') {
    2437
    2538        $body = [];
     
    3548        $body['type'] = 'info';
    3649
     50        $body['priority'] = $priority;
     51
     52        $body['user'] = $this->UserDetails;
     53
    3754        EchozaHandler::sendData($body);
     55
     56        $this->UserDetails = NULL;
    3857    }
    3958
     
    5776        $body['type'] = "exception";
    5877
    59         var_dump($body);
     78        $body['priority'] = 'high';
     79
     80        $body['user'] = $this->UserDetails;
    6081
    6182        EchozaHandler::sendData($body);
     83
     84        $this->UserDetails = NULL;
    6285    }
    6386
     
    80103        $body['type'] = 'error';
    81104
     105        $body['priority'] = 'high';
     106
     107        $body['user'] = $this->UserDetails;
     108
    82109        EchozaHandler::sendData($body);
     110
     111        $this->UserDetails = NULL;
    83112    }
    84113
Note: See TracChangeset for help on using the changeset viewer.