/[drupal]/contributions/modules/jobsearch/job.install
ViewVC logotype

Diff of /contributions/modules/jobsearch/job.install

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4, Fri Jan 2 02:49:21 2009 UTC revision 1.4.2.1, Tue Oct 6 23:02:03 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  //$Id$  //$Id: job.install,v 1.4 2009/01/02 02:49:21 kbahey Exp $
3  // Copyright Khalid Baheyeldin 2008-2009 http://2bits.com  // Copyright Khalid Baheyeldin 2008-2009 http://2bits.com
4    
5    define('JOB_NODE_TYPE',        'job_node_type_');
6    define('RESUME_NODE_TYPE',     'resume_node_type_');
7    
8  /**  /**
9   * Implementation of hook_install().   * Implementation of hook_install().
10   */   */
11  function job_install() {  function job_install() {
12          drupal_install_schema('job');    // Create tables.
13      drupal_install_schema('job');
14  }  }
15    
16  /**  /**
17   * Implementation of hook_schema().   * Implementation of hook_uninstall().
18   */   */
19  function job_schema() {  function job_uninstall() {
20      // Delete job => nodetype mapping variables.
21      foreach (node_get_types() as $type => $name) {
22        variable_del(JOB_NODE_TYPE . $type);
23        variable_del(RESUME_NODE_TYPE . $type);
24      }
25      drupal_uninstall_schema('job');
26    }
27    
28    /**
29     * Implementation of hook_schema().
30     */
31    function job_schema() {
32    $schema['job'] = array(    $schema['job'] = array(
33      'description' => t('The table for jobs'),      'description' => t('The table for jobs'),
34      'fields' => array(      'fields' => array(
# Line 55  function job_schema() { Line 71  function job_schema() {
71        ),        ),
72      ),      ),
73      'primary key' => array('nid', 'uid'),      'primary key' => array('nid', 'uid'),
74    );      'indexes' => array(
75    return $schema;        'nid' => array('nid', 'uid')),
76  }    );
77    
78  /**    return $schema;
79   * Implentation of hook_uninstall();  }
80   *  
  */  
 function job_uninstall() {  
   drupal_uninstall_schema('job');  
 }  

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.4.2.1

  ViewVC Help
Powered by ViewVC 1.1.2