You are here

function panels_update_6310 in Panels 6.3

Move stylizer data from Panels to CTools.

File

./panels.install, line 1499

Code

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

  // load the module files, if possible
  if (!defined('PANELS_REQUIRED_CTOOLS_API')) {
    include_once drupal_get_path('module', 'panels') . '/panels.module';
  }
  if (!defined('CTOOLS_API_VERSION')) {
    include_once drupal_get_path('module', 'ctools') . '/ctools.module';
  }

  // Safety: go away if CTools is not at an appropriate version.
  if (!module_invoke('ctools', 'api_version', PANELS_REQUIRED_CTOOLS_API)) {
    $ret['#abort'] = array(
      'success' => FALSE,
      'query' => t('Panels cannot be updated because CTools 1.7 (API v1.7.2) is required. Please update CTools and then try update.php again.'),
    );
    return $ret;
  }

  // Enable the stylizer module to make everything as seamless as possible.
  drupal_install_modules(array(
    'stylizer',
  ));
  return $ret;
}