/[drupal]/contributions/modules/drupalorg/role_activity/role_activity.install
ViewVC logotype

Contents of /contributions/modules/drupalorg/role_activity/role_activity.install

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


Revision 1.3 - (show annotations) (download) (as text)
Thu Jan 29 17:27:29 2009 UTC (9 months, 4 weeks ago) by goba
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
Changes since 1.2: +4 -2 lines
File MIME type: text/x-php
Reviewed role activity module

 - Added dblog as a dependency, since this works based on the watchdog hook
 - t() use in hook_menu was bad, it should not be done that way
 - /admin/logs moved to /admin/reports
 - Top users was not a subtab, show it as such
 - Use nicer titles for the admin pages, it is not about role activity, it is about user activity
 - Fix query in role_activity_check_role() to be much simpler, quicker, shorter.
 - Add some explanatory text to admin settings
 - Fix whitespace errors
 - Use 'Activity' instead of 'Track' for links, since track is a concept used by tracker module and is different to what we do here.
1 <?php
2 // $Id: role_activity.install,v 1.2 2009/01/27 02:33:07 kbahey Exp $
3
4 /**
5 * Implementation of hook_schema().
6 */
7 function role_activity_schema() {
8 $schema['role_activity'] = array(
9 'description' => 'Stores activity for certain roles',
10
11 'fields' => array(
12 'raid' => array('type' => 'serial', 'not null' => TRUE, ),
13 'uid' => array('type' => 'int', 'not null' => TRUE, ),
14 'timestamp' => array('type' => 'int', 'not null' => TRUE, ),
15 'type' => array('type' => 'varchar', 'length' => 16, 'not null' => TRUE, ),
16 'referer' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
17 'ip' => array('type' => 'varchar', 'length' => 128, 'not null' => TRUE, ),
18 'action' => array('type' => 'varchar', 'length' => 256, 'not null' => TRUE, ),
19 'link' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, ),
20 'uri' => array('type' => 'varchar', 'length' => 255, 'not null' => TRUE, ),
21 'message' => array('type' => 'text', 'size' => 'big', 'not null' => TRUE, ),
22 ),
23
24 'primary key' => array('raid'),
25
26 'indexes' => array(
27 'uid' => array('uid'),
28 'timestamp' => array('timestamp'),
29 'type' => array('type'),
30 ),
31 );
32
33 return $schema;
34 }
35
36 /**
37 * Implementation of hook_install().
38 */
39 function role_activity_install() {
40 drupal_install_schema('role_activity');
41 }
42
43 /**
44 * Implementation of hook_uninstall().
45 */
46 function role_activity_uninstall() {
47 drupal_uninstall_schema('role_activity');
48 }

  ViewVC Help
Powered by ViewVC 1.1.2