Plugin Directory

Changeset 1076228


Ignore:
Timestamp:
01/26/2015 08:17:51 PM (11 years ago)
Author:
AndyGCook
Message:

version 2.2.10

Location:
leadin/trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • leadin/trunk/admin/inc/class-leadin-list-table.php

    r1071920 r1076228  
    338338        if ( isset($_GET['s']) )
    339339        {
     340            $escaped_query = '';
     341            if ( $wp_version >= 4 )
     342                $escaped_query = $wpdb->esc_like($_GET['s']);
     343            else
     344                $escaped_query = like_escape($_GET['s']);
     345
    340346            $search_query = $_GET['s'];
    341             $mysql_search_filter = $wpdb->prepare(" AND ( l.lead_email LIKE '%%%s%%' OR l.lead_source LIKE '%%%s%%' ) ", $wpdb->esc_like($search_query), $wpdb->esc_like($search_query));
     347            $mysql_search_filter = $wpdb->prepare(" AND ( l.lead_email LIKE '%%%s%%' OR l.lead_source LIKE '%%%s%%' ) ", $escaped_query, $escaped_query);
    342348        }
    343349       
  • leadin/trunk/admin/inc/class-leadin-tag-editor.php

    r1040702 r1076228  
    197197    {
    198198        global $wpdb;
    199         $q = $wpdb->prepare("SELECT contact_hashkey, lead_email FROM $wpdb->li_tag_relationships ltr, $wpdb->li_leads ll WHERE ltr.contact_hashkey = ll.hashkey AND ltr.tag_id = %d", $tag_id);
     199        $q = $wpdb->prepare("SELECT contact_hashkey, lead_email, lead_first_name, lead_last_name FROM $wpdb->li_tag_relationships ltr, $wpdb->li_leads ll WHERE ltr.contact_hashkey = ll.hashkey AND ltr.tag_id = %d AND ltr.tag_relationship_deleted = 0", $tag_id);
    200200        $contacts = $wpdb->get_results($q);
    201201        return $contacts;
  • leadin/trunk/admin/inc/class-leadin-tags-list-table.php

    r1071920 r1076228  
    157157        global $wpdb;
    158158
    159         $q = $wpdb->prepare("
     159        $q = "
    160160            SELECT
    161161                lt.tag_text, lt.tag_slug, lt.tag_synced_lists, lt.tag_form_selectors, lt.tag_order, lt.tag_id,
     
    166166                lt.tag_deleted = 0
    167167            GROUP BY lt.tag_slug
    168             ORDER BY lt.tag_order ASC", "");
     168            ORDER BY lt.tag_order ASC";
    169169
    170170        $tags = $wpdb->get_results($q);
  • leadin/trunk/admin/leadin-admin.php

    r1071920 r1076228  
    6363
    6464        $options = get_option('leadin_options');
     65
     66        if ( is_multisite() )
     67            $options = leadin_check_multisite_missing_options($options);
     68
    6569        $this->action = $this->leadin_current_action();
    6670
  • leadin/trunk/inc/leadin-ajax-functions.php

    r1040702 r1076228  
    1515{
    1616    global $wpdb;
     17    global $wp_version;
    1718
    1819    $stale_hash = $_POST['li_id'];
    1920
     21    $escaped_hash = '';
     22    if ( $wp_version >= 4 )
     23        $escaped_hash = $wpdb->esc_like($stale_hash);
     24    else
     25        $escaped_hash = like_escape($stale_hash);
     26
    2027    // Check if hashkey is in a merged contact
    21     $q = $wpdb->prepare("SELECT hashkey, merged_hashkeys FROM $wpdb->li_leads WHERE merged_hashkeys LIKE '%%%s%%'", $wpdb->esc_like($stale_hash));
     28    $q = $wpdb->prepare("SELECT hashkey, merged_hashkeys FROM $wpdb->li_leads WHERE merged_hashkeys LIKE '%%%s%%'", $escaped_hash);
    2229    $row = $wpdb->get_row($q);
    2330
     
    272279                        global ${$leadin_esp_wp};
    273280                       
    274                         if ( ${$leadin_esp_wp}->activated )
    275                             ${$leadin_esp_wp}->push_contact_to_list($synced_list['list_id'], $email, $first_name, $last_name, $phone);
     281                        if ( isset(${$leadin_esp_wp}) )
     282                        {
     283                            if ( ${$leadin_esp_wp}->activated )
     284                                ${$leadin_esp_wp}->push_contact_to_list($synced_list['list_id'], $email, $first_name, $last_name, $phone);
     285                        }
    276286                    }
    277287                }
  • leadin/trunk/inc/leadin-functions.php

    r1040702 r1076228  
    836836}
    837837
     838function leadin_check_multisite_missing_options ( $options )
     839{
     840    $default_options = array(
     841        'li_installed'              => 1,
     842        'leadin_version'            => LEADIN_PLUGIN_VERSION,
     843        'li_db_version'             => LEADIN_DB_VERSION,
     844        'li_email'                  => get_bloginfo('admin_email'),
     845        'li_updates_subscription'   => 1,
     846        'onboarding_step'           => 1,
     847        'onboarding_complete'       => 0,
     848        'ignore_settings_popup'     => 0,
     849        'data_recovered'            => 1,
     850        'delete_flags_fixed'        => 1,
     851        'beta_tester'               => 0,
     852        'converted_to_tags'         => 1,
     853        'names_added_to_contacts'   => 1
     854    );
     855
     856    if ( count($options) && is_array($options) )
     857    {
     858        foreach ( $default_options as $key => $value )
     859        {
     860            if ( ! array_key_exists($key, $options) )
     861                $options[$key] = $value;
     862        }
     863    }
     864
     865    update_option('leadin_options', $options);
     866
     867    return $options;
     868}
     869
    838870?>
  • leadin/trunk/leadin.php

    r1071920 r1076228  
    44Plugin URI: http://leadin.com
    55Description: Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
    6 Version: 2.2.9
     6Version: 2.2.10
    77Author: Andy Cook, Nelson Joyce
    88Author URI: http://leadin.com
     
    2727
    2828if ( !defined('LEADIN_PLUGIN_VERSION') )
    29     define('LEADIN_PLUGIN_VERSION', '2.2.9');
     29    define('LEADIN_PLUGIN_VERSION', '2.2.10');
    3030
    3131if ( !defined('MC_KEY') )
     
    106106        $opt = array(
    107107            'li_installed'              => 1,
     108            'leadin_version'            => LEADIN_PLUGIN_VERSION,
    108109            'li_db_version'             => LEADIN_DB_VERSION,
    109110            'li_email'                  => get_bloginfo('admin_email'),
  • leadin/trunk/power-ups/contacts/admin/contacts-admin.php

    r1071920 r1076228  
    506506{
    507507    global $wpdb;
     508    global $wp_version;
     509
    508510    leadin_set_wpdb_tables();
    509511    leadin_set_mysql_timezone_offset();
     
    543545    if ( isset($_GET['s']) )
    544546    {
     547        $escaped_query = '';
     548        if ( $wp_version >= 4 )
     549            $escaped_query = $wpdb->esc_like($_GET['s']);
     550        else
     551            $escaped_query = like_escape($_GET['s']);
     552
    545553        $search_query = $_GET['s'];
    546         $mysql_search_filter = $wpdb->prepare(" AND ( l.lead_email LIKE '%%%s%%' OR l.lead_source LIKE '%%%s%%' ) ", $wpdb->esc_like($search_query), $wpdb->esc_like($search_query));
     554        $mysql_search_filter = $wpdb->prepare(" AND ( l.lead_email LIKE '%%%s%%' OR l.lead_source LIKE '%%%s%%' ) ", $escaped_query, $escaped_query);
    547555    }
    548556
  • leadin/trunk/power-ups/mailchimp-connect.php

    r1040702 r1076228  
    158158
    159159            $batch_contacts = array();
    160             foreach ( $contacts as $contact )
    161                 array_push($batch_contacts, array('email' => array('email' => $contact->lead_email)));
     160            if ( count($contacts) )
     161            {
     162                foreach ( $contacts as $contact )
     163                {
     164                    array_push($batch_contacts, array(
     165                        'email' => array('email' => $contact->lead_email),
     166                        'merge_vars' => array(
     167                            'EMAIL' => $contact->lead_email,
     168                            'FNAME' => $contact->lead_first_name,
     169                            'LNAME' => $contact->lead_last_name
     170                        ))
     171                    );
     172                }
     173            }
    162174
    163175            $list_updated = $MailChimp->call("lists/batch-subscribe", array(
     
    168180                'replace_interests' => FALSE,
    169181                'double_optin' => FALSE,
    170                 "batch" => $batch_contacts
     182                "batch" => $batch_contacts,
    171183            ));
    172184
  • leadin/trunk/power-ups/mailchimp-connect/inc/MailChimp-API.php

    r976552 r1076228  
    7272            curl_close($ch);
    7373
    74 
    7574        } else {
    7675            $json_data = json_encode($args);
  • leadin/trunk/readme.txt

    r1071920 r1076228  
    44Requires at least: 3.7
    55Tested up to: 4.1
    6 Stable tag: 2.2.9
     6Stable tag: 2.2.10
    77
    88Leadin is an easy-to-use marketing automation and lead tracking plugin for WordPress that helps you better understand your web site visitors.
     
    9191- Disqus comments
    9292- SumoMe
     93- JotForm
    9394- Forms contained in an iFrame
    9495
     
    108109== Changelog ==
    109110
    110 - Current version: 2.2.9
    111 - Current version release: 2014-01-20
     111- Current version: 2.2.10
     112- Current version release: 2014-01-26
     113
     114= 2.2.10 (2014.01.26) =
     115= Enhancements =
     116- Tested JotForm + added compatibility to the ReadMe file
     117
     118- Bug fixes
     119- Add in support for like_escape for < WordPress 4.0
     120- Add first + last names to bulk MailChimp connector
     121- Remove rogue WPDB prepare in tag list table
     122- Check for existence of ESP connector when pushing to an email list
     123- Bug fix for multisite installs with broken onboarding
    112124
    113125= 2.2.9 (2014.01.20) =
Note: See TracChangeset for help on using the changeset viewer.