You are here

function gallery_assist_update_6 in Gallery Assist 6

Implementation of hook_update_N().

File

./gallery_assist.install, line 868
Install, update and uninstall functions and DB tables for the Gallery Assist module.

Code

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

  // Add a identifier for the created path alias to the gallery items.
  $db = array(
    'items' => array(
      'type' => 'int',
      'not null' => TRUE,
      'default' => 0,
      'description' => 'Amount of images in the gallery.',
    ),
  );
  db_add_field($ret, 'gallery_assist', 'items', $db['items']);

  // Add new settings parameter.
  $types = array(
    'default' => 'Default',
  );
  $types += node_get_types('names');
  foreach (array_keys($types) as $type) {
    $settings = variable_get("gallery_assist_{$type}_data", array());
    $settings['t_thm_link_format'] = 'item';
    $settings['ga_pager_show_pages'] = TRUE;
    variable_set("gallery_assist_{$type}_data", $settings);
  }
  return $ret;
}