Archive for December, 2009
Testing new version of Feedwordpress Duplicate Post Filter
Posted by Mark Allen in Uncategorized on December 26th, 2009
UPDATE: I checked in a new revision of 1.3 in rev 187105. This one readds some diagnostic logging and checks the num_rows class scalar to see if any rows were returned in the DB query which is probably the Right Way To Do It(tm).
I’ve recently gotten a couple of emails from people that my Duplicate Post Filter was broken or not working properly. This came as a surprise to me because I haven’t regularly been running the site I originally created the plugin for since around January of 2009. I originally thought maybe my plugin was using deprecated calls or actions, but that’s not it at all.
When I reviewed the code for the first time in over a year, sure enough, there was a really dumb typo in the SQL query which would have caused it to return a false negative every time it was executed, meaning that every post would come back as “not a duplicate” even if it really was. And since I had the opportunity, I refactored the SQL query to more safely and better use the wpdb class methods.
I’ve updated my SVN trunk to 1.3 and I’m going to email the filter to the people who emailed error reports so they can test it. My own limited smoke testing shows that it seems to be functioning. If the other testers report back with success, I’ll tag the 1.3 release on/around Christmas as a little gift. At that point, the WordPress plugin website will do its magic and people will be able to auto-update if they like (which they will I’m sure!)