Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
drupal.org
page_title
Commits
ce490556
Commit
ce490556
authored
May 09, 2012
by
Nicholas Thompson
Browse files
#1567790 - Fixing major bug with cache clearing and empty settings.
parent
282a1869
Changes
1
Hide whitespace changes
Inline
Side-by-side
page_title.module
View file @
ce490556
...
...
@@ -637,6 +637,16 @@ function page_title_preprocess_html(&$vars) {
* Implement hook_init().
*/
function
page_title_init
()
{
// Make sure our API includes are included on all page loads.
page_title_include_api_files
();
}
/**
* Function to ensure API files are included.
* We use a static variable so we can use include, which is faster than include_one
*/
function
page_title_include_api_files
()
{
// Using $runonce, we can ensure the include code below only gets run once.
$runonce
=
&
drupal_static
(
__FUNCTION__
,
FALSE
);
if
(
$runonce
)
return
;
...
...
@@ -807,7 +817,12 @@ function page_title_get_settings($flush = FALSE) {
return
$cache
->
data
;
}
// Get the settings from hoko_page_title_settings().
// We run this here as there are edge cases where it seems hook_init() and
// cache clearing intefere with each other, casuing INC files to not be included
// See: http://drupal.org/node/1567790
page_title_include_api_files
();
// Get the settings from hook_page_title_settings().
$settings
=
module_invoke_all
(
'page_title_settings'
);
// For each setting, apply a "default" mask (this makes it easier to use
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment