Commit f3204915 authored by metzlerd's avatar metzlerd
Browse files

Fix title pull.

parent ef69c81a
......@@ -219,7 +219,7 @@ class FrxMenu {
);
if (module_exists('locale')) {
$items[$new_path]['title callback'] = 'forena_report_title_callback';
$items[$new_path]['title arguments'] = array($row->report_name, FALSE);
$items[$new_path]['title arguments'] = array($row->report_name, TRUE);
}
if ($access_callback === 'forena_check_all_access') $items[$new_path]['access arguments'][] = $cache['access'];
}
......
......@@ -869,8 +869,14 @@ function forena_report_title_callback($report_name, $use_menu_title=TRUE) {
$title = '';
$lang = $language->language;
$result = db_query('SELECT * FROM {forena_reports} where report_name = :name and language=:language',
array(':name' => $report_name, 'language' => $lang));
array(':name' => $report_name, 'language' => $lang));
foreach ($result as $row) {
$cache = $row->cache;
if ($cache) {
$cache = unserialize($cache);
// Load menu item defaults
$menu = $cache['menu'];
}
$title = $use_menu_title && @$menu['title'] ? $menu['title']: $row->title;
}
return $title;
......
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