Closed (fixed)
Project:
Blog title
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
23 Jul 2009 at 05:57 UTC
Updated:
18 Aug 2009 at 12:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
Andrew Schulman commentedHere'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.
Comment #2
remi commentedThanks 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
Comment #3
Andrew Schulman commentedThanks, 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.
Comment #4
remi commentedThank 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.
Comment #5
Andrew Schulman commentedOkay, glad to help out.
Haven't seen the 1.2 release yet.
A.
Comment #6
remi commentedOops! Forgot to create a new release. It's there now.