Plugin Directory

Changeset 2295516


Ignore:
Timestamp:
04/30/2020 04:08:57 PM (6 years ago)
Author:
Will Brownsberger
Message:

4.5.3.8

Location:
wp-issues-crm
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • wp-issues-crm/tags/4.5.3.8/php/db/class-wic-db-email-message-object.php

    r2170600 r2295516  
    6363    public $subject             = '';   // The message subject
    6464    public $message_id          = '';   // Unique identifier (permanent unique identifier -- retained only for research purposes)
     65    // key value header array for use only by locally-defined tab functions
     66    public $internet_headers;
    6567    // structure parts accessed through imap body fetch functions
    6668    protected $text_body;       // stripped for parsing -- prefer to generate from raw text body but can strip from raw html body
     
    9395        $header = false;
    9496        $header = @imap_fetchheader ( $IMAP_stream, $UID, FT_UID );
     97
    9598        if ( ! $header ) {
    9699            $this->uid_still_valid = false;
    97100            return;     
    98101        }
     102       
     103        $this->internet_headers = self::convert_internet_headers_to_key_value_array ( $header );
    99104        self::populate_header_info( imap_rfc822_parse_headers( $header ) );
    100105        /*
     
    234239    *
    235240    */
    236     protected function populate_header_info ( $imap_headerinfo ) {
     241    protected function populate_header_info ( $imap_headerinfo ) { 
    237242   
    238243        // load properties from header info -- note that all the non-address fields can be encoded, so decode them all
     
    11731178    }
    11741179   
     1180    private  function convert_internet_headers_to_key_value_array( $raw_header ) {
     1181   
     1182        $unfolded_header = preg_replace( '#\r\n( |\t)+#', ' ', $raw_header);
     1183        $header_array = preg_split ( '#\r\n#', $unfolded_header );
     1184        $header_key_value = array();
     1185        foreach ( $header_array as $header ) {
     1186            $key_value = preg_split ('#:( |\t)*#', $header, 2);
     1187            if ( isset ( $key_value[0] ) && isset ( $key_value[1] ) ) {
     1188                $header_key_value[$key_value[0]] = trim($key_value[1]);
     1189            }
     1190        }
     1191        return $header_key_value;
     1192     }
     1193   
    11751194} // class
  • wp-issues-crm/tags/4.5.3.8/readme.txt

    r2291658 r2295516  
    44Tags: contact, crm, constituent, customer, issues, list, email, forms, database, upload
    55Requires at least: 5
    6 Tested up to: 5.4
    7 Stable tag: 4.5.3.7
     6Tested up to: 5.4.1
     7Stable tag: 4.5.3.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.8 =
     111* Add internet headers to standard stored email object (make available for add-on local spam processing)
    110112= 4.5.3.7 =
    111113* Fix bug -- vestigial assignment of case on send of email
  • wp-issues-crm/tags/4.5.3.8/wp-issues-crm.php

    r2190225 r2295516  
    3939// set database version global;
    4040global $wp_issues_crm_db_version;
    41 $wp_issues_crm_db_version = '4.5.3.7';
     41$wp_issues_crm_db_version = '4.5.3.8';
    4242/*
    4343* set js_css version global -- three possibilities:
     
    4848*/
    4949global $wp_issues_crm_js_css_version;
    50 $wp_issues_crm_js_css_version = '4.5.3.7'; // may or not be set at release time
     50$wp_issues_crm_js_css_version = '4.5.3.8'; // may or not be set at release time
    5151if ( '' == $wp_issues_crm_js_css_version ) {
    5252    if ( strpos ( site_url(), 'localhost' ) > 0 ) {
  • wp-issues-crm/trunk/php/db/class-wic-db-email-message-object.php

    r2170600 r2295516  
    6363    public $subject             = '';   // The message subject
    6464    public $message_id          = '';   // Unique identifier (permanent unique identifier -- retained only for research purposes)
     65    // key value header array for use only by locally-defined tab functions
     66    public $internet_headers;
    6567    // structure parts accessed through imap body fetch functions
    6668    protected $text_body;       // stripped for parsing -- prefer to generate from raw text body but can strip from raw html body
     
    9395        $header = false;
    9496        $header = @imap_fetchheader ( $IMAP_stream, $UID, FT_UID );
     97
    9598        if ( ! $header ) {
    9699            $this->uid_still_valid = false;
    97100            return;     
    98101        }
     102       
     103        $this->internet_headers = self::convert_internet_headers_to_key_value_array ( $header );
    99104        self::populate_header_info( imap_rfc822_parse_headers( $header ) );
    100105        /*
     
    234239    *
    235240    */
    236     protected function populate_header_info ( $imap_headerinfo ) {
     241    protected function populate_header_info ( $imap_headerinfo ) { 
    237242   
    238243        // load properties from header info -- note that all the non-address fields can be encoded, so decode them all
     
    11731178    }
    11741179   
     1180    private  function convert_internet_headers_to_key_value_array( $raw_header ) {
     1181   
     1182        $unfolded_header = preg_replace( '#\r\n( |\t)+#', ' ', $raw_header);
     1183        $header_array = preg_split ( '#\r\n#', $unfolded_header );
     1184        $header_key_value = array();
     1185        foreach ( $header_array as $header ) {
     1186            $key_value = preg_split ('#:( |\t)*#', $header, 2);
     1187            if ( isset ( $key_value[0] ) && isset ( $key_value[1] ) ) {
     1188                $header_key_value[$key_value[0]] = trim($key_value[1]);
     1189            }
     1190        }
     1191        return $header_key_value;
     1192     }
     1193   
    11751194} // class
  • wp-issues-crm/trunk/readme.txt

    r2291658 r2295516  
    44Tags: contact, crm, constituent, customer, issues, list, email, forms, database, upload
    55Requires at least: 5
    6 Tested up to: 5.4
    7 Stable tag: 4.5.3.7
     6Tested up to: 5.4.1
     7Stable tag: 4.5.3.8
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.8 =
     111* Add internet headers to standard stored email object (make available for add-on local spam processing)
    110112= 4.5.3.7 =
    111113* Fix bug -- vestigial assignment of case on send of email
  • wp-issues-crm/trunk/wp-issues-crm.php

    r2190225 r2295516  
    3939// set database version global;
    4040global $wp_issues_crm_db_version;
    41 $wp_issues_crm_db_version = '4.5.3.7';
     41$wp_issues_crm_db_version = '4.5.3.8';
    4242/*
    4343* set js_css version global -- three possibilities:
     
    4848*/
    4949global $wp_issues_crm_js_css_version;
    50 $wp_issues_crm_js_css_version = '4.5.3.7'; // may or not be set at release time
     50$wp_issues_crm_js_css_version = '4.5.3.8'; // may or not be set at release time
    5151if ( '' == $wp_issues_crm_js_css_version ) {
    5252    if ( strpos ( site_url(), 'localhost' ) > 0 ) {
Note: See TracChangeset for help on using the changeset viewer.