Ticket #859: favatars.diff

File favatars.diff, 1.8 KB (added by carlok, 4 years ago)
  • .php

    old new  
    22/* 
    33Plugin Name: Favatars 
    44Plugin URI: http://dev.wp-plugins.org/wiki/favatars 
    5 Description: A system to show favicon.ico files as avatars: "Favatars". Entire recode by <a href="http://www.thecodepro.com/">Jeff Minard</a> <br /> Previous Versions care of: <a href="http://www.noscope.com">Joen</a>, <a href="http://www.peej.co.uk/projects/favatars.html">Paul James</a>, and <a href="http://www.somefoolwitha.com">Matthew</a>.  
     5Description: A system to show favicon.ico files as avatars: "Favatars". Entire recode by <a href="http://www.thecodepro.com/">Jeff Minard</a> (fixes for 2.5.x by <a href="http://perassi.org/">Carlo Perassi</a>).<br /> Previous Versions care of: <a href="http://www.noscope.com">Joen</a>, <a href="http://www.peej.co.uk/projects/favatars.html">Paul James</a>, and <a href="http://www.somefoolwitha.com">Matthew</a>.  
    66Version: 2 
    77Author: Jeff Minard 
    88Author URI: http://thecodepro.com/ 
     
    1111// Nothing more to see here. All configuration is done via the admin panel. 
    1212// Move along. 
    1313 
     14global $comment, $wpdb; 
     15 
    1416$comment_favicon_exists = fav_maybe_add_column($wpdb->comments, 'comment_favicon_url', "ALTER TABLE `$wpdb->comments` ADD `comment_favicon_url` TEXT NOT NULL"); 
    1517 
    1618if( $comment_favicon_exists == false ) 
     
    208210                 
    209211                DEFINE(SP,'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'); 
    210212                 
    211                 $request = "SELECT comment_ID, comment_author_url FROM $wpdb->comments WHERE comment_favicon_url = '' AND comment_author_url != '' "; 
     213                $request = "SELECT comment_ID, comment_author_url FROM $wpdb->comments WHERE ((comment_favicon_url = '') AND (comment_author_url != '') AND (comment_type != ''))"; 
    212214 
    213215            $comments = $wpdb->get_results($request); 
    214216