<?php
/*
 +--------------------------------------------------------------------+
 | CiviCRM version 4.0                                                |
 +--------------------------------------------------------------------+
 | This file is a part of CiviCRM.                                    |
 |                                                                    |
 | CiviCRM is free software; you can copy, modify, and distribute it  |
 | under the terms of the GNU Affero General Public License           |
 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception.   |
 |                                                                    |
 | CiviCRM is distributed in the hope that it will be useful, but     |
 | WITHOUT ANY WARRANTY; without even the implied warranty of         |
 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.               |
 | See the GNU Affero General Public License for more details.        |
 |                                                                    |
 | You should have received a copy of the GNU Affero General Public   |
 | License and the CiviCRM Licensing Exception along                  |
 | with this program; if not, contact CiviCRM LLC                     |
 | at info[AT]civicrm[DOT]org. If you have questions about the        |
 | GNU Affero General Public License or the licensing of CiviCRM,     |
 | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
 +--------------------------------------------------------------------+
*/
// $Id: civicrm_group_roles.module,v 1.1.4.2 2008/10/14 00:20:36 matt2000 Exp $

/* @file
 * A simple module to synchronize Drupal Roles with Specified CiviCRM Groups
 */

/**
 * Implementation of hook_install().
 */
function civicrm_group_roles_install( ) 
{
    
    $here = l(t('here'), 'admin/config/civicrm/civicrm_group_roles/add_rule');
    drupal_set_message(t('CiviGroup Roles Sync installed. You will need to specify sync rules !1.', array('!1' => $here)));
}

/**
 * Implementation of hook_schema().
 */
function civicrm_group_roles_schema( ) 
{
    $schema['civicrm_group_roles_rules'] = array(
                                                 'fields' => array(
                                                                   'id' => array(
                                                                                 'type' => 'serial', 
                                                                                 ),
                                                                   'role_id' => array(
                                                                                      'type' => 'int', 
                                                                                      'unsigned' => TRUE, 
                                                                                      'not null' => TRUE,
                                                                                      ),
                                                                   'group_id' => array(
                                                                                       'type' => 'int', 
                                                                                       'unsigned' => TRUE, 
                                                                                       'not null' => TRUE,
                                                                                       )
                                                                   ),
                                                 'primary key' => array('id'),
                                                 );
    
    return $schema;
}

/**
 * Implementation of hook_uninstall().
 */
function civicrm_group_roles_uninstall( ) 
{
}
