Plugin Directory

Changeset 2296854


Ignore:
Timestamp:
05/02/2020 10:40:58 PM (6 years ago)
Author:
Will Brownsberger
Message:

4.5.3.9

Location:
wp-issues-crm
Files:
7 edited
4 copied

Legend:

Unmodified
Added
Removed
  • wp-issues-crm/tags/4.5.3.9/php/db/class-wic-db-address-block-object.php

    r1948828 r2296854  
    375375        $non_names              = $this->form_variables_object->non_names;
    376376
     377        // strip parenthetic expressions
     378        $name_line = preg_replace( '#\s*\([\s\w,.]*\)\s*#u', '', $name_line );
     379
    377380        // make sure line as no padding
    378381        $name_line = trim ( $name_line, ',. ');
  • wp-issues-crm/tags/4.5.3.9/php/db/class-wic-db-email-message-object.php

    r2295516 r2296854  
    457457        *
    458458        */
    459         $block_array = preg_split ( '# *\v *\v\s*#', $this->text_body, NULL, PREG_SPLIT_NO_EMPTY );
     459        $block_array = preg_split ( '#\h*\v\h*\v\s*#', $this->text_body, NULL, PREG_SPLIT_NO_EMPTY );
    460460        $address_block_object_array = array();
    461461        $non_address_block_array = array();
  • wp-issues-crm/tags/4.5.3.9/php/entity/class-wic-entity-email-message.php

    r2146005 r2296854  
    127127            * return all to client
    128128            *
    129             */
     129            */
     130
    130131            $response = (object) array (
    131132                'assigned_constituent_display'  => $message->assigned_constituent ? self::get_constituent_title ($message->assigned_constituent) : '',
     
    201202        $used_addresses = array();
    202203        $wic_option_array = get_option('wp_issues_crm_plugin_options_array');
    203         $my_mails = array ( $wic_option_array['user_name_for_email_imap_interface'], $wic_option_array['from_email'], $wic_option_array['smtp_reply'] );   
    204    
     204        $my_mails = array (
     205            isset( $wic_option_array['user_name_for_email_imap_interface'] ) ?  strtolower($wic_option_array['user_name_for_email_imap_interface']) : 'no_user_name_for_email_imap_interface',
     206            isset( $wic_option_array['from_email'] ) ?  strtolower($wic_option_array['from_email']) : 'no_from_email',
     207            isset( $wic_option_array['smtp_reply'] ) ?  strtolower($wic_option_array['smtp_reply']) : 'no_smtp_reply',
     208            isset( $wic_option_array['activesync_email_address'] ) ?  strtolower($wic_option_array['activesync_email_address']) : 'no_activesync_email_address',
     209        ); 
     210
    205211        foreach ( $to_array as $to_address ) {
    206             if ( !in_array ( $to_address[1], $used_addresses ) &&  !in_array ( $to_address[1], $my_mails) ) {
     212            if ( !in_array ( $to_address[1], $used_addresses ) &&  !in_array ( strtolower($to_address[1]), $my_mails) ) {
     213                $to_address[0] = self::clean_name( $to_address[0]);
    207214                array_push ( $merged_clean_array, $to_address );
    208215            }
     
    210217        }
    211218   
    212         foreach ( $cc_array as $cc_address ) {
    213             if ( !in_array ( $cc_address[1], $used_addresses ) &&  !in_array ( $cc_address[1], $my_mails) ) {
     219        foreach ( $cc_array as $cc_address ) {
     220            if ( !in_array ( $cc_address[1], $used_addresses ) &&  !in_array ( strtolower($cc_address[1]), $my_mails) ) {
     221                $cc_address[0] = self::clean_name( $cc_address[0]);
    214222                array_push ( $merged_clean_array, $cc_address );
    215223            }
    216224            array_push( $used_addresses, $cc_address[1] );
    217225        }
    218    
    219226        return $merged_clean_array;
    220227    }
    221228
    222 
    223    
     229   
     230    private static function clean_name ( $name_line ) {
     231        $working_block_object = new WIC_DB_Address_Block_Object;
     232        $name_array = $working_block_object->parse_name( $name_line );
     233        $clean_name = trim ( $name_array['first'] . ' ' . $name_array['middle'] . ( $name_array['middle'] ? ' ' : '') . $name_array['last'] );
     234        return $clean_name;
     235    }
    224236    /*
    225237    *
     
    405417            ;
    406418        $sender_display_line = $sender_display_line ? $sender_display_line :
     419            (
    407420            isset ( $message->from_personal ) ?
    408421                (
     
    412425                ) :
    413426                ''
     427            )
    414428            ;
    415429        return $sender_display_line;
  • wp-issues-crm/tags/4.5.3.9/readme.txt

    r2295516 r2296854  
    55Requires at least: 5
    66Tested up to: 5.4.1
    7 Stable tag: 4.5.3.8
     7Stable tag: 4.5.3.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.9 =
     111* Clean up to/reply names before offering to client for email reply use
    110112= 4.5.3.8 =
    111113* Add internet headers to standard stored email object (make available for add-on local spam processing)
  • wp-issues-crm/tags/4.5.3.9/wp-issues-crm.php

    r2295520 r2296854  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.3.8
     6 * Version: 4.5.3.9
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
  • wp-issues-crm/trunk/php/db/class-wic-db-address-block-object.php

    r1948828 r2296854  
    375375        $non_names              = $this->form_variables_object->non_names;
    376376
     377        // strip parenthetic expressions
     378        $name_line = preg_replace( '#\s*\([\s\w,.]*\)\s*#u', '', $name_line );
     379
    377380        // make sure line as no padding
    378381        $name_line = trim ( $name_line, ',. ');
  • wp-issues-crm/trunk/php/db/class-wic-db-email-message-object.php

    r2295516 r2296854  
    457457        *
    458458        */
    459         $block_array = preg_split ( '# *\v *\v\s*#', $this->text_body, NULL, PREG_SPLIT_NO_EMPTY );
     459        $block_array = preg_split ( '#\h*\v\h*\v\s*#', $this->text_body, NULL, PREG_SPLIT_NO_EMPTY );
    460460        $address_block_object_array = array();
    461461        $non_address_block_array = array();
  • wp-issues-crm/trunk/php/entity/class-wic-entity-email-message.php

    r2146005 r2296854  
    127127            * return all to client
    128128            *
    129             */
     129            */
     130
    130131            $response = (object) array (
    131132                'assigned_constituent_display'  => $message->assigned_constituent ? self::get_constituent_title ($message->assigned_constituent) : '',
     
    201202        $used_addresses = array();
    202203        $wic_option_array = get_option('wp_issues_crm_plugin_options_array');
    203         $my_mails = array ( $wic_option_array['user_name_for_email_imap_interface'], $wic_option_array['from_email'], $wic_option_array['smtp_reply'] );   
    204    
     204        $my_mails = array (
     205            isset( $wic_option_array['user_name_for_email_imap_interface'] ) ?  strtolower($wic_option_array['user_name_for_email_imap_interface']) : 'no_user_name_for_email_imap_interface',
     206            isset( $wic_option_array['from_email'] ) ?  strtolower($wic_option_array['from_email']) : 'no_from_email',
     207            isset( $wic_option_array['smtp_reply'] ) ?  strtolower($wic_option_array['smtp_reply']) : 'no_smtp_reply',
     208            isset( $wic_option_array['activesync_email_address'] ) ?  strtolower($wic_option_array['activesync_email_address']) : 'no_activesync_email_address',
     209        ); 
     210
    205211        foreach ( $to_array as $to_address ) {
    206             if ( !in_array ( $to_address[1], $used_addresses ) &&  !in_array ( $to_address[1], $my_mails) ) {
     212            if ( !in_array ( $to_address[1], $used_addresses ) &&  !in_array ( strtolower($to_address[1]), $my_mails) ) {
     213                $to_address[0] = self::clean_name( $to_address[0]);
    207214                array_push ( $merged_clean_array, $to_address );
    208215            }
     
    210217        }
    211218   
    212         foreach ( $cc_array as $cc_address ) {
    213             if ( !in_array ( $cc_address[1], $used_addresses ) &&  !in_array ( $cc_address[1], $my_mails) ) {
     219        foreach ( $cc_array as $cc_address ) {
     220            if ( !in_array ( $cc_address[1], $used_addresses ) &&  !in_array ( strtolower($cc_address[1]), $my_mails) ) {
     221                $cc_address[0] = self::clean_name( $cc_address[0]);
    214222                array_push ( $merged_clean_array, $cc_address );
    215223            }
    216224            array_push( $used_addresses, $cc_address[1] );
    217225        }
    218    
    219226        return $merged_clean_array;
    220227    }
    221228
    222 
    223    
     229   
     230    private static function clean_name ( $name_line ) {
     231        $working_block_object = new WIC_DB_Address_Block_Object;
     232        $name_array = $working_block_object->parse_name( $name_line );
     233        $clean_name = trim ( $name_array['first'] . ' ' . $name_array['middle'] . ( $name_array['middle'] ? ' ' : '') . $name_array['last'] );
     234        return $clean_name;
     235    }
    224236    /*
    225237    *
     
    405417            ;
    406418        $sender_display_line = $sender_display_line ? $sender_display_line :
     419            (
    407420            isset ( $message->from_personal ) ?
    408421                (
     
    412425                ) :
    413426                ''
     427            )
    414428            ;
    415429        return $sender_display_line;
  • wp-issues-crm/trunk/readme.txt

    r2295516 r2296854  
    55Requires at least: 5
    66Tested up to: 5.4.1
    7 Stable tag: 4.5.3.8
     7Stable tag: 4.5.3.9
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    108108
    109109== Changelog ==
     110= 4.5.3.9 =
     111* Clean up to/reply names before offering to client for email reply use
    110112= 4.5.3.8 =
    111113* Add internet headers to standard stored email object (make available for add-on local spam processing)
  • wp-issues-crm/trunk/wp-issues-crm.php

    r2295520 r2296854  
    44 * Plugin URI: http://wp-issues-crm.com
    55 * Description: Constituent Relationship Management for organizations that respond to constituents.  Organizes constituent contacts ( calls, etc. ) around Wordpress posts and categories.
    6  * Version: 4.5.3.8
     6 * Version: 4.5.3.9
    77 * Author: Will Brownsberger
    88 * Author URI: http://willbrownsberger.com
Note: See TracChangeset for help on using the changeset viewer.