Commit 3d45783a authored by Michael Haggerty's avatar Michael Haggerty

by techsoldaten: fixing install profile issue

parent d2081fd6
...@@ -18,19 +18,3 @@ function crm_core_ui_install() { ...@@ -18,19 +18,3 @@ function crm_core_ui_install() {
menu_rebuild(); menu_rebuild();
} }
/**
* Implements hook_enable().
*/
function crm_core_ui_enable() {
db_delete('block')->condition('delta', 'crm-core-menu')->execute();
$fields = array( 'module', 'delta', 'theme', 'status', 'weight', 'region', 'custom', 'visibility', 'pages', 'title', 'cache');
$values = array( 'menu', 'crm-core-menu', 'bartik', '1', '0', 'sidebar_first', '0', '0', '', '', '-1');
db_insert('block')->fields($fields, $values)->execute();
}
/**
* Implements hook_disable().
*/
function crm_core_ui_disable() {
db_delete('block')->condition('delta', 'crm-core-menu')->execute();
}
...@@ -107,6 +107,10 @@ function crm_core_ui_block_info() { ...@@ -107,6 +107,10 @@ function crm_core_ui_block_info() {
$blocks['navigation'] = array( $blocks['navigation'] = array(
'info' => t('CRM Navigaiton'), 'info' => t('CRM Navigaiton'),
'cache' => DRUPAL_CACHE_PER_ROLE, 'cache' => DRUPAL_CACHE_PER_ROLE,
'status' => 1,
'region' => 'sidebar_first',
'visibility' => BLOCK_VISIBILITY_NOTLISTED,
'pages' => 'crm-core/report/*'
); );
return $blocks; return $blocks;
......
...@@ -11,6 +11,13 @@ function crm_core_ui_block_navigation_subject() { ...@@ -11,6 +11,13 @@ function crm_core_ui_block_navigation_subject() {
* Content for CRM navigation block. * Content for CRM navigation block.
*/ */
function crm_core_ui_block_navigation_content() { function crm_core_ui_block_navigation_content() {
global $user;
if(!user_access('View any contact of any type', $user)){
return;
}
$items = array( $items = array(
'contacts' => l(t('Contacts'), 'crm-core/contact'), 'contacts' => l(t('Contacts'), 'crm-core/contact'),
'add_contact' => l(t('Add Contact'), 'crm-core/contact/add'), 'add_contact' => l(t('Add Contact'), 'crm-core/contact/add'),
......
Markdown is supported
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