You are here

function hosting_package_update_6200 in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 package/hosting_package.install \hosting_package_update_6200()
  2. 7.3 package/hosting_package.install \hosting_package_update_6200()

Enable the "Hosting package list" block on Package nodes.

File

package/hosting_package.install, line 483
Define database schema and update functions for the package management module.

Code

function hosting_package_update_6200() {
  $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 block.
  $theme = 'eldir';
  install_set_block('views', 'hosting_package_list-block_1', $theme, 'content_bottom', 0, 2, "\n<?php\n\n\$node = menu_get_object();\n\nif (!empty(\$node)) {\n\n  return \$node->type == 'package' && \$node->package_type != 'profile';\n\n}\n\n?>");
  module_disable(array(
    'install_profile_api',
  ));
  return $ret;
}