Commit 7175e46f authored by Nicholas Thompson's avatar Nicholas Thompson
Browse files

#1567790 - Fixing bug with cache clearing breaking settings.

parent 1650b3a0
......@@ -766,9 +766,13 @@ function page_title_get_settings($flush = FALSE) {
return $cache->data;
// Ensure that the page title inc files are included before invoking
// This helps avoid the issues in #1567790
// 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
// later as we can assume presence)
foreach ($settings as $k => $v) {
......@@ -812,12 +816,29 @@ function page_title_init() {
drupal_add_css(drupal_get_path('module', 'page_title') .'/page_title.admin.css');
// Include relevant's
* 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.
static $runonce = FALSE;
if ($runonce) return;
// Include relevant's. We cannot use drupal_load() here due to the folder structure.
// We also avoice using include_once due to its performance hit on the Filesystem
foreach (page_title_get_module_apis() as $module => $info) {
if (file_exists("./{$info['path']}/{$module}")) {
include "./{$info['path']}/{$module}";
$path = "./{$info['path']}/{$module}";
if (file_exists($path)) {
include $path;
$runonce = TRUE;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment