[wp-trac] [WordPress Trac] #20494: comment_exists function return improper value

WordPress Trac noreply at wordpress.org
Mon Jan 28 12:00:47 UTC 2013


#20494: comment_exists function return improper value
------------------------------------+------------------
 Reporter:  momo360modena           |       Owner:
     Type:  enhancement             |      Status:  new
 Priority:  normal                  |   Milestone:  3.6
Component:  Comments                |     Version:  2.0
 Severity:  minor                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+------------------

Comment (by SergeyBiryukov):

 Replying to [comment:7 nacin]:
 > comment_exists() and post_exists() both get used by importers, if I
 recall correctly.

 Indeed.

 * Blogger Importer maintains its own copy of the function: [[BR]]
  http://plugins.trac.wordpress.org/browser/blogger-importer/trunk/blogger-
 importer.php#L998
 * Blogware Importer, GreyMatter Importer, Movable Type Importer, and
 !WordPress Importer don't do anything with the returned value, other than
 checking if it's true: [[BR]]
  http://plugins.trac.wordpress.org/browser/blogware-importer/trunk
 /blogware-importer.php#L159 [[BR]]
  http://plugins.trac.wordpress.org/browser/greymatter-importer/trunk
 /greymatter-importer.php#L291 [[BR]]
  http://plugins.trac.wordpress.org/browser/movabletype-importer/trunk
 /movabletype-importer.php#L291 [[BR]]
  http://plugins.trac.wordpress.org/browser/wordpress-importer/trunk
 /wordpress-importer.php#L671
 * DotClear Importer and TextPattern Importer treat the returned comment
 post ID as comment ID, which is wrong: [[BR]]
  http://plugins.trac.wordpress.org/browser/dotclear-importer/trunk
 /dotclear-importer.php#L416 [[BR]]
  http://plugins.trac.wordpress.org/browser/textpattern-importer/trunk
 /textpattern-importer.php#L429

 Seems like we have two options:
 1. Correct the actual return value
 ([attachment:comment_exists_light.patch]).
 2. Only correct the docs ([attachment:20494.docs.patch]).

 Given the usage in DotClear Importer and TextPattern Importer, I guess the
 first option makes the most sense.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20494#comment:8>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list