/[drupal]/contributions/modules/importexportapi/definitions/importexportapi_dblog.inc
ViewVC logotype

Diff of /contributions/modules/importexportapi/definitions/importexportapi_dblog.inc

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

revision 1.1, Wed May 6 18:30:49 2009 UTC revision 1.1.2.1, Wed May 6 18:30:49 2009 UTC
# Line 0  Line 1 
1    <?php
2    // $Id: importexportapi_watchdog.inc,v 1.3 2006/08/29 05:08:43 jaza Exp $
3    
4    /**
5     * @file
6     * Implements data definitions on behalf of watchdog.module.
7     */
8    
9    /**
10     * Implementation of hook_def().
11     */
12    function dblog_def() {
13      $defs = array();
14    
15      $def = array(
16        '#type' => 'entity',
17        '#title' => t('Watchdog log message'),
18        '#db_default_table' => 'watchdog',
19        '#xml_plural' => 'watchdog-log',
20        '#csv_plural' => 'watchdog-log'
21      );
22    
23      $def['wid'] = array(
24        '#type' => 'int',
25        '#title' => t('Watchdog message ID'),
26        '#key' => TRUE
27      );
28      $def['uid'] = array(
29        '#type' => 'int',
30        '#title' => t('User ID'),
31        '#reference_entity' => 'user'
32      );
33      $def['message_type'] = array(
34        '#title' => t('Message type'),
35        '#db_field_unaliased' => 'type'
36      );
37      $def['message'] = array(
38        '#title' => t('Message text'),
39        '#xml_mapping' => 'message-text',
40        '#csv_mapping' => 'message-text'
41      );
42      $def['severity'] = array(
43        '#type' => 'int',
44        '#title' => t('Severity')
45      );
46      $def['link'] = array(
47        '#title' => t('Link')
48      );
49      $def['location'] = array(
50        '#title' => t('Location URL')
51      );
52      $def['referer'] = array(
53        '#title' => t('Referer URL')
54      );
55      $def['hostname'] = array(
56        '#title' => t('Hostname')
57      );
58      $def['timestamp'] = array(
59        '#type' => 'datetime',
60        '#title' => t('Timestamp')
61      );
62    
63      $defs['watchdog_message'] = $def;
64    
65      return $defs;
66    }
67    
68    /**
69     * Implementation of hook_db_def_tables().
70     */
71    function dblog_db_def_tables() {
72      $tables = array();
73    
74      $tables['watchdog'] = 'w';
75    
76      return $tables;
77    }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.1.2.1

  ViewVC Help
Powered by ViewVC 1.1.2