So many security upgrades, so little time…
I have begun setting up a web site for OzWin for refugees from the late lamented OzWin Forum on CompuServe. That site will have information and downloads. The community will continue in our own section in the Tapcis Forum. If you are one of the people who know what any of that means, head over there and say hi.
I was just about to post a belated note about upgrading to WordPress 22.214.171.124 when I noticed that there is a security upgrade to WordPress 126.96.36.199. It appears to be a one line patch, so what I’m actually running right now is the patched 188.8.131.52.
WordPress failed to send email, such as when registering a name or trying to retrieve a password. The problem turned out to be in the wp_mail function in wp-includes/functions.php.
It takes an optional argument $more, which it passes on to mail() as its fifth argument. The php mail() function is documented not to accept that fifth argument when in safe mode. The fix is to call mail() without that $more argument either when in safe mode and/or when $more == ”.
[Update, May 12, 2005] WordPress 1.5.1 has been released and contains the fix to this problem.
It appears that the author has updated Theme Switcher Plugin to version 1.1 and now includes the functionality I put into Theme Switcher Shim Plugin. So I’ll see if I can delete the shim from the Plugin Manager database.
I have noticed that Theme Switcher Plugin really slows down my WordPress page display. When I install all 140 or so plugins from the theme site, it takes about 5 seconds to display my WP home page. With the plugin disabled it takes 0.78 seconds, according to the timing stats in the footer.
The problem is that the plugin calls get_themes in order to have the theme file names for the links, because all it stores in the plugin options are the theme names. get_themes reads all the theme information in the themes subdirectory, reading not only the directory contents but some information from files in every theme in the directory whether or not it is selected for the Theme Switcher list.
The solution is very simple: Store the file name in the plugin options along with the theme name.
The few line change to the plugin reduces the load time of my front page from 5 seconds down to under a second. Even better, it makes the time independent of the number of themes in the themes directory.
I’m going to email the changes to the author.
You can download this zip file containing the patch in diff format.
I haven’t wanted to start a blog, not knowing if I was ever going to get around to updating it, or have things worth saying. But now that I’m playing with WordPress, I realized that I can blog without blogging by just making the test site visible. I’ll document what I do with it. Maybe once in a while I’ll have something else to say.