You are here

function hosting_site_update_6204 in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 site/hosting_site.install \hosting_site_update_6204()
  2. 7.3 site/hosting_site.install \hosting_site_update_6204()

Place new block.

File

site/hosting_site.install, line 421
Define database schema and update functions for the hosting_site module.

Code

function hosting_site_update_6204() {
  $ret = array();

  // Temporarily enable Install Profile API module and load includes.
  module_enable(array(
    'install_profile_api',
  ));
  drupal_load('module', 'install_profile_api');
  install_include(array(
    'block',
  ));

  // Enable blocks.
  $theme = 'eldir';
  install_set_block('views', 'hosting_site_list-block_client2', $theme, 'content_bottom', 0, 2, "<?php\nglobal \$user;\n\$node = menu_get_object();\n\$menu_item = menu_get_item();\nif (!empty(\$node)) && \$menu_item['number_parts'] == 2) {\n  return \$node->type == 'client' && {$user->uid} != 1;\n}\n?>");
  install_set_block('views', 'hosting_site_list-block_client', $theme, 'content_bottom', 0, 2, "<?php\n\$node = menu_get_object();\n\$menu_item = menu_get_item();\nif (!empty(\$node) && \$menu_item['number_parts'] == 2) {\n  return \$node->type == 'client';\n}\n?>");
  install_set_block('views', 'hosting_site_list-block_1', $theme, 'content_bottom', 0, 1, 'hosting/c/platform_*');
  module_disable(array(
    'install_profile_api',
  ));
  return $ret;
}