mykle
Forum Replies Created
-
Yay.
Forum: Fixing WordPress
In reply to: WP can't export/import DOS line endings … are they illegal in posts?Yeah, but shouldn’t a person be able to store a carriage return in a post’s content or metainfo if they want to? I’m specifically asking if this is documented as illegal somewhere. It seems entirely reasonable to me.
If a post’s meta_info contains a carriage return, and I use the stock WP export and import to transport that data, the meta_info will be lost. That’s not plugin code, that’s stock WP 3.4.2 .
I’ve confirmed that my client is using nothing trickier than update_post_meta() to store the carriage return. update_post_meta() performs some sanitizing and escaping, but it leaves carriage returns untouched.
I think this is a WP bug.
Forum: Fixing WordPress
In reply to: WP can't export/import DOS line endings … are they illegal in posts?As far as I can tell, the content comes from plain old text fields in web forms.
Forum: Developing with WordPress
In reply to: is “SELECT DISTINCT *” ever a good idea?i have a wp 2.2 install where i found it in wp-includes/functions.php … i’m not sure how current that is. i did a find/exec/grep through every .php file looking for it, and that’s the only one i found. but in the get-recent-comments plugin (in a different, 2.0 install) it’s like night and day!
having thought about it more, i can see how if you have duplicate rows in your table or one of the tables in your join, SELECT DISTINCT * could be useful. so i guess the answer to my question in the subject line is “occasionally”. but for the cases where you join between tables that all have primary not-null keys, it should never be necessary.
we are continuing to enjoy the significant performance boost that we got from removing that DISTINCT clause in just two spots in that plugin. we are using it on our front page, so it gets hit constantly.