You are here

function node_gallery_enable in Node Gallery 6.3

Create default settings when the module is enabled.

File

./node_gallery.install, line 317
Install, update and uninstall functions for the node_gallery module.

Code

function node_gallery_enable() {
  $exists = db_result(db_query("SELECT COUNT(*) from {node_gallery_relationships} WHERE image_type = '%s'", NODE_GALLERY_DEFAULT_GALLERY_TYPE));
  if ($exists == 0) {

    // http://drupal.org/node/200931 - We need to manually rebuild the schema until D7
    drupal_get_schema(NULL, TRUE);
    node_gallery_install_default_settings();
  }
}