WordPress.org

Plugin Directory

Changeset 704276


Ignore:
Timestamp:
04/26/13 15:54:55 (12 months ago)
Author:
M66B
Message:

1.81 dev another workaround for duplicate imported comments

Location:
add-link-to-facebook
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • add-link-to-facebook/tags/1.179/readme.txt

    r702756 r704276  
    771771 
    772772= Development version = 
    773 * Workaround: import of exported Facebook comments (caused by Facebook bug) 
     773* Workaround: duplicate imported Facebook comments (caused by Facebook bug) 
    774774 
    775775Follow these steps to install the development version: 
  • add-link-to-facebook/trunk/add-link-to-facebook-class.php

    r702756 r704276  
    22962296                        foreach ($fb_comments->data as $fb_comment) 
    22972297                            if (!empty($fb_comment->id)) { 
     2298                                $search_comment_id = end(explode('_', $fb_comment->id)); 
     2299 
    22982300                                // Check if stored comment 
    22992301                                $stored = false; 
     
    23012303                                    foreach ($stored_comments as $comment) { 
    23022304                                        $fb_comment_id = get_comment_meta($comment->comment_ID, c_al2fb_meta_fb_comment_id, true); 
    2303                                         if ($fb_comment_id == $fb_comment->id || 
    2304                                             strpos($fb_comment->id, $fb_comment_id) !== false) { 
     2305                                        if ($search_comment_id == end(explode('_', $fb_comment_id))) { 
    23052306                                            $stored = true; 
    23062307                                            break; 
    23072308                                        } 
    23082309                                    } 
    2309                                 $stored = $stored || in_array($fb_comment->id, $deleted_fb_comment_ids); 
     2310 
     2311                                // Check if deleted comment 
     2312                                if (!$stored && $deleted_fb_comment_ids) 
     2313                                    foreach ($deleted_fb_comment_ids as $deleted_fb_comment_id) 
     2314                                        if ($search_comment_id == end(explode('_', $deleted_fb_comment_id))) { 
     2315                                            $stored = true; 
     2316                                            break; 
     2317                                        } 
    23102318 
    23112319                                // Create new comment 
  • add-link-to-facebook/trunk/readme.txt

    r702756 r704276  
    771771 
    772772= Development version = 
    773 * Workaround: import of exported Facebook comments (caused by Facebook bug) 
     773* Workaround: duplicate imported Facebook comments (caused by Facebook bug) 
    774774 
    775775Follow these steps to install the development version: 
Note: See TracChangeset for help on using the changeset viewer.