Plugin Directory

Changeset 202199


Ignore:
Timestamp:
02/05/2010 11:58:46 AM (16 years ago)
Author:
Twitoaster
Message:

Updating to v 1.3.3

Location:
twitoaster/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • twitoaster/trunk/readme.txt

    r197907 r202199  
    55Requires at least: 2.2
    66Tested up to: 2.9.1
    7 Stable tag: 1.3.2
     7Stable tag: 1.3.3
    88
    99Twitter Comments system. Automatically retrieve Twitter Replies and/or Twitter Retweets to your Blog's Posts using WP built-in comment system. Also bring Twitter Statistics.
     
    4545
    4646== Changelog ==
     47
     48= 1.3.3 =
     49* Fix: Duplicate Twitter comments could appear on some installations
    4750
    4851= 1.3.2 =
  • twitoaster/trunk/twitoaster-post-replies.php

    r197907 r202199  
    105105    function twitoaster_post_replies_comment_insert($post, $comment_parent, $twitoaster_data, $comment_id = false) {
    106106        global $twitoaster_options;
    107 
     107       
     108        // Manual check of the meta
     109        $twitoaster_meta_check = twitoaster_post_replies_get_meta('_twitoaster_post_replies', $post->ID, true);
     110        if (array_key_exists($twitoaster_data->id, $twitoaster_meta_check['content'])) {
     111            return false;
     112        }
     113       
     114        // Comment's data preparation
    108115        $data = array(
    109116            'comment_post_ID' => $post->ID,
     
    151158    }
    152159
    153     function twitoaster_post_replies_get_meta($meta_key, $post_ID) {
    154         if ((isset($post_ID)) AND (is_numeric($post_ID)) AND ($post_ID > 0)) { $meta = get_post_meta($post_ID, $meta_key, true); }
    155         else { $meta = ""; }
     160    function twitoaster_post_replies_get_meta($meta_key, $post_ID, $manual = false) {
     161        if ((isset($post_ID)) AND (is_numeric($post_ID)) AND ($post_ID > 0)) {
     162            if (!($manual)) {
     163                // Retrieving the meta with WP functions (wp-cache might be enabled)
     164                $meta = get_post_meta($post_ID, $meta_key, true);
     165            }
     166            else {
     167                // Retrieving the meta manually (bypassing any wp-cache)
     168                global $wpdb;
     169                $meta = $wpdb->get_var($wpdb->prepare("SELECT meta_value FROM $wpdb->postmeta WHERE post_id = %d AND meta_key = %s", $post_ID, $meta_key));
     170                if ($meta) { $meta = unserialize($meta); }
     171            }
     172        }
     173        else {
     174            $meta = "";
     175        }
    156176
    157177        if (($meta != "") AND (is_array($meta))) { return $meta; }
  • twitoaster/trunk/twitoaster.php

    r198137 r202199  
    55Plugin URI: http://twitoaster.com/wordpress-plugin/
    66Description: Twitter Comments system. Automatically retrieve Twitter Replies and/or Twitter Retweets to your Blog's Posts using WP built-in comment system. Also bring Twitter Statistics.
    7 Version: 1.3.2
     7Version: 1.3.3
    88Author: Twitoaster
    99Author URI: http://twitoaster.com/
     
    4040        $currentoptions = array();
    4141
    42         $currentoptions['install_version'] = '1.3.2';
     42        $currentoptions['install_version'] = '1.3.3';
    4343        if (empty($options['install_time'])) { $currentoptions['install_time'] = current_time('timestamp', true); }
    4444        else { $currentoptions['install_time'] = $options['install_time']; }
Note: See TracChangeset for help on using the changeset viewer.