Blog title doesn't currently change the title of the RSS feed for a user's blog, to match the blog title. The attached patch corrects this problem.

Comments

Andrew Schulman’s picture

Title: doesn't change the RSS feed title » doesn't change the page and RSS feed titles
StatusFileSize
new1.79 KB

Here's a corrected patch. In the earlier patch, I forgot to check whether blogtitle_replace_rss_feed_title was set, before resetting the title of the RSS feed. This version fixes that.

Note that this patch also fixes http://drupal.org/node/528240, and is a better solution than the patch submitted there, since it properly sets the page title, which then causes the HTML head title to also be correctly set.

remi’s picture

Thanks for reporting both issues and uploading patch files, andrex593!

I didn't have time to try the patch yet, but there is one line that caught my attention. In blogtitle.pages.inc, you include the file blog.pages.inc using require_once, but I think Drupal has a function to handle module file includes. Do you think it would be best to use the module_load_include() function[1]? If so, it may be best to call the function from within another function, like in blogtitle_blog_page_user(), in this case.

[1] http://api.drupal.org/api/function/module_load_include/6

Andrew Schulman’s picture

StatusFileSize
new1.84 KB

Thanks, I didn't know about module_load_include(). Agreed that that does seem to be the Drupal way of importing functions from a module file. Revised patch is attached.

It doesn't seem to matter whether the call to module_load_include() goes inside or outside of blogtitle_blog_page_user(). Either way the included file only gets read once, and according to the PHP docs everything inside it has global scope no matter where it's read. I guess inside is a little better, because the included file won't have to be read unless blogtitle_blog_page_user() is called.

A.

remi’s picture

Status: Needs review » Fixed

Thank you so much for the patch, andrex593! I finally had some time to test the patch and commit the changes. The new 6.x-1.2 release should be available sometime today!

I marked issue #528240: doesn't change the HTML head title as a duplicate of this one.

Andrew Schulman’s picture

Okay, glad to help out.

Haven't seen the 1.2 release yet.
A.

remi’s picture

Oops! Forgot to create a new release. It's there now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.